From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19062 invoked by alias); 27 Jan 2003 22:17:57 -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 19055 invoked from network); 27 Jan 2003 22:17:57 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by 172.16.49.205 with SMTP; 27 Jan 2003 22:17:57 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 5B3391448E; Mon, 27 Jan 2003 23:17:56 +0100 (MET) To: David Carlton Cc: Andrew Cagney , Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: RFC: Demangle partial symbols and save memory too X-Yow: I'm pretending that we're all watching PHIL SILVERS instead of RICARDO MONTALBAN! From: Andreas Schwab Date: Mon, 27 Jan 2003 22:17:00 -0000 In-Reply-To: (David Carlton's message of "27 Jan 2003 14:09:51 -0800") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.3.50 (ia64-suse-linux) References: <20030126222808.GA18132@nevyn.them.org> <20030127190109.GA11294@nevyn.them.org> <3E35A2EA.1080906@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-01/txt/msg00743.txt.bz2 David Carlton writes: |> I also toyed with trying to replace 'struct XXX *' with 'const struct |> XXX *' wherever appropriate. That one's harder, though, because there |> are structures in GDB where values are computed lazily and cached: so |> not only are there functions that are logically const but not actually |> const, but I also worried that making too many declarations const now |> would inhibit such caching in the future. Maybe in a couple of years |> we can switch GDB over to C++ instead of C and use 'mutable'... Even in C casting away const is OK as long as the object isn't read-only in the first place. You just have to be careful to make sure this is not violated. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."