Debugger: Avoid unnecessary work in ThreadHandler.

ThreadHandler:
- When stepping over a function call, ensure that we actually have a valid
  value for the stepped over function address before adding a return value
  info entry. While this had no visible adverse effect, it did result in
  unnecessary work when creating the list of variables to display later,
  since such entries would have no valid function to resolve to, and thus
  had to be ignored/thrown away.
This commit is contained in:
Rene Gollent
2016-03-19 16:30:50 -04:00
parent 06c2f877e6
commit 4f21e03d09
@@ -1,6 +1,6 @@
/*
* Copyright 2009-2012, Ingo Weinhold, [email protected].
* Copyright 2010-2015, Rene Gollent, [email protected].
* Copyright 2010-2016, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
@@ -720,8 +720,8 @@ ThreadHandler::_HandleBreakpointHitStep(CpuState* cpuState)
}
}
if (fPreviousFrameAddress != 0 && fSteppedOverFunctionAddress
!= cpuState->InstructionPointer()) {
if (fPreviousFrameAddress != 0 && fSteppedOverFunctionAddress != 0
&& fSteppedOverFunctionAddress != cpuState->InstructionPointer()) {
TRACE_CONTROL("STEP_OVER: called function address %#" B_PRIx64
", previous frame address: %#" B_PRIx64 ", frame address: %#"
B_PRIx64 ", adding return info\n", fSteppedOverFunctionAddress,