From 01bde001e6952592587cd87f9844f3502c4d8ffe Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Mon, 18 Nov 2002 18:10:02 +0000 Subject: [PATCH] getStackFameCount() set and reset the thread. --- .../src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java index 6a1b08007d2..7933568f723 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java @@ -95,11 +95,14 @@ public class CThread extends CObject implements ICDIThread { CommandFactory factory = mi.getCommandFactory(); MIStackInfoDepth depth = factory.createMIStackInfoDepth(); try { + ICDIThread oldThread = getCTarget().getCurrentThread(); + getCTarget().setCurrentThread(this); mi.postCommand(depth); MIStackInfoDepthInfo info = depth.getMIStackInfoDepthInfo(); if (info == null) { throw new CDIException("No answer"); } + getCTarget().setCurrentThread(oldThread); return info.getDepth(); } catch (MIException e) { throw new CDIException(e.getMessage());