Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips Print the CP0 status register too in the ...



details:   https://anonhg.NetBSD.org/src/rev/67b4cf948fdf
branches:  trunk
changeset: 379321:67b4cf948fdf
user:      simonb <simonb%NetBSD.org@localhost>
date:      Thu May 27 13:32:54 2021 +0000

description:
Print the CP0 status register too in the debug trap code.

diffstat:

 sys/arch/mips/mips/mips_emul.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 27f687e38d5f -r 67b4cf948fdf sys/arch/mips/mips/mips_emul.c
--- a/sys/arch/mips/mips/mips_emul.c    Thu May 27 11:24:58 2021 +0000
+++ b/sys/arch/mips/mips/mips_emul.c    Thu May 27 13:32:54 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_emul.c,v 1.27 2019/04/06 03:06:26 thorpej Exp $ */
+/*     $NetBSD: mips_emul.c,v 1.28 2021/05/27 13:32:54 simonb 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.27 2019/04/06 03:06:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.28 2021/05/27 13:32:54 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -240,7 +240,10 @@ mips_emul_inst(uint32_t status, uint32_t
 #endif
        default:
 #ifdef DEBUG
-               printf("pid %d (%s): trap: bad insn @ %#"PRIxVADDR" cause %#x insn %#x code %d\n", curproc->p_pid, curproc->p_comm, opc, cause, inst, code);
+               printf("pid %d (%s): trap: bad insn @ %#"PRIxVADDR
+                   " cause %#x status %#"PRIxREGISTER" insn %#x code %d\n",
+                   curproc->p_pid, curproc->p_comm, opc,
+                   cause, tf->tf_regs[_R_SR], inst, code);
 #endif
                tf->tf_regs[_R_CAUSE] = cause;
                tf->tf_regs[_R_BADVADDR] = opc;



Home | Main Index | Thread Index | Old Index