Module Name: src
Committed By: matt
Date: Fri Jan 22 07:05:29 UTC 2010
Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mips_emul.c
Log Message:
in MachEmulateBranch, print useful information on panics
To generate a diff of this commit:
cvs rdiff -u -r1.14.78.5 -r1.14.78.6 src/sys/arch/mips/mips/mips_emul.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/mips/mips_emul.c
diff -u src/sys/arch/mips/mips/mips_emul.c:1.14.78.5 src/sys/arch/mips/mips/mips_emul.c:1.14.78.6
--- src/sys/arch/mips/mips/mips_emul.c:1.14.78.5 Sat Nov 14 21:52:08 2009
+++ src/sys/arch/mips/mips/mips_emul.c Fri Jan 22 07:05:28 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_emul.c,v 1.14.78.5 2009/11/14 21:52:08 matt Exp $ */
+/* $NetBSD: mips_emul.c,v 1.14.78.6 2010/01/22 07:05:28 matt Exp $ */
/*
* Copyright (c) 1999 Shuichiro URATA. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.14.78.5 2009/11/14 21:52:08 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.14.78.6 2010/01/22 07:05:28 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -115,8 +115,8 @@
else if (allowNonBranch)
nextpc = instpc + 4;
else
- panic("MachEmulateBranch: Non-branch instruction at "
- "pc 0x%lx", (long)instpc);
+ panic("%s: %s instruction %08x at pc 0x%"PRIxVADDR,
+ __func__, "non-branch", inst.word, instpc);
break;
case OP_BCOND:
@@ -142,7 +142,8 @@
break;
default:
- panic("MachEmulateBranch: Bad branch cond");
+ panic("%s: %s instruction 0x%08x at pc 0x%"PRIxVADDR,
+ __func__, "bad branch", inst.word, instpc);
}
break;
@@ -197,13 +198,14 @@
else if (allowNonBranch)
nextpc = instpc + 4;
else
- panic("MachEmulateBranch: Bad COP1 branch instruction");
+ panic("%s: %s instruction 0x%08x at pc 0x%"PRIxVADDR,
+ __func__, "bad COP1 branch", inst.word, instpc);
break;
default:
if (!allowNonBranch)
- panic("MachEmulateBranch: Non-branch instruction at "
- "pc 0x%lx", (long)instpc);
+ panic("%s: %s instruction 0x%08x at pc 0x%"PRIxVADDR,
+ __func__, "non-branch", inst.word, instpc);
nextpc = instpc + 4;
}
return nextpc;