From 39644e1d06994b4acf274f734a734020c1eb012f Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 13 Aug 2008 19:09:49 +0000 Subject: [PATCH] Bug 242105 Turning on non-stop on a remote target requires a slightly different command. Also, GDB pagination must be turned off to avoid blocking during non-stop. --- .../launching/FinalLaunchSequence.java | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java index 1a7a405a74d..8cc819ac349 100644 --- a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java +++ b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java @@ -227,28 +227,42 @@ public class FinalLaunchSequence extends Sequence { // We really should set it to false when GDB supports it though. // Something to fix later. if (isNonStop) { - // The two 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( - new RawCommand(fCommandControl.getControlDMContext(), "maint set linux-async 1"), //$NON-NLS-1$ + new RawCommand(fCommandControl.getControlDMContext(), "set breakpoint always-inserted"), //$NON-NLS-1$ new DataRequestMonitor(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.getControlDMContext(), "set breakpoint always-inserted 1"), //$NON-NLS-1$ + new RawCommand(fCommandControl.getControlDMContext(), asyncCommandStr), new DataRequestMonitor(getExecutor(), requestMonitor) { @Override protected void handleSuccess() { fCommandControl.queueCommand( - new MIGDBSetNonStop(fCommandControl.getControlDMContext(), true), - new DataRequestMonitor(getExecutor(), requestMonitor)); + new RawCommand(fCommandControl.getControlDMContext(), "set pagination off"), //$NON-NLS-1$ + new DataRequestMonitor(getExecutor(), requestMonitor) { + @Override + protected void handleSuccess() { + fCommandControl.queueCommand( + new MIGDBSetNonStop(fCommandControl.getControlDMContext(), true), + new DataRequestMonitor(getExecutor(), requestMonitor)); + } + }); } }); } - }); + }); } else { requestMonitor.done(); } - }}, + }}, /* * Tell GDB to automatically load or not the shared library symbols */