[esp32] Record the PC for cache error and interrupt watchdog crashes (#20415)

This commit is contained in:
J. Nick Koston
2026-10-09 00:25:11 +00:00
committed by GitHub
parent 5ca272b262
commit 0d596a20f8
@@ -531,6 +531,9 @@ void IRAM_ATTR __wrap_esp_panic_handler(panic_info_t *info) {
// Xtensa: walk the backtrace using the public API
if (info->frame != nullptr) {
auto *xt_frame = (XtExcFrame *) info->frame;
// IDF leaves addr unset for SoC-level panics (cache error, interrupt WDT)
if (info->pseudo_excause)
s_raw_crash_data.pc = xt_frame->pc;
if (!g_panic_abort) {
// Abort-class frames carry no useful cause/vaddr: TWDT task snapshots
// never wrote them and abort() traps describe only the synthetic trap.