This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] add-symbol-file not to print address truncated
Pedro Alves writes:
> Ah, that looks like paddress then, except for the width.
Right, I missed that. Thanks. I really don't care about width except that
that was what allowed me to reuse this function.
I can retest the patch without those bits then (which is pretty much an
obvious patch now) like:
* symfile.c (add_symbol_file_command): Use paddress rather than
hex_string to print the address.
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.199
diff -F^\([(a-zA-Z0-9_]\|#define\) -u -p -u -r1.199 symfile.c
--- symfile.c 21 Apr 2008 14:25:16 -0000 1.199
+++ symfile.c 4 May 2008 00:11:11 -0000
@@ -2239,8 +2239,7 @@ add_symbol_file_command (char *args, int
entered on the command line. */
section_addrs->other[sec_num].name = sec;
section_addrs->other[sec_num].addr = addr;
- printf_unfiltered ("\t%s_addr = %s\n",
- sec, hex_string ((unsigned long)addr));
+ printf_unfiltered ("\t%s_addr = %s\n", sec, paddress (addr));
sec_num++;
/* The object's sections are initialized when a