mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
2004-09-15 Alain Magloire
The correct thread was not set. * cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
This commit is contained in:
parent
df267e58fa
commit
bc6ac94fde
4 changed files with 23 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-09-15 Alain Magloire
|
||||||
|
|
||||||
|
The correct thread was not set.
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/ExpressionManager.java
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
|
||||||
|
|
||||||
2004-09-12 Alain Magloire
|
2004-09-12 Alain Magloire
|
||||||
Since MISession is attach to the Target, the
|
Since MISession is attach to the Target, the
|
||||||
way we fire termination events must change also.
|
way we fire termination events must change also.
|
||||||
|
|
|
@ -134,6 +134,7 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
frame.getThread().setCurrentStackFrame(frame, false);
|
frame.getThread().setCurrentStackFrame(frame, false);
|
||||||
try {
|
try {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
|
@ -151,6 +152,7 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
return expression;
|
return expression;
|
||||||
|
|
|
@ -153,6 +153,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
frame.getThread().setCurrentStackFrame(frame, false);
|
frame.getThread().setCurrentStackFrame(frame, false);
|
||||||
try {
|
try {
|
||||||
MISession miSession = target.getMISession();
|
MISession miSession = target.getMISession();
|
||||||
|
@ -166,6 +167,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -233,6 +235,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
currentThread = target.getCurrentThread();
|
currentThread = target.getCurrentThread();
|
||||||
currentFrame = currentThread.getCurrentStackFrame();
|
currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
target.setCurrentThread(stack.getThread(), false);
|
||||||
stack.getThread().setCurrentStackFrame(stack, false);
|
stack.getThread().setCurrentStackFrame(stack, false);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -251,6 +254,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
if (currentThread != null) {
|
if (currentThread != null) {
|
||||||
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -269,6 +273,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
frame.getThread().setCurrentStackFrame(frame, false);
|
frame.getThread().setCurrentStackFrame(frame, false);
|
||||||
try {
|
try {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
|
@ -297,7 +302,8 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
currentThread.setCurrentStackFrame(currentFrame);
|
target.setCurrentThread(currentThread, false);
|
||||||
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
return (ICDIArgumentObject[]) argObjects.toArray(new ICDIArgumentObject[0]);
|
return (ICDIArgumentObject[]) argObjects.toArray(new ICDIArgumentObject[0]);
|
||||||
}
|
}
|
||||||
|
@ -394,6 +400,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
frame.getThread().setCurrentStackFrame(frame, false);
|
frame.getThread().setCurrentStackFrame(frame, false);
|
||||||
try {
|
try {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
|
@ -416,6 +423,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
return (ICDIVariableObject[]) varObjects.toArray(new ICDIVariableObject[0]);
|
return (ICDIVariableObject[]) varObjects.toArray(new ICDIVariableObject[0]);
|
||||||
|
@ -453,6 +461,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
currentThread = target.getCurrentThread();
|
currentThread = target.getCurrentThread();
|
||||||
currentFrame = currentThread.getCurrentStackFrame();
|
currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
target.setCurrentThread(stack.getThread(), false);
|
||||||
stack.getThread().setCurrentStackFrame(stack, false);
|
stack.getThread().setCurrentStackFrame(stack, false);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -471,6 +480,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
if (currentThread != null) {
|
if (currentThread != null) {
|
||||||
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,6 +254,9 @@ public class Thread extends CObject implements ICDIThread {
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#setCurrentStackFrame(ICDIStackFrame, boolean)
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIThread#setCurrentStackFrame(ICDIStackFrame, boolean)
|
||||||
*/
|
*/
|
||||||
public void setCurrentStackFrame(ICDIStackFrame stackframe, boolean doUpdate) throws CDIException {
|
public void setCurrentStackFrame(ICDIStackFrame stackframe, boolean doUpdate) throws CDIException {
|
||||||
|
|
||||||
|
// Assert we should assert that the stackframe is one of our frames.
|
||||||
|
|
||||||
int frameLevel = 0;
|
int frameLevel = 0;
|
||||||
if (stackframe != null) {
|
if (stackframe != null) {
|
||||||
frameLevel = stackframe.getLevel();
|
frameLevel = stackframe.getLevel();
|
||||||
|
|
Loading…
Add table
Reference in a new issue