This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Shared library call problems on PowerPC with current binutils/gdb
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org, bauerman at br dot ibm dot com, amodra at bigpond dot net dot au
- Date: Sat, 3 May 2008 17:38:40 +0200 (CEST)
- Subject: Re: Shared library call problems on PowerPC with current binutils/gdb
Daniel Jacobowitz wrote:
> On Sat, May 03, 2008 at 12:29:04AM +0200, Ulrich Weigand wrote:
> > Daniel Jacobowitz wrote:
> >
> > > This appears to work consistently, where by work I mean disassembly
> > > shows the @plt sym but breakpoints on the undecorated version work
> > > fine. I'm not sure exactly why; it may be luck.
>
> lookup_minimal_symbol_by_pc_section takes the last match in case of
> multiple matches. Minimal symbols are sorted by name. So malloc@plt
> always sorts after malloc. Subtle, but not luck exactly.
I see. Hmmm, we could do the same for versioned symbols and just
install two minsyms. For disassembly, we'd see the decorated name,
but searching for just the base name would find the function as well ...
> > > Hmm, thinking about this more, it probably won't work for your
> > > case after all. lookup_solib_trampoline_symbol_by_pc will return
> > > NULL if the first symbol we find is the text version.
> >
> > If we have two symbols, *both* need to be mst_solib_trampoline.
>
> Would that be true if we could search for a symbol with the
> appropriate type? Prefer the trampoline when trying to find a
> trampoline target, prefer the text symbol with the decorated name
> otherwise.
That's probably the best solution, right.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com