Kernel/x86_64 - Bugfixing
[tpg/acess2.git] / Kernel / arch / x86_64 / errors.c
index 711846c..9ddc950 100644 (file)
@@ -39,6 +39,8 @@ void Error_Handler(tRegs *Regs)
        }
        
        Debug_KernelPanic();
+
+       Error_Backtrace(Regs->RIP, Regs->RBP);
        
        Log("CPU Error %x, Code: 0x%x", Regs->IntNum, Regs->ErrorCode);
 //     Log(" - %s", csaERROR_NAMES[Regs->IntNum]);
@@ -98,8 +100,7 @@ void Error_Backtrace(Uint IP, Uint BP)
        //      return;
        //}
        
-       if( IP > MM_USER_MAX
-        && IP < MM_KERNEL_CODE
+       if( IP > MM_USER_MAX && IP < MM_KERNEL_CODE
         && (MM_MODULE_MIN > IP || IP > MM_MODULE_MAX)
                )
        {
@@ -119,7 +120,7 @@ void Error_Backtrace(Uint IP, Uint BP)
        }
        
        
-       while( MM_GetPhysAddr(BP) && i < MAX_BACKTRACE )
+       while( MM_GetPhysAddr(BP) && MM_GetPhysAddr(BP+8+7) && i < MAX_BACKTRACE )
        {
                //str = Debug_GetSymbol(*(Uint*)(ebp+4), &delta);
                //if(str == NULL)

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