diff options
author | dzwdz | 2022-05-03 19:02:56 +0200 |
---|---|---|
committer | dzwdz | 2022-05-03 19:02:56 +0200 |
commit | 600dd0bb30d9d8d5c7645156c1c50ad68ec1b334 (patch) | |
tree | 511b10b0f4481ba532a99a8fc822adbb76d9c760 /src/kernel/panic.h | |
parent | 775e4fd747d567916658b2b26e8e3c5eba6b5a54 (diff) |
kernel: stacktraces on panic()
Diffstat (limited to 'src/kernel/panic.h')
-rw-r--r-- | src/kernel/panic.h | 5 |
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) |