From d9d42ec6bf19ccbd0a89c1ff9c60d98cb50f161d Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 11 May 2013 18:48:29 -0400 Subject: [PATCH] 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. --- src/apps/debugger/controllers/ThreadHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/controllers/ThreadHandler.cpp b/src/apps/debugger/controllers/ThreadHandler.cpp index 72e519b70b..ebc4247e9d 100644 --- a/src/apps/debugger/controllers/ThreadHandler.cpp +++ b/src/apps/debugger/controllers/ThreadHandler.cpp @@ -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 infoReference(info, true);