Fix scope change of variables entering function call

This commit is contained in:
baldurk
2020-05-05 19:43:29 +01:00
parent a04e2d3517
commit a0849b7cca
@@ -103,6 +103,8 @@ void ThreadState::EnterFunction(const rdcarray<Id> &arguments)
// if there's a previous stack frame, save its live list
if(!callstack.empty())
{
// process the outgoing scope
ProcessScopeChange(live, {});
callstack.back()->live = live;
callstack.back()->sourceVars = sourceVars;
}
@@ -110,8 +112,6 @@ void ThreadState::EnterFunction(const rdcarray<Id> &arguments)
// start with just globals
live = debugger.GetLiveGlobals();
sourceVars = debugger.GetGlobalSourceVars();
// process the outgoing scope
ProcessScopeChange(frame->live, live);
callstack.push_back(frame);