diff options
author | Michael Snyder <msnyder@vmware.com> | 2001-05-11 17:48:31 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2001-05-11 17:48:31 +0000 |
commit | 3ac4495ac8e68077d3094af8e2e3733a5d16b666 (patch) | |
tree | 4e8eb2666cb80934c939eff98089d624fc9994ab | |
parent | 579f31ac74d806de9c148fb324a32c488634742a (diff) | |
download | gdb-3ac4495ac8e68077d3094af8e2e3733a5d16b666.zip gdb-3ac4495ac8e68077d3094af8e2e3733a5d16b666.tar.gz gdb-3ac4495ac8e68077d3094af8e2e3733a5d16b666.tar.bz2 |
2001-02-28 Michael Snyder <msnyder@mvstp600e.cygnus.com>
* symtab.c (print_msymbol_info): Print addresses by portable method
longest_local_hex_string_custom. Allow for 64-bit addresses.
-rw-r--r-- | gdb/symtab.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 8207eef..8eab3d2 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2644,9 +2644,17 @@ print_symbol_info (namespace_enum kind, struct symtab *s, struct symbol *sym, static void print_msymbol_info (struct minimal_symbol *msymbol) { - printf_filtered (" %08lx %s\n", - (unsigned long) SYMBOL_VALUE_ADDRESS (msymbol), - SYMBOL_SOURCE_NAME (msymbol)); + char *tmp; + + if (TARGET_ADDR_BIT <= 32) + tmp = longest_local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol) + & (CORE_ADDR) 0xffffffff, + "08l"); + else + tmp = longest_local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol), + "016l"); + printf_filtered ("%s %s\n", + tmp, SYMBOL_SOURCE_NAME (msymbol)); } /* This is the guts of the commands "info functions", "info types", and |