mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
For register no need to compare the stackframe.
This commit is contained in:
parent
e25f73cf71
commit
ac1048390a
1 changed files with 8 additions and 3 deletions
|
@ -65,9 +65,14 @@ public class VariableManager extends SessionObject implements ICDIExpressionMana
|
|||
Element getElement(StackFrame stack, String name) {
|
||||
Element[] elements = getElements();
|
||||
for (int i = 0; i < elements.length; i++) {
|
||||
if (elements[i].stackframe.equals(stack) &&
|
||||
elements[i].name.equals(name)) {
|
||||
return elements[i];
|
||||
if (elements[i].name.equals(name)) {
|
||||
// For the Var object the register is always the same
|
||||
// no need to check the stackframe.
|
||||
if (elements[i].variable instanceof Register) {
|
||||
return elements[i];
|
||||
} else if (elements[i].stackframe.equals(stack)) {
|
||||
return elements[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue