[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] MI CThread.getStackFrameCount()
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/ChangeLog,v
retrieving revision 1.33
diff -u -r1.33 ChangeLog
--- ChangeLog 14 Nov 2002 21:09:31 -0000 1.33
+++ ChangeLog 18 Nov 2002 18:08:13 -0000
@@ -1,3 +1,9 @@
+2002-11-18 Alain Magloire
+
+ * src/.../mi/core/cdi/CThread.java (getStackFrameCount):
+ Set the new thread before getting the value and restore
+ after.
+
2002-11-14 Alain Magloire
This is needed in post-mortem, application doing a
Index: src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java,v
retrieving revision 1.19
diff -u -r1.19 CThread.java
--- src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java 14 Nov 2002 21:03:49 -0000 1.19
+++ src/org/eclipse/cdt/debug/mi/core/cdi/CThread.java 18 Nov 2002 18:08:13 -0000
@@ -95,11 +95,14 @@
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());