summaryrefslogtreecommitdiff
path: root/sys/ddb
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-09-01 11:54:04 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-09-01 11:54:04 +0000
commit6b4c2d9544bd2d81726ec57fe4904a2d03fa1d83 (patch)
treea3d8fa3c05cd54bdea3588266ed873296ec2164e /sys/ddb
parent8aafb2b76da71e0b02fee84b1245dddd4bf346bb (diff)
Use db_format() instead of ddb-specific format specifiers; no functional
change inteded. ok ray@
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_command.c6
-rw-r--r--sys/ddb/db_examine.c9
2 files changed, 10 insertions, 5 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 2c42fb89a8d..ee9d2380575 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_command.c,v 1.45 2006/09/30 14:31:28 mickey Exp $ */
+/* $OpenBSD: db_command.c,v 1.46 2007/09/01 11:54:03 miod Exp $ */
/* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */
/*
@@ -570,6 +570,7 @@ db_fncall(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
db_expr_t retval;
db_expr_t (*func)(db_expr_t, ...);
int t;
+ char tmpfmt[24];
if (!db_expression(&fn_addr)) {
db_printf("Bad function\n");
@@ -611,7 +612,8 @@ db_fncall(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
retval = (*func)(args[0], args[1], args[2], args[3], args[4],
args[5], args[6], args[7], args[8], args[9]);
- db_printf("%#n\n", retval);
+ db_printf("%s\n", db_format(tmpfmt, sizeof tmpfmt, retval,
+ DB_FORMAT_N, 1, 0));
}
void
diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c
index 10f8913ccfc..6a1f101fe43 100644
--- a/sys/ddb/db_examine.c
+++ b/sys/ddb/db_examine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_examine.c,v 1.13 2007/03/15 17:10:22 miod Exp $ */
+/* $OpenBSD: db_examine.c,v 1.14 2007/09/01 11:54:03 miod Exp $ */
/* $NetBSD: db_examine.c,v 1.11 1996/03/30 22:30:07 christos Exp $ */
/*
@@ -186,6 +186,7 @@ void
db_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
db_expr_t value;
+ char tmpfmt[24];
if (modif[0] != '\0')
db_print_format = modif[0];
@@ -195,13 +196,15 @@ db_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
db_printsym((db_addr_t)addr, DB_STGY_ANY, db_printf);
break;
case 'r':
- db_printf("%*r", sizeof(db_expr_t) * 2 * 6 / 5, addr);
+ db_printf("%s", db_format(tmpfmt, sizeof tmpfmt, addr,
+ DB_FORMAT_R, 0, sizeof(db_expr_t) * 2 * 6 / 5));
break;
case 'x':
db_printf("%*x", sizeof(db_expr_t) * 2, addr);
break;
case 'z':
- db_printf("%*z", sizeof(db_expr_t) * 2, addr);
+ db_printf("%s", db_format(tmpfmt, sizeof tmpfmt, addr,
+ DB_FORMAT_Z, 0, sizeof(db_expr_t) * 2));
break;
case 'd':
db_printf("%*d", sizeof(db_expr_t) * 2 * 6 / 5, addr);