This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Proposed changes in symbol-handling for Ada
- From: Paul Hilfinger <hilfingr at gnat dot com>
- To: carlton at kealia dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 21 Jan 2004 06:22:15 -0500 (EST)
- Subject: Re: [RFC] Proposed changes in symbol-handling for Ada
- References: <200311082255.hA8MtJK08216@otisco.McKusick.COM><yf2he1c6tjm.fsf@hawaii.kealia.com><20040120101613.F2871F2945@nile.gnat.com> <yf2hdyqfcgm.fsf@hawaii.kealia.com>
> 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