diff options
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 :*/ + |