From bea638adc3da8a10f77358542a9a6889d833fb33 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Fri, 13 Aug 2010 20:34:04 +0200 Subject: Some changes to stack tracing. --- src/kernel/task/task.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/kernel/task/task.c') 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) { -- cgit v1.2.3