Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hppa/hppa Use PSW_BITS to decode the bits of the PS...



details:   https://anonhg.NetBSD.org/src/rev/d36967085f15
branches:  trunk
changeset: 778499:d36967085f15
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Mar 29 20:31:49 2012 +0000

description:
Use PSW_BITS to decode the bits of the PSW in db_dump_trap

diffstat:

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

diffs (37 lines):

diff -r f673869965ee -r d36967085f15 sys/arch/hppa/hppa/db_machdep.c
--- a/sys/arch/hppa/hppa/db_machdep.c   Thu Mar 29 19:27:05 2012 +0000
+++ b/sys/arch/hppa/hppa/db_machdep.c   Thu Mar 29 20:31:49 2012 +0000
@@ -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 @@
        const char *cp = modif;
        bool lwpaddr = false;
        char c;
+       char buf[64];
 
        tf = DDB_REGS;
        while ((c = *cp++) != 0) {
@@ -186,7 +187,9 @@
        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 */



Home | Main Index | Thread Index | Old Index