summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2022-05-03 02:08:47 +0200
committerAndreas Kling <kling@serenityos.org>2022-05-03 21:53:36 +0200
commit2cf36a1ca232f0e296ea81fb6870d823a33ebdf0 (patch)
treecd2341eba8359a3a88384adc356ce4f9c3fee109 /Kernel
parent771d0719ea230f8418726092784779ec253b736f (diff)
downloadserenity-2cf36a1ca232f0e296ea81fb6870d823a33ebdf0.zip
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.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Arch/aarch64/init.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Kernel/Arch/aarch64/init.cpp b/Kernel/Arch/aarch64/init.cpp
index ddbe4308e7..19577ea37b 100644
--- a/Kernel/Arch/aarch64/init.cpp
+++ b/Kernel/Arch/aarch64/init.cpp
@@ -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)