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


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.

> > 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.

Giving them different names could work too, but there are so
many different "symbol names" that giving them further distinction
makes me nervous (NATURAL, LINKAGE, DEMANGLED, PRINT, SEARCH).

-- 
Daniel Jacobowitz
CodeSourcery


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