1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 436349 - Local variables incorrectly show as "returned" in variables

view

Change-Id: I916ed600f31da1c1f7da0215bac02c58ebfefb0a
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27721
(cherry picked from commit 93fe0e78c3)
Reviewed-on: https://git.eclipse.org/r/27732
This commit is contained in:
Marc Khouzam 2014-06-02 09:41:32 -04:00
parent 86c289bd83
commit e377d6d070
2 changed files with 6 additions and 2 deletions

View file

@ -1661,7 +1661,9 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
// When getting an MIFunctionFinishedEvent we must set
// a proper alias for the convenience variable
String resultVar = ((MIFunctionFinishedEvent)miEvent).getGDBResultVar();
fReturnValueAliases.createAlias(stoppedEventThread, resultVar);
if (resultVar != null && !resultVar.isEmpty()) {
fReturnValueAliases.createAlias(stoppedEventThread, resultVar);
}
}
// Keep track of the latest method the thread is stopped in.

View file

@ -1047,7 +1047,9 @@ public class MIStack extends AbstractDsfService
String name = ((MIFunctionFinishedEvent)miEvent).getGDBResultVar();
String value = ((MIFunctionFinishedEvent)miEvent).getReturnValue();
fThreadToReturnVariable.put(finishedEventThread, new VariableData(new MIArg(name, value)));
if (name != null && !name.isEmpty() && value != null && !value.isEmpty()) {
fThreadToReturnVariable.put(finishedEventThread, new VariableData(new MIArg(name, value)));
}
}
}
}