Add DDB_NUMSYM option which in addition to the symbolic representation

also prints the actual numerical value of the symbol in question.

Users of addr2line(1) will be less proficient in hex arithmetic as a
consequence.

This amongst other things means that traceback lines change from:
   siointr1(c4016800,c073bda0,0,c06b699c,69f) at siointr1+0xc5
to
   siointr1(c4016800,c073bda0,0,c06b699c,69f) at 0xc062b0bd = siointr1+0xc5

I made this an option to avoid bikesheds.
~
~
~
This commit is contained in:
Poul-Henning Kamp 2004-02-24 22:51:42 +00:00
parent 917a7daac3
commit 9aece96fc0
3 changed files with 12 additions and 0 deletions

View File

@ -233,6 +233,11 @@ options SYSVMSG
#
options DDB
#
# print the actual numerical value of symbols in addition to the
# symbolic representation
options DDB_NUMSYM
#
# Use direct symbol lookup routines for ddb instead of the kernel linker
# ones, so that symbols (mostly) work before the kernel linker has been

View File

@ -84,6 +84,7 @@ CY_PCI_FASTINTR
DDB
DDB_NOKLDSYM opt_ddb.h
DDB_TRACE
DDB_NUMSYM opt_ddb.h
DDB_UNATTENDED
GDB_REMOTE_CHAT opt_ddb.h
GDBSPEED opt_ddb.h

View File

@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$");
#include <ddb/ddb.h>
#include <ddb/db_sym.h>
#include <opt_ddb.h>
/*
* Multiple symbol tables
*/
@ -308,7 +310,11 @@ db_printsym(off, strategy)
db_printf("%#lr", (unsigned long)off);
return;
}
#ifdef DDB_NUMSYM
db_printf("%#lr = %s", (unsigned long)off, name);
#else
db_printf("%s", name);
#endif
if (d)
db_printf("+%+#lr", (long)d);
if (strategy == DB_STGY_PROC) {