1
0
Fork 0
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:
Alain Magloire 2002-09-17 03:56:19 +00:00
parent e25f73cf71
commit ac1048390a

View file

@ -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
return elements[i]; // 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; return null;