Lines 13-18
Link Here
|
13 |
package org.eclipse.cdt.dsf.gdb.service.command; |
13 |
package org.eclipse.cdt.dsf.gdb.service.command; |
14 |
|
14 |
|
15 |
import java.io.IOException; |
15 |
import java.io.IOException; |
|
|
16 |
import java.io.OutputStream; |
16 |
import java.util.Hashtable; |
17 |
import java.util.Hashtable; |
17 |
import java.util.concurrent.Future; |
18 |
import java.util.concurrent.Future; |
18 |
import java.util.concurrent.TimeUnit; |
19 |
import java.util.concurrent.TimeUnit; |
Lines 29-34
Link Here
|
29 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControl; |
30 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControl; |
30 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService; |
31 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService; |
31 |
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin; |
32 |
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin; |
|
|
33 |
import org.eclipse.cdt.dsf.gdb.launching.DebugTracingConsole; |
32 |
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch; |
34 |
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch; |
33 |
import org.eclipse.cdt.dsf.gdb.service.IGDBBackend; |
35 |
import org.eclipse.cdt.dsf.gdb.service.IGDBBackend; |
34 |
import org.eclipse.cdt.dsf.gdb.service.SessionType; |
36 |
import org.eclipse.cdt.dsf.gdb.service.SessionType; |
Lines 105-110
Link Here
|
105 |
private AbstractCLIProcess fCLIProcess; |
107 |
private AbstractCLIProcess fCLIProcess; |
106 |
private MIInferiorProcess fInferiorProcess = null; |
108 |
private MIInferiorProcess fInferiorProcess = null; |
107 |
|
109 |
|
|
|
110 |
private DebugTracingConsole fTracingConsole = null; |
111 |
private OutputStream fTracingStream = null; |
112 |
|
108 |
private PTY fPty; |
113 |
private PTY fPty; |
109 |
|
114 |
|
110 |
public GDBControl(DsfSession session, ILaunchConfiguration config) { |
115 |
public GDBControl(DsfSession session, ILaunchConfiguration config) { |
Lines 175-180
Link Here
|
175 |
return fControlDmc; |
180 |
return fControlDmc; |
176 |
} |
181 |
} |
177 |
|
182 |
|
|
|
183 |
public DebugTracingConsole getTracingConsole() { |
184 |
return fTracingConsole; |
185 |
} |
186 |
|
178 |
public void terminate(final RequestMonitor rm) { |
187 |
public void terminate(final RequestMonitor rm) { |
179 |
// Schedule a runnable to be executed 2 seconds from now. |
188 |
// Schedule a runnable to be executed 2 seconds from now. |
180 |
// If we don't get a response to the quit command, this |
189 |
// If we don't get a response to the quit command, this |
Lines 415-434
Link Here
|
415 |
requestMonitor.done(); |
424 |
requestMonitor.done(); |
416 |
} |
425 |
} |
417 |
} |
426 |
} |
418 |
|
427 |
|
419 |
protected class CommandMonitoringStep extends InitializationShutdownStep { |
428 |
protected class CommandMonitoringStep extends InitializationShutdownStep { |
420 |
CommandMonitoringStep(Direction direction) { super(direction); } |
429 |
CommandMonitoringStep(Direction direction) { super(direction); } |
421 |
|
430 |
|
422 |
@Override |
431 |
@Override |
423 |
protected void initialize(final RequestMonitor requestMonitor) { |
432 |
protected void initialize(final RequestMonitor requestMonitor) { |
424 |
startCommandProcessing(fMIBackend.getMIInputStream(), fMIBackend.getMIOutputStream()); |
433 |
// Create the DebugTracing console and its stream |
|
|
434 |
fTracingConsole = new DebugTracingConsole(); |
435 |
fTracingStream = fTracingConsole.newOutputStream(); |
436 |
|
437 |
startCommandProcessing(fMIBackend.getMIInputStream(), |
438 |
fMIBackend.getMIOutputStream(), |
439 |
fTracingStream); |
425 |
requestMonitor.done(); |
440 |
requestMonitor.done(); |
426 |
} |
441 |
} |
427 |
|
442 |
|
428 |
@Override |
443 |
@Override |
429 |
protected void shutdown(RequestMonitor requestMonitor) { |
444 |
protected void shutdown(RequestMonitor requestMonitor) { |
430 |
stopCommandProcessing(); |
445 |
stopCommandProcessing(); |
431 |
requestMonitor.done(); |
446 |
try { |
|
|
447 |
// Since we created the console stream, we are responsible to close it |
448 |
fTracingStream.close(); |
449 |
} catch (IOException e) { |
450 |
} |
451 |
|
452 |
requestMonitor.done(); |
432 |
} |
453 |
} |
433 |
} |
454 |
} |
434 |
|
455 |
|