diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-06 18:39:12 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-06 18:39:12 +0100 |
commit | ff27e3d5ca61fb6234b0876dc3368d0e5dfc5a95 (patch) | |
tree | e7945b5cae3925ae50082da7b80e9b3caf914fa4 /kernel/l0/idt.c | |
parent | 274765f7daa3cc1094f9f26196fcf2b9a5289ee2 (diff) | |
download | kogata-ff27e3d5ca61fb6234b0876dc3368d0e5dfc5a95.tar.gz kogata-ff27e3d5ca61fb6234b0876dc3368d0e5dfc5a95.zip |
Trying to track an annoying bug.
Diffstat (limited to 'kernel/l0/idt.c')
-rw-r--r-- | kernel/l0/idt.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/l0/idt.c b/kernel/l0/idt.c index 3bfcfc5..2d7b3bc 100644 --- a/kernel/l0/idt.c +++ b/kernel/l0/idt.c @@ -66,12 +66,6 @@ static isr_handler_t ex_handlers[32] = {0}; /* Called in interrupt.s when an exception fires (interrupt 0 to 31) */ void idt_exHandler(registers_t *regs) { - /*dbg_printf("/ Exception %i\n", regs->int_no);*/ - /*dbg_printf("| EAX: 0x%p EBX: 0x%p ECX: 0x%p EDX: 0x%p\n", regs->eax, regs->ebx, regs->ecx, regs->edx);*/ - /*dbg_printf("| EDI: 0x%p ESI: 0x%p ESP: 0x%p EBP: 0x%p\n", regs->edi, regs->esi, regs->esp, regs->ebp);*/ - /*dbg_printf("| EIP: 0x%p CS : 0x%p DS : 0x%p SS : 0x%p\n", regs->eip, regs->cs, regs->ds, regs->ss);*/ - /*dbg_printf("\\ EFl: 0x%p I# : 0x%p Err: 0x%p\n", regs->eflags, regs->int_no, regs->err_code);*/ - if (ex_handlers[regs->int_no] != 0) { ex_handlers[regs->int_no](regs); } @@ -194,4 +188,13 @@ void idt_set_ex_handler(int number, isr_handler_t func) { } } +void dbg_dump_registers(registers_t *regs) { + dbg_printf("/ Exception %i\n", regs->int_no); + dbg_printf("| EAX: 0x%p EBX: 0x%p ECX: 0x%p EDX: 0x%p\n", regs->eax, regs->ebx, regs->ecx, regs->edx); + dbg_printf("| EDI: 0x%p ESI: 0x%p ESP: 0x%p EBP: 0x%p\n", regs->edi, regs->esi, regs->esp, regs->ebp); + dbg_printf("| EIP: 0x%p CS : 0x%p DS : 0x%p SS : 0x%p\n", regs->eip, regs->cs, regs->ds, regs->ss); + dbg_printf("\\ EFl: 0x%p I# : 0x%p Err: 0x%p\n", regs->eflags, regs->int_no, regs->err_code); +} + /* vim: set ts=4 sw=4 tw=0 noet :*/ + |