mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
*** empty log message ***
This commit is contained in:
parent
1cc0b27515
commit
5221d3a97c
3 changed files with 22 additions and 14 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-11-19 Alain Magloire
|
||||||
|
|
||||||
|
Clear the confusion about sublist of stackframes.
|
||||||
|
PR 78611
|
||||||
|
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
|
||||||
|
* cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
|
||||||
|
|
||||||
2004-11-17 David Inglis
|
2004-11-17 David Inglis
|
||||||
|
|
||||||
ICDIDebugger change to use IBinaryObject instead of IBnaryExecutable
|
ICDIDebugger change to use IBinaryObject instead of IBnaryExecutable
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class VariableManager extends Manager {
|
||||||
// We put a restriction on how deep we want to
|
// We put a restriction on how deep we want to
|
||||||
// go when doing update of the variables.
|
// go when doing update of the variables.
|
||||||
// If the number is to high, gdb will just hang.
|
// If the number is to high, gdb will just hang.
|
||||||
int MAX_STACK_DEPTH = 200;
|
int MAX_STACK_DEPTH = Thread.STACKFRAME_DEFAULT_DEPTH;
|
||||||
Map variablesMap;
|
Map variablesMap;
|
||||||
MIVarChange[] noChanges = new MIVarChange[0];
|
MIVarChange[] noChanges = new MIVarChange[0];
|
||||||
|
|
||||||
|
@ -574,8 +574,8 @@ public class VariableManager extends Manager {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void update(Target target) throws CDIException {
|
public void update(Target target) throws CDIException {
|
||||||
int high = 0;
|
int highLevel = 0;
|
||||||
int low = 0;
|
int lowLevel = 0;
|
||||||
List eventList = new ArrayList();
|
List eventList = new ArrayList();
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -586,20 +586,20 @@ public class VariableManager extends Manager {
|
||||||
if (currentThread != null) {
|
if (currentThread != null) {
|
||||||
currentStack = currentThread.getCurrentStackFrame();
|
currentStack = currentThread.getCurrentStackFrame();
|
||||||
if (currentStack != null) {
|
if (currentStack != null) {
|
||||||
high = currentStack.getLevel();
|
highLevel = currentStack.getLevel();
|
||||||
}
|
}
|
||||||
if (high > 0) {
|
if (highLevel > MAX_STACK_DEPTH) {
|
||||||
high--;
|
highLevel = MAX_STACK_DEPTH;
|
||||||
}
|
}
|
||||||
low = high - MAX_STACK_DEPTH;
|
lowLevel = highLevel - MAX_STACK_DEPTH;
|
||||||
if (low < 0) {
|
if (lowLevel < 0) {
|
||||||
low = 0;
|
lowLevel = 0;
|
||||||
}
|
}
|
||||||
frames = currentThread.getStackFrames(low, high);
|
frames = currentThread.getStackFrames(0, highLevel);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < vars.length; i++) {
|
for (int i = 0; i < vars.length; i++) {
|
||||||
Variable variable = vars[i];
|
Variable variable = vars[i];
|
||||||
if (isVariableNeedsToBeUpdate(variable, currentStack, frames, low)) {
|
if (isVariableNeedsToBeUpdate(variable, currentStack, frames, lowLevel)) {
|
||||||
String varName = variable.getMIVar().getVarName();
|
String varName = variable.getMIVar().getVarName();
|
||||||
MIVarChange[] changes = noChanges;
|
MIVarChange[] changes = noChanges;
|
||||||
MIVarUpdate update = factory.createMIVarUpdate(varName);
|
MIVarUpdate update = factory.createMIVarUpdate(varName);
|
||||||
|
@ -639,7 +639,7 @@ public class VariableManager extends Manager {
|
||||||
* @param frames
|
* @param frames
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean isVariableNeedsToBeUpdate(Variable variable, ICDIStackFrame current, ICDIStackFrame[] frames, int low)
|
boolean isVariableNeedsToBeUpdate(Variable variable, ICDIStackFrame current, ICDIStackFrame[] frames, int lowLevel)
|
||||||
throws CDIException {
|
throws CDIException {
|
||||||
ICDIStackFrame varStack = variable.getStackFrame();
|
ICDIStackFrame varStack = variable.getStackFrame();
|
||||||
boolean inScope = false;
|
boolean inScope = false;
|
||||||
|
@ -656,7 +656,7 @@ public class VariableManager extends Manager {
|
||||||
// The variable is in the current selected frame it should be updated
|
// The variable is in the current selected frame it should be updated
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (varStack.getLevel() >= low) {
|
if (varStack.getLevel() >= lowLevel) {
|
||||||
// Check if the Variable is still in Scope
|
// Check if the Variable is still in Scope
|
||||||
// if it is no longer in scope so update() can call "-var-delete".
|
// if it is no longer in scope so update() can call "-var-delete".
|
||||||
for (int i = 0; i < frames.length; i++) {
|
for (int i = 0; i < frames.length; i++) {
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class Thread extends CObject implements ICDIThread {
|
||||||
List currentFrames;
|
List currentFrames;
|
||||||
int stackdepth = 0;
|
int stackdepth = 0;
|
||||||
|
|
||||||
final static int STACKFRAME_DEFAULT_DEPTH = 200;
|
final public static int STACKFRAME_DEFAULT_DEPTH = 200;
|
||||||
|
|
||||||
public Thread(Target target, int threadId) {
|
public Thread(Target target, int threadId) {
|
||||||
this(target, threadId, null);
|
this(target, threadId, null);
|
||||||
|
|
Loading…
Add table
Reference in a new issue