mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
getStackFameCount() set and reset the thread.
This commit is contained in:
parent
1e61153ea5
commit
01bde001e6
1 changed files with 3 additions and 0 deletions
|
@ -95,11 +95,14 @@ public class CThread extends CObject implements ICDIThread {
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
MIStackInfoDepth depth = factory.createMIStackInfoDepth();
|
MIStackInfoDepth depth = factory.createMIStackInfoDepth();
|
||||||
try {
|
try {
|
||||||
|
ICDIThread oldThread = getCTarget().getCurrentThread();
|
||||||
|
getCTarget().setCurrentThread(this);
|
||||||
mi.postCommand(depth);
|
mi.postCommand(depth);
|
||||||
MIStackInfoDepthInfo info = depth.getMIStackInfoDepthInfo();
|
MIStackInfoDepthInfo info = depth.getMIStackInfoDepthInfo();
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
throw new CDIException("No answer");
|
throw new CDIException("No answer");
|
||||||
}
|
}
|
||||||
|
getCTarget().setCurrentThread(oldThread);
|
||||||
return info.getDepth();
|
return info.getDepth();
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new CDIException(e.getMessage());
|
throw new CDIException(e.getMessage());
|
||||||
|
|
Loading…
Add table
Reference in a new issue