Module Name: src
Committed By: skrll
Date: Thu Mar 29 20:31:49 UTC 2012
Modified Files:
src/sys/arch/hppa/hppa: db_machdep.c
Log Message:
Use PSW_BITS to decode the bits of the PSW in db_dump_trap
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/hppa/db_machdep.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/hppa/hppa/db_machdep.c
diff -u src/sys/arch/hppa/hppa/db_machdep.c:1.5 src/sys/arch/hppa/hppa/db_machdep.c:1.6
--- src/sys/arch/hppa/hppa/db_machdep.c:1.5 Wed Jan 18 09:35:48 2012
+++ src/sys/arch/hppa/hppa/db_machdep.c Thu Mar 29 20:31:49 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.5 2012/01/18 09:35:48 skrll Exp $ */
+/* $NetBSD: db_machdep.c,v 1.6 2012/03/29 20:31:49 skrll Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.5 2012/01/18 09:35:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.6 2012/03/29 20:31:49 skrll Exp $");
#include <sys/param.h>
#include <sys/lwp.h>
@@ -130,6 +130,7 @@ db_dump_trap(db_expr_t addr, bool have_a
const char *cp = modif;
bool lwpaddr = false;
char c;
+ char buf[64];
tf = DDB_REGS;
while ((c = *cp++) != 0) {
@@ -186,7 +187,9 @@ db_dump_trap(db_expr_t addr, bool have_a
db_printf("\n");
db_printf("Other state\n");
db_printf("eiem: %08x\n", tf->tf_eiem);
- db_printf("ipsw: %08x\n", tf->tf_ipsw);
+
+ snprintb(buf, sizeof(buf), PSW_BITS, tf->tf_ipsw);
+ db_printf("ipsw: %s\n", buf);
db_printf("flags: %08x\n", tf->tf_flags);
db_printf("sar: %08x\n", tf->tf_sar);
db_printf("pidr1: %08x\n", tf->tf_pidr1); /* cr8 */