This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] Introduce notion of "search name"


On Wed, May 12, 2004 at 10:14:22AM -0400, Andrew Cagney wrote:
> Brain explodes.

Mine too, in response.

> Why, when doing these symtab comparisons, are we insisting that the 
> symtab convert everything to a string, and then that the client 
> manipulate that?
> 
> Surely the only time a symbol name needs to be converted to a published 
> string is when we print it (even then *sym_puts (sym, ui_file) would 
> do).  For other cases, the last thing we should be doing is locking the 
> symtab into string representations.  Instead it should publish 
> interfaces such as:
> 	sym_demangled_cmp (sym1, sym2)
> and I suspect that there's an equivalent here.

This doesn't make the slightest bit of sense to me.  Maybe I'm just not
getting the abstraction you're suggesting.  In the code Paul referred
to, we're inside the symtab implementation trying to add the symbol to
a hash table, which we will later search _by string, from the user_. 
What else would we do?  Given that we are representing symbols by their
name, how else than a string representation would you suggest?

-- 
Daniel Jacobowitz


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