This is the mail archive of the gdb-prs@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]

[Bug symtab/17199] Recording two copies of plt minimal symbols is a pain to deal with


https://sourceware.org/bugzilla/show_bug.cgi?id=17199

--- Comment #1 from dje at google dot com ---
More data.
This comment in symtab.h is incomplete.

  /* GDB uses mst_solib_trampoline for the start address of a shared            
     library trampoline entry.  Breakpoints for shared library functions        
     are put there if the shared library is not yet loaded.                     
     After the shared library is loaded, lookup_minimal_symbol will             
     prefer the minimal symbol from the shared library (usually                 
     a mst_text symbol) over the mst_solib_trampoline symbol, and the           
     breakpoints will be moved to their true address in the shared              
     library via breakpoint_re_set.  */

This is incomplete because in actuality there are three symbols:
1) in main exec, foo@plt, mst_text
2) in main exec, foo, mst_solib_trampoline
3) in shared lib, foo, mst_text

The comment leaves the reader guessing how #1 is discarded once the shared lib
is loaded, one reason being it too is mst_text.  Plus if you do "i b" before
the shared library is loaded it is foo@plt that is displayed, not foo.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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