mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(esp_riscv_trace): Add trace snapshot to the coredump file
This commit is contained in:
@@ -103,6 +103,11 @@ bool panic_memprot_fill_info(panic_info_t *info);
|
||||
*/
|
||||
void panic_disable_all_wdts(void);
|
||||
|
||||
/**
|
||||
* @brief Stop instruction trace encoders on panic
|
||||
*/
|
||||
void esp_panic_handler_inst_trace_stop(void) __attribute__((weak));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -148,6 +148,15 @@ static void panic_handler(void *frame, bool pseudo_excause)
|
||||
kasan_disable_checks();
|
||||
#endif
|
||||
|
||||
#if CONFIG_ESP_RISCV_TRACE_ENABLE
|
||||
/* Stop the instruction trace as early as possible so the capture ends at the
|
||||
crash rather than inside the panic handler. This only stops the encoders.
|
||||
The FIFO flush and snapshot run later at coredump time. */
|
||||
if (esp_panic_handler_inst_trace_stop) {
|
||||
esp_panic_handler_inst_trace_stop();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If watchdogs are enabled, the panic handler runs the risk of getting aborted pre-emptively because
|
||||
* an overzealous watchdog decides to reset it. Hence, we feed the WDTs here.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user