diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-22 13:07:06 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-22 13:07:06 +0200 |
commit | c5e55f4737fcd0f65661dd113dc061626af9d388 (patch) | |
tree | 46996ea0d3b3cf11746480ec86b077953555b67c /Kernel/kassert.h | |
parent | a9ca75c98b8e775cb48204c56d6ad02b272d6767 (diff) | |
download | serenity-c5e55f4737fcd0f65661dd113dc061626af9d388.zip |
Use UD2 instead of CLI;HLT for CRASH().
This way the kernel prints out a nice register dump so we can find
out where we crashed.
Diffstat (limited to 'Kernel/kassert.h')
-rw-r--r-- | Kernel/kassert.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/kassert.h b/Kernel/kassert.h index 1ddabe6362..621aa9f4ec 100644 --- a/Kernel/kassert.h +++ b/Kernel/kassert.h @@ -2,7 +2,7 @@ #include "VGA.h" -#define CRASH() do { asm volatile("cli;hlt"); } while(0) +#define CRASH() do { asm volatile("ud2"); } while(0) #define ASSERT(x) do { if (!(x)) { kprintf("ASSERTION FAILED: " #x "\n%s:%u in %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); CRASH(); } } while(0) #define RELEASE_ASSERT(x) do { if (!(x)) CRASH(); } while(0) #define ASSERT_NOT_REACHED() ASSERT(false) |