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.MIFileExecAndSymbols;
import org.eclipse.dd.mi.service.command.commands.MIGDBSetArgs; 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.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.MIGDBSetNonStop;
import org.eclipse.dd.mi.service.command.commands.MIGDBSetSolibSearchPath; import org.eclipse.dd.mi.service.command.commands.MIGDBSetSolibSearchPath;
import org.eclipse.dd.mi.service.command.commands.MITargetSelect; import org.eclipse.dd.mi.service.command.commands.MITargetSelect;
@ -199,22 +198,6 @@ public class FinalLaunchSequence extends Sequence {
requestMonitor.done(); 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 * Enable non-stop mode if necessary
*/ */
@ -233,36 +216,22 @@ public class FinalLaunchSequence extends Sequence {
if (isNonStop) { if (isNonStop) {
// The raw commands should not be necessary in the official GDB release // The raw commands should not be necessary in the official GDB release
fCommandControl.queueCommand( fCommandControl.queueCommand(
new RawCommand(fCommandControl.getContext(), "set breakpoint always-inserted"), //$NON-NLS-1$ new RawCommand(fCommandControl.getContext(), "set target-async on"), //$NON-NLS-1$
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) { new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
@Override @Override
protected void handleSuccess() { protected void handleSuccess() {
String asyncCommandStr; fCommandControl.queueCommand(
if (fSessionType == SessionType.REMOTE) { new RawCommand(fCommandControl.getContext(), "set pagination off"), //$NON-NLS-1$
asyncCommandStr = "maint set remote-async 1"; //$NON-NLS-1$ new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
} else { @Override
asyncCommandStr = "maint set linux-async 1"; //$NON-NLS-1$ protected void handleSuccess() {
} fCommandControl.queueCommand(
new MIGDBSetNonStop(fCommandControl.getContext(), true),
fCommandControl.queueCommand( new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
new RawCommand(fCommandControl.getContext(), asyncCommandStr), }
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) { });
@Override }
protected void handleSuccess() { });
fCommandControl.queueCommand(
new RawCommand(fCommandControl.getContext(), "set pagination off"), //$NON-NLS-1$
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
@Override
protected void handleSuccess() {
fCommandControl.queueCommand(
new MIGDBSetNonStop(fCommandControl.getContext(), true),
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
}
});
}
});
}
});
} else { } else {
requestMonitor.done(); requestMonitor.done();
} }

View file

@ -120,7 +120,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
@Override @Override
protected IProcesses createProcessesService(DsfSession session) { 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_7_0(session);
} }
return new GDBProcesses(session); return new GDBProcesses(session);