Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUmair Sair2019-08-17 19:16:58 +0000
committerUmair Sair2019-08-17 20:17:00 +0000
commit810f329774b386cb0df5f1f454db8f69b9bb21ac (patch)
tree2275841bd869bf3266a364ecad86f80f9c06f1da
parent15b00032cea865801ba203c471742e41b20f9bfe (diff)
downloadorg.eclipse.cdt-810f329774b386cb0df5f1f454db8f69b9bb21ac.tar.gz
org.eclipse.cdt-810f329774b386cb0df5f1f454db8f69b9bb21ac.tar.xz
org.eclipse.cdt-810f329774b386cb0df5f1f454db8f69b9bb21ac.zip
Bug 550165: Debugging is stuck when "command aborts" on step return
Command abort can occur for commands that are run not just in context of thread, instead stack frame is also present, e.g., step return in case of this bug. Updated the implementation to get IExecutionDMContext from the command context if it is not IExecutionDMContext itself. Change-Id: Ia6cccffba8bde28e22eca46211747de31084f25a Signed-off-by: Umair Sair <umair_sair@hotmail.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIAsyncErrorProcessor.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIAsyncErrorProcessor.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIAsyncErrorProcessor.java
index 83023202e0f..b2ab447b5fe 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIAsyncErrorProcessor.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIAsyncErrorProcessor.java
@@ -10,6 +10,7 @@
*
* Contributors:
* Mentor Graphics - Initial API and implementation
+ * Umair Sair (Mentor Graphics) - Debugging is stuck when "command aborted" occurs on step return (bug 550165)
*******************************************************************************/
package org.eclipse.cdt.dsf.mi.service.command;
@@ -18,6 +19,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
@@ -90,10 +92,11 @@ public class MIAsyncErrorProcessor implements IEventProcessor {
public void commandDone(ICommandToken token, ICommandResult result) {
if (token.getCommand() instanceof MICommand<?> && result instanceof MIInfo && ((MIInfo) result).isRunning()) {
IDMContext ctx = ((MICommand<MIInfo>) token.getCommand()).getContext();
- if (ctx instanceof IExecutionDMContext) {
+ IExecutionDMContext execDMCtx = DMContexts.getAncestorOfType(ctx, IExecutionDMContext.class);
+ if (execDMCtx != null) {
MIResultRecord rr = ((MIInfo) result).getMIOutput().getMIResultRecord();
if (rr != null) {
- fRunCommands.put((IExecutionDMContext) ctx, Integer.valueOf(rr.getToken()));
+ fRunCommands.put(execDMCtx, Integer.valueOf(rr.getToken()));
}
}
}

Back to the top