This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) (was: Re: ppc64 regression: [PATCH 1/2] Fix "list amb
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: palves at redhat dot com (Pedro Alves)
- Cc: jan dot kratochvil at redhat dot com (Jan Kratochvil), simon dot marchi at ericsson dot com (Simon Marchi), keiths at redhat dot com (Keith Seitz), gdb-patches at sourceware dot org
- Date: Wed, 29 Nov 2017 20:19:48 +0100 (CET)
- Subject: Re: [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) (was: Re: ppc64 regression: [PATCH 1/2] Fix "list amb
- Authentication-results: sourceware.org; auth=none
Pedro Alves wrote:
> On 11/26/2017 04:37 PM, Ulrich Weigand wrote:
>
> > I now see this as well on Cell/B.E. This is a serious regression that
> > causes "start" to always fail for me ...
> >
> > The problem seems to be that GDB sets a breakpoint into the function
> > descriptor for main, which is not a good idea.
> >
> > Looking at the commit identified above, it seems that GDB now only
> > runs the address through gdbarch_convert_from_func_ptr_addr if
> > msymbol_is_text returns true. However, if the symbol points to
> > a function descriptor, msymbol_is_text would be false since this
> > is in fact outside the text section.
> >
> > So I think probably we need to still run the address through
> > gdbarch_convert_from_func_ptr_addr, and if that detects that it
> > was indeed a function descriptor, always treat the resulting
> > address as a function.
>
> Thanks for the suggestion. Here's a patch that implements
> something like that. WDYT?
Yes, this looks all good to me. Thanks for taking care of this!
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com