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 If we're going to print a number in hex, ...



details:   https://anonhg.NetBSD.org/src/rev/ff4dad438f0f
branches:  trunk
changeset: 982251:ff4dad438f0f
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Apr 06 13:11:22 2021 +0000

description:
If we're going to print a number in hex, at least put a 0x in front of
it so we can cut'n'paste it into gdb directly.  This has only annoyed
me for 25 or so years...

Wrap a long long while here.

diffstat:

 sys/arch/mips/mips/mips_stacktrace.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (35 lines):

diff -r df0e33ddb603 -r ff4dad438f0f sys/arch/mips/mips/mips_stacktrace.c
--- a/sys/arch/mips/mips/mips_stacktrace.c      Tue Apr 06 12:48:59 2021 +0000
+++ b/sys/arch/mips/mips/mips_stacktrace.c      Tue Apr 06 13:11:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_stacktrace.c,v 1.8 2021/03/29 03:09:42 simonb Exp $       */
+/*     $NetBSD: mips_stacktrace.c,v 1.9 2021/04/06 13:11:22 simonb Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.8 2021/03/29 03:09:42 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.9 2021/04/06 13:11:22 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -504,10 +504,12 @@
 done:
        if (mask & (1 << _R_RA))
                ra = regs[_R_RA];
-       (*printfn)("%#"PRIxVADDR": %s+%"PRIxVADDR" (%"PRIxREGISTER",%"PRIxREGISTER",%"PRIxREGISTER",%"PRIxREGISTER") ra %"PRIxVADDR" sz %d\n",
-               sp, fn_name(subr), pc - subr,
-               regs[_R_A0], regs[_R_A1], regs[_R_A2], regs[_R_A3],
-               ra, stksize);
+       (*printfn)("%#"PRIxVADDR": %s+%#"PRIxVADDR" (%#"PRIxREGISTER","
+           "%#"PRIxREGISTER",%#"PRIxREGISTER",%#"PRIxREGISTER") "
+           "ra %#"PRIxVADDR" sz %d\n",
+           sp, fn_name(subr), pc - subr,
+           regs[_R_A0], regs[_R_A1], regs[_R_A2], regs[_R_A3],
+           ra, stksize);
 
        if (ra) {
                if (pc == ra && stksize == 0)



Home | Main Index | Thread Index | Old Index