Kernel: Print panic backtrace to both the screen and serial

Previously it would only print the backtrace to serial, which would be
inaccessible if you don't have serial setup.
This commit is contained in:
Luke 2021-08-04 16:52:14 +01:00 committed by Andreas Kling
commit cbbbc38f27
Notes: sideshowbarker 2024-07-18 07:29:14 +09:00
3 changed files with 22 additions and 9 deletions

View file

@ -26,7 +26,7 @@ namespace Kernel {
void __panic(const char* file, unsigned int line, const char* function)
{
critical_dmesgln("at {}:{} in {}", file, line, function);
dump_backtrace();
dump_backtrace(PrintToScreen::Yes);
if (kernel_command_line().boot_mode() == BootMode::SelfTest)
__shutdown();
else