Kernel: Move dump_stacktrace from panic -> debug
This commit is contained in:
@@ -28,5 +28,6 @@
|
||||
|
||||
namespace Debug
|
||||
{
|
||||
void DumpStackTrace();
|
||||
void putchar(char);
|
||||
}
|
||||
@@ -8,15 +8,13 @@
|
||||
namespace Kernel
|
||||
{
|
||||
|
||||
void dump_stacktrace();
|
||||
|
||||
template<typename... Args>
|
||||
__attribute__((__noreturn__))
|
||||
static void PanicImpl(const char* file, int line, const char* message, Args... args)
|
||||
{
|
||||
kprintln("\e[31mKernel panic at {}:{}\e[m", file, line);
|
||||
derrorln("Kernel panic at {}:{}", file, line);
|
||||
derrorln(message, args...);
|
||||
dump_stacktrace();
|
||||
Debug::DumpStackTrace();
|
||||
asm volatile("cli");
|
||||
for (;;)
|
||||
asm volatile("hlt");
|
||||
|
||||
Reference in New Issue
Block a user