diff options
author | rwatson <rwatson@FreeBSD.org> | 2012-08-25 08:02:46 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2012-08-25 08:02:46 +0000 |
commit | c0dc7388a9278146d7a5a958178a26c24cf1c4f1 (patch) | |
tree | 13f8ec2a614e436fa0da09306eba282cacd0a752 /sys | |
parent | bf236ce6cc4b1ff79205814d01cc34de80949a8d (diff) | |
download | FreeBSD-src-c0dc7388a9278146d7a5a958178a26c24cf1c4f1.zip FreeBSD-src-c0dc7388a9278146d7a5a958178a26c24cf1c4f1.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/mips/mips/trap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c index a60701d..7254d4f 100644 --- a/sys/mips/mips/trap.c +++ b/sys/mips/mips/trap.c @@ -1465,15 +1465,17 @@ log_bad_page_fault(char *msg, struct trapframe *frame, int trap_type) 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 */ |