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: [RFC] Proposed changes in symbol-handling for Ada


> 3) Have Ada symbols save the demangled names of symbols after being
>    forced to demangle them.  This could cause a memory increase if you
>    for some reason have to demangle lots of names.

That sounds entirely reasonable.  

> (Hmm: where would you allocate the cached name from?  You can't get at
> the appropriate obstack from the symbol, can you?

Actually, the only true problem here is that the obvious way of
answering this question---adding to the language-specific union a new
entry containing an obstack* / char* union plus a flag---increases the
size of a symbol (logically it doesn't have to, but C layout and
alignment rules apparently add some padding).  To avoid increasing its
size, there is the aesthetically distateful option of adding a flag
byte AFTER the language-specific field; or perhaps we could call it
a union tag.  Harumph.

> Sigh.  I do not
> enjoy worrying about memory management when programming in C.)

You don't?  Good grief, man, what has happened to your sense of
adventure, your thirst for danger?

Paul


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