1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #3930 from cgundogan/pr/assert/move_last_instr

core/panic: call cpu_print_last_instruction before printing other things
This commit is contained in:
Oleg Hahm 2015-09-22 19:46:49 +02:00
commit 4232f2dca7

View File

@ -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();