mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +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:
parent
86c289bd83
commit
e377d6d070
2 changed files with 6 additions and 2 deletions
|
@ -1661,8 +1661,10 @@ 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();
|
||||
if (resultVar != null && !resultVar.isEmpty()) {
|
||||
fReturnValueAliases.createAlias(stoppedEventThread, resultVar);
|
||||
}
|
||||
}
|
||||
|
||||
// Keep track of the latest method the thread is stopped in.
|
||||
// Must do this after creating any alias, or else we will overwrite
|
||||
|
|
|
@ -1047,11 +1047,13 @@ public class MIStack extends AbstractDsfService
|
|||
String name = ((MIFunctionFinishedEvent)miEvent).getGDBResultVar();
|
||||
String value = ((MIFunctionFinishedEvent)miEvent).getReturnValue();
|
||||
|
||||
if (name != null && !name.isEmpty() && value != null && !value.isEmpty()) {
|
||||
fThreadToReturnVariable.put(finishedEventThread, new VariableData(new MIArg(name, value)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @nooverride This method is not intended to be re-implemented or extended by clients.
|
||||
|
|
Loading…
Add table
Reference in a new issue