aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorThomas Moestl <tmm@FreeBSD.org>2002-06-25 15:59:24 +0000
committerThomas Moestl <tmm@FreeBSD.org>2002-06-25 15:59:24 +0000
commit358ad31d9a1e2ff8baa59c9906614cadbc2d0dfb (patch)
tree4d6977f3a048ee8e56ea149de36b759c69d81766 /sys
parent218fd301cd4a4a0fe19466109e43e5232d1ea95b (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/ddb/db_examine.c7
-rw-r--r--sys/ddb/db_expr.c2
2 files changed, 3 insertions, 6 deletions
diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c
index dd1cadd80260..377316a2edcb 100644
--- a/sys/ddb/db_examine.c
+++ b/sys/ddb/db_examine.c
@@ -83,26 +83,22 @@ db_examine(addr, fmt, count)
while (--count >= 0) {
fp = fmt;
size = 4;
- width = 16;
while ((c = *fp++) != 0) {
switch (c) {
case 'b':
size = 1;
- width = 4;
break;
case 'h':
size = 2;
- width = 8;
break;
case 'l':
size = 4;
- width = 16;
break;
case 'g':
size = 8;
- width = 32;
break;
case 'a': /* address */
+ size = sizeof(void *);
/* always forces a new line */
if (db_print_position() != 0)
db_printf("\n");
@@ -118,6 +114,7 @@ db_examine(addr, fmt, count)
db_prev = addr;
}
+ width = size * 4;
switch (c) {
case 'r': /* signed, current radix */
value = db_get_value(addr, size, TRUE);
diff --git a/sys/ddb/db_expr.c b/sys/ddb/db_expr.c
index 850121b42eae..eb627e7bf0dd 100644
--- a/sys/ddb/db_expr.c
+++ b/sys/ddb/db_expr.c
@@ -119,7 +119,7 @@ db_unary(valuep)
db_error("Syntax error\n");
/*NOTREACHED*/
}
- *valuep = db_get_value((db_addr_t)*valuep, sizeof(int), FALSE);
+ *valuep = db_get_value((db_addr_t)*valuep, sizeof(void *), FALSE);
return (TRUE);
}
db_unread_token(t);