diff options
Diffstat (limited to 'src/kernel/task')
-rw-r--r-- | src/kernel/task/idt.c | 4 | ||||
-rw-r--r-- | src/kernel/task/task.c | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/kernel/task/idt.c b/src/kernel/task/idt.c index caf9fb0..6aa16e0 100644 --- a/src/kernel/task/idt.c +++ b/src/kernel/task/idt.c @@ -75,12 +75,12 @@ static struct irq_waiter { void idt_isrHandler(struct registers regs) { if ((regs.int_no == 14 && paging_fault(®s) != 0) || regs.int_no != 14) { if (tasking_handleException(®s) == 0) { - monitor_write(" >> >> SOMETHING BAD HAPPENNED << <<\n"); + monitor_write("\n >> >> SOMETHING BAD HAPPENNED << <<\n"); monitor_write("Unhandled exception "); monitor_writeHex(regs.int_no); monitor_write(" @"); monitor_writeHex(regs.eip); monitor_put('\n'); - PANIC("unhandled exception"); + PANIC("Unhandled Exception"); } } } diff --git a/src/kernel/task/task.c b/src/kernel/task/task.c index 8dcf713..7153d85 100644 --- a/src/kernel/task/task.c +++ b/src/kernel/task/task.c @@ -107,13 +107,8 @@ uint32_t tasking_handleException(struct registers *regs) { monitor_write(exception_messages[regs->int_no]); monitor_write(" eip:"); monitor_writeHex(regs->eip); if (regs->eip >= 0xE0000000) { - monitor_write("\n Stack trace :"); - uint32_t *stack = (uint32_t*)regs->ebp, i; - for (i = 0; i < 5 && stack > 0xE0000000 && stack < (regs->useresp + 0x8000); i++) { - monitor_write("\nframe@"); monitor_writeHex(stack); - monitor_write(" next:"); monitor_writeHex(stack[0]); monitor_write(" ret:"); monitor_writeHex(stack[1]); - stack = (uint32_t*)stack[0]; - } + monitor_write("\n Exception stack trace :"); + stack_trace(regs->ebp); PANIC("Kernel error'd."); } if (regs->int_no == 14) { |