This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: note that minsyms can have duplicate demangled names
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 20 Sep 2004 11:54:02 -0500
- Subject: PATCH: note that minsyms can have duplicate demangled names
2004-09-19 Jim Blandy <jimb@redhat.com>
* minsyms.c (lookup_minimal_symbol): Doc fix.
Index: gdb/minsyms.c
===================================================================
RCS file: /cvs/src/src/gdb/minsyms.c,v
retrieving revision 1.43
diff -c -p -r1.43 minsyms.c
*** gdb/minsyms.c 20 May 2004 09:51:33 -0000 1.43
--- gdb/minsyms.c 20 Sep 2004 00:50:38 -0000
*************** add_minsym_to_demangled_hash_table (stru
*** 145,151 ****
Note: One instance where there may be duplicate minimal symbols with
the same name is when the symbol tables for a shared library and the
symbol tables for an executable contain global symbols with the same
! names (the dynamic linker deals with the duplication). */
struct minimal_symbol *
lookup_minimal_symbol (const char *name, const char *sfile,
--- 145,159 ----
Note: One instance where there may be duplicate minimal symbols with
the same name is when the symbol tables for a shared library and the
symbol tables for an executable contain global symbols with the same
! names (the dynamic linker deals with the duplication).
!
! It's also possible to have minimal symbols with different mangled
! names, but identical demangled names. For example, the GNU C++ v3
! ABI requires the generation of two (or perhaps three) copies of
! constructor functions --- "in-charge", "not-in-charge", and
! "allocate" copies; destructors may be duplicated as well.
! Obviously, there must be distinct mangled names for each of these,
! but the demangled names are all the same: S::S or S::~S. */
struct minimal_symbol *
lookup_minimal_symbol (const char *name, const char *sfile,