Fix case of incorrect return value detection.

When using step over to step out of a function, we need to use the
address range of the step statement to determine the function which
returned said value, not the current IP, as that has already exited the
function and will consequently be that of the caller, leading to such
returns being attributed to the wrong function, and consequently also
the wrong type.
This commit is contained in:
Rene Gollent
2013-05-11 18:48:29 -04:00
parent 88cc420211
commit d9d42ec6bf
@@ -730,8 +730,8 @@ ThreadHandler::_HandleSingleStepStep(CpuState* cpuState)
TRACE_CONTROL("ThreadHandler::_HandleSingleStepStep() "
" - adding return value for STEP_OVER\n");
ReturnValueInfo* info = new(std::nothrow)
ReturnValueInfo(cpuState->InstructionPointer(),
cpuState);
ReturnValueInfo(fStepStatement
->CoveringAddressRange().Start(), cpuState);
if (info == NULL)
return false;
BReference<ReturnValueInfo> infoReference(info, true);