summaryrefslogtreecommitdiff
path: root/src/kernel/panic.h
diff options
context:
space:
mode:
authordzwdz2022-05-03 19:02:56 +0200
committerdzwdz2022-05-03 19:02:56 +0200
commit600dd0bb30d9d8d5c7645156c1c50ad68ec1b334 (patch)
tree511b10b0f4481ba532a99a8fc822adbb76d9c760 /src/kernel/panic.h
parent775e4fd747d567916658b2b26e8e3c5eba6b5a54 (diff)
kernel: stacktraces on panic()
Diffstat (limited to 'src/kernel/panic.h')
-rw-r--r--src/kernel/panic.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kernel/panic.h b/src/kernel/panic.h
index c4cd194..8cb32f4 100644
--- a/src/kernel/panic.h
+++ b/src/kernel/panic.h
@@ -3,9 +3,10 @@
#include <kernel/util.h>
#define _panic(type) do { \
- kprintf(" an "type" PANIC! at the "); \
+ kprintf("\nan "type" PANIC! at the "); \
kprintf(__func__); \
- kprintf(" (" __FILE__ ":" NUM2STR(__LINE__) ") "); \
+ kprintf(" (" __FILE__ ":" NUM2STR(__LINE__) ")\n"); \
+ debug_stacktrace(); \
halt_cpu(); \
} while (0)