mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 17:48:40 +00:00
Distinguish trusted vs stack-scanned frames in RISC-V output
On RISC-V, register-sourced entries (MEPC/RA) are labeled "backtrace" while stack-scanned entries are labeled "stack scan" to help users identify which frames are most trustworthy. Co-Authored-By: J. Nick Koston <nick@koston.org>
This commit is contained in:
co-authored by
J. Nick Koston
parent
8eea2ce7ca
commit
19c3187bb5
@@ -116,7 +116,12 @@ void crash_handler_log() {
|
||||
if (i >= s_raw_crash_data.reg_frame_count && !is_return_addr(addr))
|
||||
continue;
|
||||
#endif
|
||||
ESP_LOGE(TAG, " BT%d: 0x%08" PRIX32 " (backtrace)", bt_num++, addr);
|
||||
#if CONFIG_IDF_TARGET_ARCH_RISCV
|
||||
const char *source = (i < s_raw_crash_data.reg_frame_count) ? "backtrace" : "stack scan";
|
||||
#else
|
||||
const char *source = "backtrace";
|
||||
#endif
|
||||
ESP_LOGE(TAG, " BT%d: 0x%08" PRIX32 " (%s)", bt_num++, addr, source);
|
||||
}
|
||||
// Build addr2line hint with all captured addresses for easy copy-paste
|
||||
char hint[256];
|
||||
|
||||
Reference in New Issue
Block a user