Kernel: Dump kernel stack trace on assertion failure.

This commit is contained in:
Andreas Kling 2019-03-06 14:05:41 +01:00
parent 7f6c81d90f
commit e53cef02d5
Notes: sideshowbarker 2024-07-19 15:10:03 +09:00

View file

@ -483,6 +483,8 @@ void __assertion_failed(const char* msg, const char* file, unsigned line, const
{
asm volatile("cli");
kprintf("ASSERTION FAILED: %s\n%s:%u in %s\n", msg, file, line, func);
extern void dump_backtrace(bool);
dump_backtrace(true);
asm volatile("hlt");
for (;;);
}