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: Abstracting "name"


[Subject changed from Re: [RFA] Introduce notion of "search name"]

Andrew Cagney wrote:


Just like the frame, arch, and regcache code, this won't be easy or simple - it will take multiple iterations and true long term commitment to GDB.


What we do need to do is recognize the real value in perusing this strategy (screwing down and better defining interfaces), and that it is a strategy we can't afford to postpone. Can we do that?


I'm all for good interfaces. The first step here, it seems to me, is to
understand better just what we want out of such an interface---a requirements memo or API sketch. Andrew has so far listed the following:


    symtab_name_put (symbol, ui_file):
    Write the printable name to the specified output.

    symtab_demangled_cmp (block, symbol, symbol):
    Compare two symbols returning their relative position.

[Actually, Andrew's name for this last was "symtab_demanged_cmp", which is
appealing, but perhaps too likely to provoke remark. :->)] Presumably,
you'd also need various functions such as


symtab_*_name_matches (char*, symbol)
(const char * :-)

FYI, another long term objective is to make published symbol objects a flyweight. Stop trying to differentiate between full and partial symbols (except within the symtab code) and stop dictating that there's this two stage load.

Andrew

where * has a number of replacements indicating the type of match desired
(literal, demangled, etc.). Or there could be one of these with an
extra modifier parameter. I presume the dictionary module is
to be folded into this; will this require a symtab_hash_value (symbol) operation? Also, what will clients want to do with structured names?


Paul Hilfinger



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