mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
panic handler: Print correct PC & backtrace for debug exceptions
This commit is contained in:
parent
22756b6c02
commit
c61060e673
@ -34,8 +34,14 @@ The default behaviour is to just exit the interrupt or call the panic handler on
|
||||
_xt_debugexception:
|
||||
movi a0,PANIC_RSN_DEBUGEXCEPTION
|
||||
wsr a0,EXCCAUSE
|
||||
/* _xt_panic assumes a level 1 exception. As we're
|
||||
crashing anyhow, copy EPC & EXCSAVE from DEBUGLEVEL
|
||||
to level 1. */
|
||||
rsr a0,(EPC + XCHAL_DEBUGLEVEL)
|
||||
wsr a0,EPC_1
|
||||
rsr a0,(EXCSAVE + XCHAL_DEBUGLEVEL)
|
||||
wsr a0,EXCSAVE_1
|
||||
call0 _xt_panic /* does not return */
|
||||
rsr a0, EXCSAVE+XCHAL_DEBUGLEVEL
|
||||
rfi XCHAL_DEBUGLEVEL
|
||||
|
||||
#endif /* Debug exception */
|
||||
|
Loading…
Reference in New Issue
Block a user