Files
serenity/Kernel/Prekernel/Assertions.cpp
Liav A. f6e01aae9a Prekernel: Add support for assertion printing
This is done by using a FixedStringBuffer as the foundation to perform
string formatting, which ensures that we avoid memory allocations in
the prekernel stage.
2024-06-29 19:56:45 +02:00

15 lines
372 B
C++

/*
* Copyright (c) 2024, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Prekernel/DebugOutput.h>
void __assertion_failed(char const* msg, char const* file, unsigned line, char const* func)
{
write_debug_output("ASSERTION FAILED: {}\n", msg);
write_debug_output("{}:{} in {}\n", file, line, func);
halt();
}