summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-05-06 20:28:28 +0000
committerpfg <pfg@FreeBSD.org>2016-05-06 20:28:28 +0000
commite14805fa958f0ce97eb840f7c29bd7d1c9bc34df (patch)
treee06996751a1645c44f06af750d6620cc91f41114 /sys/ddb
parent05dac67f853adbb295eaff5bb65b005d958317a1 (diff)
downloadFreeBSD-src-e14805fa958f0ce97eb840f7c29bd7d1c9bc34df.zip
FreeBSD-src-e14805fa958f0ce97eb840f7c29bd7d1c9bc34df.tar.gz
Revert r298938: Change x/a to work similar to gdb.
This badly breaks x/ia: ddb and gdb syntax are quite different and it is unclear if they can be reconciled.
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_examine.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c
index 3eff396..a41fcb5 100644
--- a/sys/ddb/db_examine.c
+++ b/sys/ddb/db_examine.c
@@ -89,6 +89,15 @@ db_examine(db_addr_t addr, char *fmt, int count)
case 'g':
size = 8;
break;
+ case 'a': /* address */
+ size = sizeof(void *);
+ /* always forces a new line */
+ if (db_print_position() != 0)
+ db_printf("\n");
+ db_prev = addr;
+ db_printsym(addr, DB_STGY_ANY);
+ db_printf(":\t");
+ break;
default:
if (db_print_position() == 0) {
/* Print the address. */
@@ -99,18 +108,6 @@ db_examine(db_addr_t addr, char *fmt, int count)
width = size * 4;
switch (c) {
- case 'a': /* address */
- size = sizeof(void *);
- value = db_get_value(addr, size, TRUE);
- addr += size;
- db_printsym(value, DB_STGY_ANY);
- break;
- case 'p':
- size = sizeof(void *);
- value = db_get_value(addr, size, TRUE);
- addr += size;
- db_printf("%p", (void *)value);
- break;
case 'r': /* signed, current radix */
value = db_get_value(addr, size, true);
addr += size;
@@ -176,7 +173,7 @@ db_examine(db_addr_t addr, char *fmt, int count)
default:
break;
}
- if (db_print_position() != 0 || c == 'a' || c == 'p')
+ if (db_print_position() != 0)
db_end_line(1);
break;
}
OpenPOWER on IntegriCloud