all repos — mgba @ 70f581162fe47d260fcf5946858054328188b808

mGBA Game Boy Advance Emulator

ARM Debugger: Only break on exceptions when stack call tracing is on
Vicki Pfau vi@endrift.com
Sun, 13 Dec 2020 00:06:06 -0800
commit

70f581162fe47d260fcf5946858054328188b808

parent

6e40b38b6350fc6d833317b788a3bfbc4c3683b6

1 files changed, 6 insertions(+), 4 deletions(-)

jump to
M src/arm/debugger/debugger.csrc/arm/debugger/debugger.c

@@ -152,13 +152,15 @@ mLOG(DEBUGGER, ERROR, "Unknown branch operand in stack trace");

return false; } - if (isCall) { - int instructionLength = isWideInstruction ? WORD_SIZE_ARM : WORD_SIZE_THUMB; - frame = mStackTracePush(stack, pc, destAddress + instructionLength, cpu->gprs[ARM_SP], &cpu->regs); + if (interrupt || isCall) { + if (isCall) { + int instructionLength = isWideInstruction ? WORD_SIZE_ARM : WORD_SIZE_THUMB; + frame = mStackTracePush(stack, pc, destAddress + instructionLength, cpu->gprs[ARM_SP], &cpu->regs); + } if (!(debugger->stackTraceMode & STACK_TRACE_BREAK_ON_CALL)) { return false; } - } else if (!interrupt) { + } else { if (frame && currentStack == ARMSelectBank(FRAME_PRIV(frame))) { mStackTracePop(stack); }