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: Matthias Klose <doko at ubuntu dot com>
- To: Dongsheng Xing <homer dot xing at yahoo dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sourceware dot org
- Date: Sat, 13 Jun 2009 11:20:03 -0400
- Subject: Re: [patch] Add external symbol table file support for gprof
- References: <943821.70680.qm@web43410.mail.sp1.yahoo.com>
Dongsheng Xing schrieb:
> 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-05-01 13:28:01.000000000 +0800
> +++ binutils-2.19.51/gprof/corefile.c 2009-05-05 19:13:47.000000000 +0800
> + while (!feof (f) && fgets (buf, sizeof (buf), f))
> + {
> + if(sscanf (buf, "%s %c %s", address, &type, name) == 3)
> + if (type != 't' && type != 'T')
> + continue;
> +
> + sym_init (symtab.limit);
> +
> + sscanf (address, "%lx", &(symtab.limit->addr) );
using gcc-4.4 -Werror:
gcc -DHAVE_CONFIG_H -I. -I../../gprof -I. -DDEBUG -I../bfd
-I../../gprof/../include -I../../gprof/../bfd -I.
-DLOCALEDIR="\"/usr/share/locale\"" -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Werror -g -O2 -c ../../gprof/corefile.c
cc1: warnings being treated as errors
../../gprof/corefile.c: In function 'core_create_syms_from':
../../gprof/corefile.c:512: error: format '%lx' expects type 'long unsigned int
*', but argument 3 has type 'bfd_vma *'
make[4]: *** [corefile.o] Error 1