summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_examine.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-01-15 22:41:03 +0000
committerphk <phk@FreeBSD.org>1996-01-15 22:41:03 +0000
commitc3e6222aa59d814018c016139a893ede0ef0d03d (patch)
tree211438af77a23891624f21f01f20a5620899f56d /sys/ddb/db_examine.c
parentcec94deabe34b585be7b0d70cbe9cc117a949334 (diff)
downloadFreeBSD-src-c3e6222aa59d814018c016139a893ede0ef0d03d.zip
FreeBSD-src-c3e6222aa59d814018c016139a893ede0ef0d03d.tar.gz
Get rid of two and a half printf in the kernel.
Add more features to the one remaining to handle the job: + signed quantity. # alternate format - left padding * read width as next arg. n numeric in (argument specified) default radix. Fix the DDB debugger to use these. Use vprintf in debug routine in pcvt. The warnings from gcc may become more wrong and intolerable because of this. Warning: I have not checked the entire source for unsupported or changed constructs, but generally belive that there are only a few. Suggested by: bde
Diffstat (limited to 'sys/ddb/db_examine.c')
-rw-r--r--sys/ddb/db_examine.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c
index 9c8c21c..ce7cff6 100644
--- a/sys/ddb/db_examine.c
+++ b/sys/ddb/db_examine.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_examine.c,v 1.11 1995/12/07 12:44:49 davidg Exp $
+ * $Id: db_examine.c,v 1.12 1995/12/10 19:07:55 bde Exp $
*/
/*
@@ -127,7 +127,7 @@ db_examine(addr, fmt, count)
case 'z': /* signed hex */
value = db_get_value(addr, size, TRUE);
addr += size;
- db_printf("%-*z", width, value);
+ db_printf("%+-*x", width, value);
break;
case 'd': /* signed decimal */
value = db_get_value(addr, size, TRUE);
@@ -205,13 +205,13 @@ db_print_cmd(addr, have_addr, count, modif)
db_printsym((db_addr_t)addr, DB_STGY_ANY);
break;
case 'r':
- db_printf("%11r", addr);
+ db_printf("%+11n", addr);
break;
case 'x':
db_printf("%8x", addr);
break;
case 'z':
- db_printf("%8z", addr);
+ db_printf("%+8x", addr);
break;
case 'd':
db_printf("%11d", addr);
OpenPOWER on IntegriCloud