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 target addresses similar to aarch64...



details:   https://anonhg.NetBSD.org/src/rev/536a3399e249
branches:  trunk
changeset: 961586:536a3399e249
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Apr 12 11:35:22 2021 +0000

description:
Print target addresses similar to aarch64 as "address <sym+off>"
instead of "<sym+off> [addr:address]".  Uses less columns, a bit
easier on the eyes.

diffstat:

 sys/arch/mips/mips/db_disasm.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (37 lines):

diff -r bd2f710de601 -r 536a3399e249 sys/arch/mips/mips/db_disasm.c
--- a/sys/arch/mips/mips/db_disasm.c    Mon Apr 12 09:51:49 2021 +0000
+++ b/sys/arch/mips/mips/db_disasm.c    Mon Apr 12 11:35:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_disasm.c,v 1.41 2021/04/07 14:27:39 simonb Exp $    */
+/*     $NetBSD: db_disasm.c,v 1.42 2021/04/12 11:35:22 simonb Exp $    */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.41 2021/04/07 14:27:39 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.42 2021/04/12 11:35:22 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -910,13 +910,11 @@
        sym = db_search_symbol(loc, DB_STGY_ANY, &diff);
        db_symbol_values(sym, &symname, 0);
 
+       db_printf("%#"PRIxVADDR, loc);
        if (symname) {
-               if (diff == 0)
-                       db_printf("%s", symname);
-               else
-                       db_printf("<%s+%#"DDB_EXPR_FMT"x>", symname, diff);
-               db_printf("\t[addr:%#"PRIxVADDR"]", loc);
-       } else {
-               db_printf("%#"PRIxVADDR, loc);
+               db_printf(" <%s", symname);
+               if (diff != 0)
+                       db_printf("+%#"DDB_EXPR_FMT"x", diff);
+               db_printf(">");
        }
 }



Home | Main Index | Thread Index | Old Index