From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9279 invoked by alias); 21 Jan 2004 11:22:19 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9269 invoked from network); 21 Jan 2004 11:22:16 -0000 Received: from unknown (HELO nile.gnat.com) (205.232.38.5) by sources.redhat.com with SMTP; 21 Jan 2004 11:22:16 -0000 Received: by nile.gnat.com (Postfix, from userid 1345) id AE278F2810; Wed, 21 Jan 2004 06:22:15 -0500 (EST) From: Paul Hilfinger To: carlton@kealia.com Cc: gdb-patches@sources.redhat.com In-reply-to: (message from David Carlton on Tue, 20 Jan 2004 15:05:13 -0800) Subject: Re: [RFC] Proposed changes in symbol-handling for Ada References: <200311082255.hA8MtJK08216@otisco.McKusick.COM> <20040120101613.F2871F2945@nile.gnat.com> Message-Id: <20040121112215.AE278F2810@nile.gnat.com> Date: Wed, 21 Jan 2004 11:22:00 -0000 X-SW-Source: 2004-01/txt/msg00578.txt.bz2 > 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