This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Add external symbol table file support for gprof
- From: Nick Clifton <nickc at redhat dot com>
- To: Dongsheng Xing <homer dot xing at yahoo dot com>
- Cc: Matthias Klose <doko at ubuntu dot com>, binutils at sourceware dot org
- Date: Mon, 15 Jun 2009 09:49:43 +0100
- Subject: Re: [patch] Add external symbol table file support for gprof
- References: <736435.46216.qm@web43415.mail.sp1.yahoo.com>
Hi Homer,
diff -rup binutils-2.19.51.origin/gprof/corefile.c binutils-2.19.51/gprof/corefile.c
--- binutils-2.19.51.origin/gprof/corefile.c 2009-06-14 21:00:29.000000000 +0800
+++ binutils-2.19.51/gprof/corefile.c 2009-06-14 21:04:35.000000000 +0800
@@ -509,7 +509,7 @@ core_create_syms_from (const char * sym_
sym_init (symtab.limit);
- sscanf (address, "%lx", &(symtab.limit->addr) );
+ sscanf (address, "%" BFD_VMA_FMT "x", &(symtab.limit->addr) );
symtab.limit->name = (char *) xmalloc (strlen (name) + 1);
strcpy ((char *) symtab.limit->name, name);
Thanks for the patch. I have checked it in along with this changelog entry.
Cheers
Nick
gprof/ChangeLog
2009-06-15 Homer Xing <homer.xing@yahoo.com>
* corefile.c (core_create_syms_from): Use BFD_VMA_FMT when
scanning in an address.