diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-05-14 16:13:49 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-05-14 16:13:49 +0000 |
commit | f3d289f9dfa966854e10f6c091c6770dde94a513 (patch) | |
tree | da129e23181be486edfff8c75daa33a22354464c | |
parent | 35b5cf41ece181531dfe61c047144502b2323573 (diff) |
Use db_format in db_printsym (we'll want to be able to use printf in it soon).
-rw-r--r-- | sys/ddb/db_sym.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index fb8590696f8..18f4bf32dca 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_sym.c,v 1.26 2002/05/13 15:38:58 art Exp $ */ +/* $OpenBSD: db_sym.c,v 1.27 2002/05/14 16:13:48 art Exp $ */ /* $NetBSD: db_sym.c,v 1.24 2000/08/11 22:50:47 tv Exp $ */ /* @@ -548,6 +548,7 @@ db_printsym(off, strategy) db_expr_t value; int linenum; db_sym_t cursym; + char buf[DB_FORMAT_BUF_SIZE]; if (off <= db_lastsym) { cursym = db_search_symbol(off, strategy, &d); @@ -555,7 +556,8 @@ db_printsym(off, strategy) if (name && (d < db_maxoff) && value) { db_printf("%s", name); if (d) { - db_printf("+%#r", d); + db_printf("+%s", db_format(buf, sizeof(buf), + d, DB_FORMAT_R, 1, 0)); } if (strategy == DB_STGY_PROC) { if (db_line_at_pc(cursym, &filename, &linenum, off)) @@ -565,7 +567,7 @@ db_printsym(off, strategy) } } - db_printf("%#ln", off); + db_printf("%s", db_format(buf, sizeof(buf), off, DB_FORMAT_N, 1, 0)); return; } |