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:
Ivan Grokhotkov 2020-11-24 16:38:57 +01:00 committed by Omar Chebib
parent a90dcfba1a
commit 5962b1dc56

View File

@ -64,7 +64,15 @@ void *g_exc_frames[SOC_CPU_CORES_NUM] = {NULL};
*/
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) {
#else
if (true) {
#endif
panic_print_registers(f, core);
panic_print_str("\r\n");
}