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"
- From: David Carlton <carlton at kealia dot com>
- To: Paul Hilfinger <hilfingr at gnat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 03 Mar 2004 11:26:07 -0800
- Subject: Re: [RFA] Introduce notion of "search name"
- References: <20040303191550.7307DF2DB8@nile.gnat.com>
On Wed, 3 Mar 2004 14:15:50 -0500 (EST), Paul Hilfinger
<hilfingr@gnat.com> said:
> The modification to the signature of symbol_natural_name is to allow the
> option of delayed (lazy) evaluation of the demangled name, which is
> actually the point of introducing search names.
Personally, I would leave the signature as is and cast away the
constness when you eventually add this lazy demangling. My
justification is that the operation is logically a const operation;
you're planning to generate some information on the fly, but it
wouldn't actually change the state of the object.
Obviously this would work better if GDB were written in C++ (since,
for example, we could declare the affect field in the symbol to be
mutable); I'm honestly not sure if my suggestion is idiomatic C or
not. (Then again, const and C have never been the closest of cousins
to begin with.)
David Carlton
carlton@kealia.com