diff --git a/sys/conf/NOTES b/sys/conf/NOTES index b7f3a9001cf..72c1d458e54 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -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 diff --git a/sys/conf/options b/sys/conf/options index d9c37d6ae3d..389d7b3c494 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -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 diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 2ab3ede07f1..5714950aecc 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* * 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) {