From 8aa04e82a0d40f20b63b48ec45551b5ab4df053e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= Date: Tue, 22 Sep 2015 14:54:55 +0200 Subject: [PATCH] core/panic: call cpu_print_last_instruction before printing other messages --- core/panic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/panic.c b/core/panic.c index d8ecd5867e..c1f3c1f581 100644 --- a/core/panic.c +++ b/core/panic.c @@ -48,13 +48,13 @@ NORETURN void core_panic(core_panic_t crash_code, const char *message) if (crashed == 0) { /* print panic message to console (if possible) */ crashed = 1; - puts("*** RIOT kernel panic"); - puts(message); #ifndef NDEBUG if (crash_code == PANIC_ASSERT_FAIL) { cpu_print_last_instruction(); } #endif + puts("*** RIOT kernel panic"); + puts(message); #ifdef DEVELHELP #ifdef MODULE_PS ps();