From 7cc8cb68bd508f57ef72143296237bf9d8abd0aa Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Wed, 4 Mar 2020 10:25:49 +0800 Subject: [PATCH] esp_system: suppress reason display on software abort panic --- components/esp_system/panic.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/esp_system/panic.c b/components/esp_system/panic.c index 2a88f22bb1..655da68e96 100644 --- a/components/esp_system/panic.c +++ b/components/esp_system/panic.c @@ -157,7 +157,7 @@ void esp_panic_handler(panic_info_t *info) if (g_panic_abort) { info->description = NULL; info->details = s_panic_abort_details ? print_abort_details : NULL; - info->reason = "SoftwareAbort"; + info->reason = NULL; info->exception = PANIC_EXCEPTION_ABORT; } @@ -184,11 +184,13 @@ void esp_panic_handler(panic_info_t *info) * NULL fields in panic_info_t are not printed. * * */ - panic_print_str("Guru Meditation Error: Core "); - panic_print_dec(info->core); - panic_print_str(" panic'ed ("); - panic_print_str(info->reason); - panic_print_str("). "); + if (info->reason) { + panic_print_str("Guru Meditation Error: Core "); + panic_print_dec(info->core); + panic_print_str(" panic'ed ("); + panic_print_str(info->reason); + panic_print_str("). "); + } if (info->description) { panic_print_str(info->description);