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, 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


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