Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Aug 2012 08:02:46 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239669 - head/sys/mips/mips
Message-ID:  <201208250802.q7P82ksh003486@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208250802.q7P82ksh003486>