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]

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


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