backtrace on user fault in SPARC port
authorAndrew Waterman <waterman@parcad.millennium.berkeley.edu>
Wed, 27 Jan 2010 21:48:07 +0000 (13:48 -0800)
committerAndrew Waterman <waterman@parcad.millennium.berkeley.edu>
Wed, 27 Jan 2010 21:48:07 +0000 (13:48 -0800)
kern/arch/sparc/trap.c

index 865a716..8a16588 100644 (file)
@@ -165,11 +165,14 @@ unhandled_trap(trapframe_t* state)
        }
        else
        {
-               print_trapframe(state);
                warn("Unhandled trap in user!\nTrap type: %s",buf);
+               print_trapframe(state);
+               backtrace();
+
                assert(current);
                proc_incref(current, 1);
                proc_destroy(current);
+
                panic("I shouldn't have gotten here!");
        }
 }