Kernel/x86 - Evil hack to do validation of virtual memory
[tpg/acess2.git] / KernelLand / Kernel / arch / x86_64 / errors.c
index fda3113..81d6466 100644 (file)
@@ -6,6 +6,7 @@
 #include <proc.h>
 #include <mm_virt.h>
 #include <threads_int.h>       // Needed for SSE handling
+#include <debug_hooks.h>
 
 #define MAX_BACKTRACE  6
 
@@ -13,7 +14,6 @@
 extern int     MM_PageFault(tVAddr Addr, Uint ErrorCode, tRegs *Regs);
 extern void    Error_Backtrace(Uint IP, Uint BP);
 extern void    Proc_EnableSSE(void);
-extern void    Threads_Dump(void);
 extern void    Proc_RestoreSSE(Uint32 Data);
 
 // === PROTOTYPES ===
@@ -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

UCC git Repository :: git.ucc.asn.au