diff --git a/KernelLand/Kernel/arch/x86_64/errors.c b/KernelLand/Kernel/arch/x86_64/errors.c index fda3113941bd816a6f1cf5a31f6df53784ea8966..0681d5eaa7b3c713da0d05452be546427d5c51a9 100644 --- a/KernelLand/Kernel/arch/x86_64/errors.c +++ b/KernelLand/Kernel/arch/x86_64/errors.c @@ -109,6 +109,13 @@ void Error_Handler(tRegs *Regs) __asm__ __volatile__ ("hlt"); } +void Proc_PrintBacktrace(void) +{ + Uint64 *rbp; + __asm__ __volatile__ ("mov %%rbp, %0" : "=r" (rbp)); + Error_Backtrace( rbp[1], rbp[0] ); +} + /** * \fn void Error_Backtrace(Uint eip, Uint ebp) * \brief Unrolls the stack to trace execution