Author: rwatson
Date: Sat Aug 25 08:02:46 2012
New Revision: 239669
URL: http://svn.freebsd.org/changeset/base/239669

Log:
  On MIPS, when printing page fault information for an unexpected exception
  type, explicitly print out "unknown" rather than the empty string, and
  include the exception type number for ease of debugging.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/mips/mips/trap.c

Modified: head/sys/mips/mips/trap.c
==============================================================================
--- head/sys/mips/mips/trap.c   Sat Aug 25 07:48:52 2012        (r239668)
+++ head/sys/mips/mips/trap.c   Sat Aug 25 08:02:46 2012        (r239669)
@@ -1465,15 +1465,17 @@ log_bad_page_fault(char *msg, struct tra
                read_or_write = "read";
                break;
        default:
-               read_or_write = "";
+               read_or_write = "unknown";
        }
 
        pc = frame->pc + (DELAYBRANCH(frame->cause) ? 4 : 0);
-       log(LOG_ERR, "%s: pid %d tid %ld (%s), uid %d: pc %#jx got a %s fault 
at %#jx\n",
+       log(LOG_ERR, "%s: pid %d tid %ld (%s), uid %d: pc %#jx got a %s fault "
+           "(type %#x) at %#jx\n",
            msg, p->p_pid, (long)td->td_tid, p->p_comm,
            p->p_ucred ? p->p_ucred->cr_uid : -1,
            (intmax_t)pc,
            read_or_write,
+           trap_type,
            (intmax_t)frame->badvaddr);
 
        /* log registers in trap frame */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to