mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 21:54:33 +02:00
panic: print register dump on abort for RISC-V
Register values are necessary to perform host-side backtracing on RISC-V. Print them in case of an abort as well.
This commit is contained in:
committed by
Omar Chebib
parent
a90dcfba1a
commit
5962b1dc56
@@ -64,7 +64,15 @@ void *g_exc_frames[SOC_CPU_CORES_NUM] = {NULL};
|
|||||||
*/
|
*/
|
||||||
static void print_state_for_core(const void *f, int core)
|
static void print_state_for_core(const void *f, int core)
|
||||||
{
|
{
|
||||||
|
/* On Xtensa (with Window ABI), register dump is not required for backtracing.
|
||||||
|
* Don't print it on abort to reduce clutter.
|
||||||
|
* On other architectures, register values need to be known for backtracing.
|
||||||
|
*/
|
||||||
|
#if defined(__XTENSA__) && defined(XCHAL_HAVE_WINDOWED)
|
||||||
if (!g_panic_abort) {
|
if (!g_panic_abort) {
|
||||||
|
#else
|
||||||
|
if (true) {
|
||||||
|
#endif
|
||||||
panic_print_registers(f, core);
|
panic_print_registers(f, core);
|
||||||
panic_print_str("\r\n");
|
panic_print_str("\r\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user