Source:
public void run () { while (true) { CommandHandle commandHandle = null; synchronized(fTxCommands) { try { commandHandle = fTxCommands.take(); } catch (InterruptedException e) { break; } if (commandHandle == fTerminatorHandle) { break; } if (!(commandHandle.getCommand() instanceof RawCommand)) { fRxCommands.put(commandHandle.getTokenId(), commandHandle); } } final String str; if (commandHandle.getCommand() instanceof RawCommand) { str = commandHandle.getCommand().constructCommand(); } else if (fUseThreadGroupOption) { str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(commandHandle.getGroupId(), commandHandle.getThreadId(), commandHandle.getStackFrameId()); } else if (fUseThreadAndFrameOptions) { str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(commandHandle.getThreadId(), commandHandle.getStackFrameId()); } else { str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(); } try { if (fOutputStream != null) { fOutputStream.write(str.getBytes()); fOutputStream.flush(); GdbDebugOptions.trace(str); if (getMITracingStream() != null) { try { String message = GdbPlugin.getDebugTime() + " " + str; while (message.length() > 100) { String partial = message.substring(0, 100) + "\\\n"; message = message.substring(100); getMITracingStream().write(partial.getBytes()); } getMITracingStream().write(message.getBytes()); } catch (IOException e) { setMITracingStream(null); } } } } catch (IOException e) { break; } } try { if (fOutputStream != null) fOutputStream.close(); } catch (IOException e) { } }

Target:
public void run () { while (true) { CommandHandle commandHandle = null; synchronized(fTxCommands) { try { commandHandle = fTxCommands.take(); } catch (InterruptedException e) { break; } if (commandHandle == fTerminatorHandle) { break; } if (!(commandHandle.getCommand() instanceof RawCommand)) { fRxCommands.put(commandHandle.getTokenId(), commandHandle); } } final String str; if (commandHandle.getCommand() instanceof RawCommand) { str = commandHandle.getCommand().constructCommand(); } else if (fUseThreadGroupOption) { str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(commandHandle.getGroupId(), commandHandle.getThreadId(), commandHandle.getStackFrameId()); } else if (fUseThreadAndFrameOptions) { str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(commandHandle.getThreadId(), commandHandle.getStackFrameId()); } else { str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(); } try { if (fOutputStream != null) { fOutputStream.write(str.getBytes()); fOutputStream.flush(); if (GdbDebugOptions.DEBUG) { GdbDebugOptions.trace(String.format( "%s %s %s", GdbPlugin.getDebugTime(), MI_TRACE_IDENTIFIER, str)); } if (getMITracingStream() != null) { try { String message = GdbPlugin.getDebugTime() + " " + str; while (message.length() > 100) { String partial = message.substring(0, 100) + "\\\n"; message = message.substring(100); getMITracingStream().write(partial.getBytes()); } getMITracingStream().write(message.getBytes()); } catch (IOException e) { setMITracingStream(null); } } } } catch (IOException e) { break; } } try { if (fOutputStream != null) fOutputStream.close(); } catch (IOException e) { } }