mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Did not compare the stack correctly.
This commit is contained in:
parent
2e0af82c97
commit
c639d037ed
1 changed files with 4 additions and 3 deletions
|
@ -78,14 +78,15 @@ public class VariableManager extends SessionObject implements ICDIVariableManage
|
|||
Variable[] vars = getVariables();
|
||||
for (int i = 0; i < vars.length; i++) {
|
||||
if (vars[i].getName().equals(name)) {
|
||||
if (stack != null && vars[i].getStackFrame().equals(stack)) {
|
||||
ICDIStackFrame frame = vars[i].getStackFrame();
|
||||
if (stack == null && frame == null) {
|
||||
return vars[i];
|
||||
} else if (frame != null && stack != null && frame.equals(stack)) {
|
||||
if (vars[i].getVariableObject().getPosition() == position) {
|
||||
if (vars[i].getVariableObject().getStackDepth() == depth) {
|
||||
return vars[i];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return vars[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue