opuntiaOS - an operating system targeting x86 and ARMv7
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[kernel][libkern] Dump kernel at assert

+6 -4
+6 -4
kernel/include/libkern/kassert.h
··· 15 15 #include <platform/generic/system.h> 16 16 #include <platform/generic/tasking/trapframe.h> 17 17 18 - #define ASSERT(x) \ 19 - if (unlikely(!(x))) { \ 20 - log("kassert at line %d in %s\n", __LINE__, __FILE__); \ 21 - system_stop(); \ 18 + #define ASSERT(x) \ 19 + if (unlikely(!(x))) { \ 20 + log("Kernel assertion failed: %s, function %s, file %s:%d\n", #x, __func__, __FILE__, __LINE__); \ 21 + extern int dump_kernel(const char* err); \ 22 + dump_kernel(NULL); \ 23 + system_stop(); \ 22 24 } 23 25 24 26 void kpanic(const char* msg) NORETURN;