mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
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.
This commit is contained in:
parent
a9ca75c98b
commit
c5e55f4737
Notes:
sideshowbarker
2024-07-19 18:45:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c5e55f4737f
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue