1
0
Fork 0
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:
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[] 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;