This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Introduce notion of "search name"
Paul Hilfinger <hilfingr@gnat.com> 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.