1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[252782] Adapt the launch sequence to the latest non-stop syntax.

"set breakpoint apply global" does not exist anymore.
"set breakpoint always-inserted" is no longer needed because GDB does it
automatically for non-stop.
"maint set remote-async 1" and "maint set linux-async 1" are replaced by a
simpler "set target-async on"

Also, I changed the version of the GDB that supports multi-process.  This GDB
is not actually available publicly yet, but it works for the preliminary
release I have.  Once GDB 7 is out, we will change the version again.
This commit is contained in:
Marc Khouzam 2008-11-26 15:50:24 +00:00
parent d078289a24
commit dfe9381a72
2 changed files with 17 additions and 48 deletions

View file

@ -42,7 +42,6 @@ import org.eclipse.dd.mi.service.command.commands.MIEnvironmentCD;
import org.eclipse.dd.mi.service.command.commands.MIFileExecAndSymbols;
import org.eclipse.dd.mi.service.command.commands.MIGDBSetArgs;
import org.eclipse.dd.mi.service.command.commands.MIGDBSetAutoSolib;
import org.eclipse.dd.mi.service.command.commands.MIGDBSetBreakpointApply;
import org.eclipse.dd.mi.service.command.commands.MIGDBSetNonStop;
import org.eclipse.dd.mi.service.command.commands.MIGDBSetSolibSearchPath;
import org.eclipse.dd.mi.service.command.commands.MITargetSelect;
@ -199,22 +198,6 @@ public class FinalLaunchSequence extends Sequence {
requestMonitor.done();
}
}},
/*
* Tell GDB to have breakpoint affect all processes being debugged.
* The user should actually make this decision. See bug 244053
*/
new Step() { @Override
public void execute(final RequestMonitor requestMonitor) {
fCommandControl.queueCommand(
// This command will fail for GDBs without multi-process support, and that is ok
new MIGDBSetBreakpointApply(fCommandControl.getContext(), true),
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
@Override
protected void handleCompleted() {
requestMonitor.done();
}
});
}},
/*
* Enable non-stop mode if necessary
*/
@ -233,19 +216,7 @@ public class FinalLaunchSequence extends Sequence {
if (isNonStop) {
// The raw commands should not be necessary in the official GDB release
fCommandControl.queueCommand(
new RawCommand(fCommandControl.getContext(), "set breakpoint always-inserted"), //$NON-NLS-1$
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
@Override
protected void handleSuccess() {
String asyncCommandStr;
if (fSessionType == SessionType.REMOTE) {
asyncCommandStr = "maint set remote-async 1"; //$NON-NLS-1$
} else {
asyncCommandStr = "maint set linux-async 1"; //$NON-NLS-1$
}
fCommandControl.queueCommand(
new RawCommand(fCommandControl.getContext(), asyncCommandStr),
new RawCommand(fCommandControl.getContext(), "set target-async on"), //$NON-NLS-1$
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
@Override
protected void handleSuccess() {
@ -261,8 +232,6 @@ public class FinalLaunchSequence extends Sequence {
});
}
});
}
});
} else {
requestMonitor.done();
}

View file

@ -120,7 +120,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
@Override
protected IProcesses createProcessesService(DsfSession session) {
if (fVersion.startsWith("6.8.50.20080730")) { //$NON-NLS-1$
if (fVersion.startsWith("6.8.50.20081118")) { //$NON-NLS-1$
return new GDBProcesses_7_0(session);
}
return new GDBProcesses(session);