Use architecture to determine correct frame pointer comparison.
This commit is contained in:
@@ -576,7 +576,13 @@ ThreadHandler::_HandleBreakpointHitStep(CpuState* cpuState)
|
|||||||
// That's the return address, so we're done in theory,
|
// That's the return address, so we're done in theory,
|
||||||
// unless we're a recursive function. Check if we've actually
|
// unless we're a recursive function. Check if we've actually
|
||||||
// exited the previous stack frame or not.
|
// exited the previous stack frame or not.
|
||||||
if (cpuState->StackFramePointer() <= fPreviousFrameAddress) {
|
target_addr_t framePointer = cpuState->StackFramePointer();
|
||||||
|
bool hasExitedFrame = fDebuggerInterface->GetArchitecture()
|
||||||
|
->StackGrowthDirection() == STACK_GROWTH_DIRECTION_POSITIVE
|
||||||
|
? framePointer < fPreviousFrameAddress
|
||||||
|
: framePointer > fPreviousFrameAddress;
|
||||||
|
|
||||||
|
if (!hasExitedFrame) {
|
||||||
status_t error = _InstallTemporaryBreakpoint(
|
status_t error = _InstallTemporaryBreakpoint(
|
||||||
cpuState->InstructionPointer());
|
cpuState->InstructionPointer());
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
|
|||||||
Reference in New Issue
Block a user