diff options
author | Marvin Borner | 2020-04-15 21:17:41 +0200 |
---|---|---|
committer | Marvin Borner | 2020-04-15 21:17:41 +0200 |
commit | e07894d21a0101b10ee6ad851773b725cbb9150d (patch) | |
tree | 75631b318a9403395fbb3b40abdade8a475cd30b /src/kernel/interrupts/isr.c | |
parent | aa3d1b4689e6dadd982fe1e5ca8af69ca39c617d (diff) |
Used macro magic to implement function-based logs
Diffstat (limited to 'src/kernel/interrupts/isr.c')
-rw-r--r-- | src/kernel/interrupts/isr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c index 61d0fcc..c34d951 100644 --- a/src/kernel/interrupts/isr.c +++ b/src/kernel/interrupts/isr.c @@ -110,10 +110,9 @@ void fault_handler(struct regs *r) uint32_t faulting_address; asm("mov %%cr2, %0" : "=r"(faulting_address)); - serial_printf( - "\n[DEBUG]\nEIP: 0x%x\nEAX: 0x%x\nEBX: 0x%x\nECX: 0x%x\nEDX: 0x%x\nESP: 0x%x\nFault addr: 0x%x\nErr flag: 0x%x\nErr code: 0x%x\nINT code: 0x%x\nINT msg: %s", - r->eip, r->eax, r->ebx, r->ecx, r->edx, r->esp, faulting_address, r->eflags, - r->err_code, r->int_no, exception_messages[r->int_no]); + log("\n[DEBUG]\nEIP: 0x%x\nEAX: 0x%x\nEBX: 0x%x\nECX: 0x%x\nEDX: 0x%x\nESP: 0x%x\nFault addr: 0x%x\nErr flag: 0x%x\nErr code: 0x%x\nINT code: 0x%x\nINT msg: %s", + r->eip, r->eax, r->ebx, r->ecx, r->edx, r->esp, faulting_address, r->eflags, + r->err_code, r->int_no, exception_messages[r->int_no]); if (r->int_no <= 32) { char *message = (char *)exception_messages[r->int_no]; @@ -128,4 +127,4 @@ void fault_handler(struct regs *r) panic("Unknown Exception"); } } -}
\ No newline at end of file +} |