From 0a3dfda3fde91bedbb5410efa65d6c0b9686977b Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Thu, 8 May 2008 13:31:45 +0000 Subject: [PATCH] Bug 230434 When stepping a stack frame that is not the top level, GDB switches to the top level frame first. Therefore, when we get a stopped event, we are not sure what the frame is, in GDB, so we should reset it internally. --- .../org/eclipse/dd/mi/service/command/AbstractMIControl.java | 5 +++++ .../dd/mi/service/command/MIRunControlEventProcessor.java | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/AbstractMIControl.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/AbstractMIControl.java index 1de0c9848f1..ba3e91e1037 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/AbstractMIControl.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/AbstractMIControl.java @@ -738,4 +738,9 @@ public abstract class AbstractMIControl extends AbstractDsfService public void resetCurrentThreadLevel(){ fCurrentThreadId = -1; } + + public void resetCurrentStackLevel(){ + fCurrentStackLevel = -1; + } + } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/MIRunControlEventProcessor.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/MIRunControlEventProcessor.java index 23b9335dd83..bb39182074f 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/MIRunControlEventProcessor.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/MIRunControlEventProcessor.java @@ -108,9 +108,10 @@ public class MIRunControlEventProcessor // Change of state. String state = exec.getAsyncClass(); if ("stopped".equals(state)) { //$NON-NLS-1$ - // Re-set the thread level to -1 when stopped event is recvd. + // Re-set the thread and stack level to -1 when stopped event is recvd. // This is to synchronize the state between GDB back-end and AbstractMIControl. fCommandControl.resetCurrentThreadLevel(); + fCommandControl.resetCurrentStackLevel(); List> events = new LinkedList>(); MIResult[] results = exec.getMIResults();