mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +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
					
				
					 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…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timon Kruiper
						Timon Kruiper