Comment 15 for bug 1566054

Revision history for this message
Petteri Aimonen (jpa-lp) wrote :

I'm using a macro like this as a workaround:

define hf_backtrace
 set $pc = ((uint32_t*)$psp)[6]
 set $lr = ((uint32_t*)$psp)[5]
 set $r12 = ((uint32_t*)$psp)[4]
 set $r3 = ((uint32_t*)$psp)[3]
 set $r2 = ((uint32_t*)$psp)[2]
 set $r1 = ((uint32_t*)$psp)[1]
 set $r0 = ((uint32_t*)$psp)[0]
        # Use 4*26 with FPU, 4*8 without FPU
 set $sp = $psp + 4*26
 bt
end

Basically it emulates an exception return and gdb can then backtrace from the position where the exception occurred.