summaryrefslogtreecommitdiff
path: root/trap.c
diff options
context:
space:
mode:
save process name for debugging
Diffstat (limited to 'trap.c')
-rw-r--r--trap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trap.c b/trap.c
index aafaadf..0625e56 100644
--- a/trap.c
+++ b/trap.c
@@ -80,10 +80,10 @@ trap(struct trapframe *tf)
break;
default:
- if(curproc[cpu()]) {
+ if(cp) {
// Assume process divided by zero or dereferenced null, etc.
- cprintf("pid %d: unhandled trap %d on cpu %d eip %x -- kill proc\n",
- curproc[cpu()]->pid, v, cpu(), tf->eip);
+ cprintf("pid %d %s: unhandled trap %d on cpu %d eip %x -- kill proc\n",
+ cp->pid, cp->name, v, cpu(), tf->eip);
proc_exit();
}