Print stack trace on assertion fail
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
da39ba33a9
commit
b316e3b3b7
@ -118,10 +118,12 @@ static bool g_check_already_failed = false;
|
|||||||
|
|
||||||
[[noreturn]] bool __check_failed(const char* file, const char* line, const char* func, const char* expr)
|
[[noreturn]] bool __check_failed(const char* file, const char* line, const char* func, const char* expr)
|
||||||
{
|
{
|
||||||
|
CPU::disable_interrupts();
|
||||||
if (!g_check_already_failed)
|
if (!g_check_already_failed)
|
||||||
{ // Avoid endlessly failing when trying to report a failed check.
|
{ // Avoid endlessly failing when trying to report a failed check.
|
||||||
g_check_already_failed = true;
|
g_check_already_failed = true;
|
||||||
kerrorln("ERROR: Check failed at %s:%s, in %s: %s", file, line, func, expr);
|
kerrorln("ERROR: Check failed at %s:%s, in %s: %s", file, line, func, expr);
|
||||||
|
CPU::print_stack_trace();
|
||||||
}
|
}
|
||||||
CPU::efficient_halt();
|
CPU::efficient_halt();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user