1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 06:45:43 +02:00

save and restore the current thread.

This commit is contained in:
Alain Magloire 2002-10-26 23:39:50 +00:00
parent b3e4fda188
commit f3fee4f762

View file

@ -60,6 +60,7 @@ public class CThread extends CObject implements ICDIThread {
CommandFactory factory = mi.getCommandFactory(); CommandFactory factory = mi.getCommandFactory();
MIStackListFrames frames = factory.createMIStackListFrames(); MIStackListFrames frames = factory.createMIStackListFrames();
try { try {
ICDIThread oldThread = getCTarget().getCurrentThread();
getCTarget().setCurrentThread(this); getCTarget().setCurrentThread(this);
mi.postCommand(frames); mi.postCommand(frames);
MIStackListFramesInfo info = frames.getMIStackListFramesInfo(); MIStackListFramesInfo info = frames.getMIStackListFramesInfo();
@ -71,6 +72,7 @@ public class CThread extends CObject implements ICDIThread {
for (int i = 0; i < stack.length; i++) { for (int i = 0; i < stack.length; i++) {
stack[i] = new StackFrame(this, miFrames[i]); stack[i] = new StackFrame(this, miFrames[i]);
} }
getCTarget().setCurrentThread(oldThread);
return stack; return stack;
} catch (MIException e) { } catch (MIException e) {
//throw new CDIException(e.getMessage()); //throw new CDIException(e.getMessage());