diff options
author | 2002-05-14 16:13:48 +0000 | |
---|---|---|
committer | 2002-05-14 16:13:48 +0000 | |
commit | dee4176f01f97f18c4cb9dabc14a61bde451b279 (patch) | |
tree | 7f130bf5234405e783fd7a1074f3d916f55ec3f8 | |
parent | db_printf has three non-standard formats that are not supported by (diff) | |
download | wireguard-openbsd-dee4176f01f97f18c4cb9dabc14a61bde451b279.tar.xz wireguard-openbsd-dee4176f01f97f18c4cb9dabc14a61bde451b279.zip |
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; } |