mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Kernel: Panic when an assertion is failed in aarch64 Kernel
This in turn makes sure that we get a nice backtrace when an assertion failed, or when a VERIFY_NOT_REACHED() is hit.
This commit is contained in:
parent
771d0719ea
commit
2cf36a1ca2
Notes:
sideshowbarker
2024-07-17 11:21:11 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/2cf36a1ca2 Pull-request: https://github.com/SerenityOS/serenity/pull/13895 Reviewed-by: https://github.com/nico
1 changed files with 5 additions and 1 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <Kernel/Arch/aarch64/RPi/Timer.h>
|
||||
#include <Kernel/Arch/aarch64/RPi/UART.h>
|
||||
#include <Kernel/KSyms.h>
|
||||
#include <Kernel/Panic.h>
|
||||
|
||||
static void draw_logo();
|
||||
static u32 query_firmware_version();
|
||||
|
@ -91,12 +92,15 @@ void __stack_chk_fail()
|
|||
Prekernel::halt();
|
||||
}
|
||||
|
||||
using namespace Kernel;
|
||||
|
||||
[[noreturn]] void __assertion_failed(char const* msg, char const* file, unsigned line, char const* func)
|
||||
{
|
||||
critical_dmesgln("ASSERTION FAILED: {}", msg);
|
||||
critical_dmesgln("{}:{} in {}", file, line, func);
|
||||
|
||||
Prekernel::halt();
|
||||
// Used for printing a nice backtrace!
|
||||
PANIC("Aborted");
|
||||
}
|
||||
|
||||
extern "C" void exception_common(TrapFrame const* const trap_frame)
|
||||
|
|
Loading…
Reference in a new issue