diff options
author | bde <bde@FreeBSD.org> | 1997-01-16 11:27:11 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-01-16 11:27:11 +0000 |
commit | 42a95278a7a28c4530c0f269551a9f148a5f7426 (patch) | |
tree | 76d7df39d7e6b4353f2f4beec302cf6417b8bf8e /sys/ddb | |
parent | af224f8f64971f5993cdfd47aaa6a55aecc4c6f5 (diff) | |
download | FreeBSD-src-42a95278a7a28c4530c0f269551a9f148a5f7426.zip FreeBSD-src-42a95278a7a28c4530c0f269551a9f148a5f7426.tar.gz |
Fixed printing of small offsets. E.g., -4(%ebp) is now printed
as -0x4(%ebp) instead of as _APTD+0xffc(%ebp), and if GUPROF is
defined, 8(%ebp) is now printed as 0x8(%ebp) instead of as
GMON_PROF_HIRES+0x4(%ebp).
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_sym.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 0afa48a..7974825 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -274,7 +274,7 @@ db_symbol_values(sym, namep, valuep) * then we just print the value in hex. Small values might get * bogus symbol associations, e.g. 3 might get some absolute * value like _INCLUDE_VERSION or something, therefore we do - * not accept symbols whose value is zero (and use plain hex). + * not accept symbols whose value is "small" (and use plain hex). */ unsigned int db_maxoff = 0x10000; @@ -293,7 +293,13 @@ db_printsym(off, strategy) cursym = db_search_symbol(off, strategy, &d); db_symbol_values(cursym, &name, &value); - if (name == 0 || d >= db_maxoff || value == 0) { + if (name == 0) + value = off; + if (value >= DB_SMALL_VALUE_MIN && value <= DB_SMALL_VALUE_MAX) { + db_printf("%+#n", off); + return; + } + if (name == 0 || d >= db_maxoff) { db_printf("%#n", off); return; } |