Re: [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) (was: Re: ppc64 regression: [PATCH 1/2] Fix "list amb

Ulrich Weigand
2017-11-29T19:20:06Z

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