From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Paul Hilfinger Cc: cagney@gnu.org, drow@false.org, gdb-patches@sources.redhat.com Subject: Re: [RFA] Introduce notion of "search name" Date: Tue, 18 May 2004 21:59:00 -0000 Message-id: References: <20040412082254.97735F2E7C@nile.gnat.com> <20040429103706.4793BF2BFF@nile.gnat.com> <20040429211458.GB27523@nevyn.them.org> <20040430084538.ECDE1F2E1C@nile.gnat.com> <20040430134955.GA15786@nevyn.them.org> <20040503084937.439F4F2C0A@nile.gnat.com> <20040511194843.GA15952@nevyn.them.org> <20040512105959.806E6F2DE4@nile.gnat.com> <20040512132708.GA25122@nevyn.them.org> <40A2313E.1080100@gnu.org> <20040513093023.9718CF2B55@nile.gnat.com> X-SW-Source: 2004-05/msg00547.html Paul Hilfinger writes: > I am actually sympathetic to Andrew's ideas here, since with some > version of the extra abstraction he suggests, I could avoid all > permanent storage for demangled names. I think generalizing names is probably the way to go. Certainly C++ needs names with some structure; using strings there is silly. I'm not convinced it can be made quite as simple as Andrew says, but I could be wrong about that. But, either way, I don't think this patch should be blocked on making that overhaul. > Index: current-public.63/gdb/minsyms.c > --- current-public.63/gdb/minsyms.c Wed, 31 Mar 2004 23:53:02 -0800 hilfingr (GdbPub/j/4_minsyms.c 1.1.1.3.1.1.1.1.1.1.1.1.1.1.3.2.2.1 644) > +++ current-public.63(w)/gdb/minsyms.c Thu, 13 May 2004 01:59:29 -0700 hilfingr (GdbPub/j/4_minsyms.c 1.1.1.3.1.1.1.1.1.1.1.1.1.1.3.2.2.1 644) > @@ -791,7 +791,7 @@ build_minimal_symbol_hash_tables (struct > add_minsym_to_hash_table (msym, objfile->msymbol_hash); > > msym->demangled_hash_next = 0; > - if (SYMBOL_DEMANGLED_NAME (msym) != NULL) > + if (SYMBOL_SEARCH_NAME (msym) != SYMBOL_LINKAGE_NAME (msym)) > add_minsym_to_demangled_hash_table (msym, > objfile->msymbol_demangled_hash); > } We can use != to compare the names here because symbol_set_names only stores pointers to objfile->demangled_names_hash keys --- right? If Daniel J. has signed off on this, it looks fine to me.