|
Lines 30-41
Link Here
|
| 30 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControl; |
30 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControl; |
| 31 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService; |
31 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService; |
| 32 |
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; |
32 |
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; |
|
|
33 |
import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants; |
| 33 |
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin; |
34 |
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin; |
| 34 |
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch; |
35 |
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch; |
| 35 |
import org.eclipse.cdt.dsf.gdb.service.GDBRunControl_7_0; |
36 |
import org.eclipse.cdt.dsf.gdb.service.GDBRunControl_7_0; |
| 36 |
import org.eclipse.cdt.dsf.gdb.service.IGDBBackend; |
37 |
import org.eclipse.cdt.dsf.gdb.service.IGDBBackend; |
| 37 |
import org.eclipse.cdt.dsf.gdb.service.IReverseRunControl; |
38 |
import org.eclipse.cdt.dsf.gdb.service.IReverseRunControl; |
| 38 |
import org.eclipse.cdt.dsf.gdb.service.SessionType; |
39 |
import org.eclipse.cdt.dsf.gdb.service.SessionType; |
|
|
40 |
import org.eclipse.cdt.dsf.gdb.service.GDBProcesses_7_0.ContainerExitedDMEvent; |
| 41 |
import org.eclipse.cdt.dsf.gdb.service.GDBProcesses_7_0.ContainerStartedDMEvent; |
| 39 |
import org.eclipse.cdt.dsf.mi.service.IMIBackend; |
42 |
import org.eclipse.cdt.dsf.mi.service.IMIBackend; |
| 40 |
import org.eclipse.cdt.dsf.mi.service.IMIProcesses; |
43 |
import org.eclipse.cdt.dsf.mi.service.IMIProcesses; |
| 41 |
import org.eclipse.cdt.dsf.mi.service.MIProcesses; |
44 |
import org.eclipse.cdt.dsf.mi.service.MIProcesses; |
|
Lines 61-66
Link Here
|
| 61 |
import org.eclipse.cdt.utils.pty.PTY; |
64 |
import org.eclipse.cdt.utils.pty.PTY; |
| 62 |
import org.eclipse.core.runtime.CoreException; |
65 |
import org.eclipse.core.runtime.CoreException; |
| 63 |
import org.eclipse.core.runtime.IStatus; |
66 |
import org.eclipse.core.runtime.IStatus; |
|
|
67 |
import org.eclipse.core.runtime.Platform; |
| 64 |
import org.eclipse.core.runtime.Status; |
68 |
import org.eclipse.core.runtime.Status; |
| 65 |
import org.eclipse.debug.core.DebugException; |
69 |
import org.eclipse.debug.core.DebugException; |
| 66 |
import org.eclipse.debug.core.ILaunchConfiguration; |
70 |
import org.eclipse.debug.core.ILaunchConfiguration; |
|
Lines 542-547
Link Here
|
| 542 |
} |
546 |
} |
| 543 |
} |
547 |
} |
| 544 |
|
548 |
|
|
|
549 |
/** @since 2.0 */ |
| 550 |
@DsfServiceEventHandler |
| 551 |
public void eventDispatched(ContainerStartedDMEvent e) { |
| 552 |
setConnected(true); |
| 553 |
} |
| 554 |
|
| 555 |
/** @since 2.0 */ |
| 556 |
@DsfServiceEventHandler |
| 557 |
public void eventDispatched(ContainerExitedDMEvent e) { |
| 558 |
setConnected(false); |
| 559 |
|
| 560 |
if (Platform.getPreferencesService().getBoolean("org.eclipse.cdt.dsf.gdb.ui", //$NON-NLS-1$ |
| 561 |
IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, |
| 562 |
true, null)) { |
| 563 |
if (!isConnected() && |
| 564 |
!(fMIBackend.getIsAttachSession() && |
| 565 |
fMIBackend.getSessionType() == SessionType.REMOTE)) { |
| 566 |
// If the last process we are debugging finishes, let's terminate GDB |
| 567 |
// but not for a remote attach session, since we could request to attach |
| 568 |
// to another process |
| 569 |
terminate(new RequestMonitor(getExecutor(), null)); |
| 570 |
} |
| 571 |
} |
| 572 |
} |
| 573 |
|
| 545 |
public static class InitializationShutdownStep extends Sequence.Step { |
574 |
public static class InitializationShutdownStep extends Sequence.Step { |
| 546 |
public enum Direction { INITIALIZING, SHUTTING_DOWN } |
575 |
public enum Direction { INITIALIZING, SHUTTING_DOWN } |
| 547 |
|
576 |
|