summaryrefslogtreecommitdiff
path: root/src/kernel/task
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-08-13 20:34:04 +0200
committerAlexis211 <alexis211@gmail.com>2010-08-13 20:34:04 +0200
commitbea638adc3da8a10f77358542a9a6889d833fb33 (patch)
treea88241280f4175ecbcca7446b6a0156f48ae66b6 /src/kernel/task
parenta75acb568a301903f00d3230467de2a097cce0db (diff)
downloadTCE-bea638adc3da8a10f77358542a9a6889d833fb33.tar.gz
TCE-bea638adc3da8a10f77358542a9a6889d833fb33.zip
Some changes to stack tracing.
Diffstat (limited to 'src/kernel/task')
-rw-r--r--src/kernel/task/idt.c4
-rw-r--r--src/kernel/task/task.c9
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(&regs) != 0) || regs.int_no != 14) {
if (tasking_handleException(&regs) == 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) {