Added CPU exception error messages.

more info about cpu exceptions: http://www.delorie.com/djgpp/doc/dpmi/ch4.5.html

git-svn-id: svn://kolibrios.org@858 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2008-09-04 12:19:29 +00:00
parent 2b13a4a53d
commit 67aca9ac45

View File

@ -160,7 +160,39 @@ show_error_parameters:
mov eax,[CURRENT_TASK]
shl eax, 5
DEBUGF 1, "K : Process - forced terminate PID: %x\n", [CURRENT_TASK + TASKDATA.pid + eax]
DEBUGF 1, "K : Exception : %x Error : xxxxxxxx\n", [error_interrupt]
mov eax, [error_interrupt]
cmp al, 0x08
jne @f
DEBUGF 1, "K : Double fault\n"
jmp defined_error
@@:
cmp al, 0x0a
jne @f
DEBUGF 1, "K : Invalid TSS\n"
jmp defined_error
@@:
cmp al, 0x0b
jne @f
DEBUGF 1, "K : Segment not present\n"
jmp defined_error
@@:
cmp al, 0x0c
jne @f
DEBUGF 1, "K : Stack fault\n"
jmp defined_error
@@:
cmp al, 0x0d
jne @f
DEBUGF 1, "K : General protection fault\n"
jmp defined_error
@@:
cmp al, 0x0e
jne @f
DEBUGF 1, "K : Page fault\n"
jmp defined_error
@@:
DEBUGF 1, "K : Undefined Exception\n"
defined_error:
DEBUGF 1, "K : EAX : %x EBX : %x ECX : %x\n", [esp + 0x20], [esp - 12 + 0x20], [esp - 4 + 0x20]
DEBUGF 1, "K : EDX : %x ESI : %x EDI : %x\n", [esp - 8 + 0x20], [esp - 24 + 0x20], [esp - 28 + 0x20]
DEBUGF 1, "K : EBP : %x EIP : %x ", [esp - 20 + 0x20], [esp + 4 + 0x20]