This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Add external symbol table file support for gprof


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]