mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +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 getElement(StackFrame stack, String name) {
|
||||||
Element[] elements = getElements();
|
Element[] elements = getElements();
|
||||||
for (int i = 0; i < elements.length; i++) {
|
for (int i = 0; i < elements.length; i++) {
|
||||||
if (elements[i].stackframe.equals(stack) &&
|
if (elements[i].name.equals(name)) {
|
||||||
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];
|
return elements[i];
|
||||||
|
} else if (elements[i].stackframe.equals(stack)) {
|
||||||
|
return elements[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue