This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[commit] Re: [ppc64] L* funcs addresses to infcalled funcs


On Wed, 23 Mar 2011 15:29:24 +0100, Jan Kratochvil wrote:
> gdb/
> 2011-03-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* elfread.c (elf_symtab_read): Do not ignore .L symbols if they are
> 	BSF_SYNTHETIC.
> 
> gdb/testsuite/
> 2011-03-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* gdb.base/callfuncs.c (Lcallfunc, callfunc): New functions.
> 	* gdb.base/callfuncs.exp (print callfunc (Lcallfunc, 5)): New test.

Checked in:
	http://sourceware.org/ml/gdb-cvs/2011-04/msg00103.html

No regressions on {ppc64-m64,ppc64-m32}-rhel61-linux-gnu.


> --- a/gdb/elfread.c
> +++ b/gdb/elfread.c
> @@ -395,7 +395,11 @@ elf_symtab_read (struct objfile *objfile, int type,
> -	      else if ((sym->name[0] == '.' && sym->name[1] == 'L')
> +	      /* The BSF_SYNTHETIC check is there to omit ppc64 function
> +		 descriptors mistaken for static functions starting with 'L'.
> +		 */
> +	      else if ((sym->name[0] == '.' && sym->name[1] == 'L'
> +			&& (sym->flags & BSF_SYNTHETIC) == 0)
>  		       || ((sym->flags & BSF_LOCAL)

I also played a bit making it gdbarch dependent but a code making it more
generic gets terribly complicated and making just this condition
gdbarch-specific is a bit hacky.

Anyway BSF_SYNTHETIC conditional also makes sense - when BFD already creates
such asymbol a controlled way of the current codebase it is not right to drop
such symbol.  We could suppress creating it in the first place instead.


Thanks,
Jan


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