From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3614 invoked by alias); 19 Mar 2002 21:16:36 -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 3537 invoked from network); 19 Mar 2002 21:16:27 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 19 Mar 2002 21:16:27 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 974E35E9DE; Tue, 19 Mar 2002 16:16:26 -0500 (EST) To: gdb-patches@sources.redhat.com Subject: Re: RFC: C/C++ preprocessor macro support for GDB References: <20020317062306.CC96D5E9DE@zwingli.cygnus.com> <3C960A24.8030207@cygnus.com> From: Jim Blandy Date: Tue, 19 Mar 2002 13:16:00 -0000 In-Reply-To: <3C960A24.8030207@cygnus.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-03/txt/msg00364.txt.bz2 For what it's worth: Compiling GDB with -gdwarf-2 -g3 yields an executable with a 14Mb .debug_macinfo section. However, most of that is repetition; there is actually only 247k of unique text in there. The Dwarf 2 reader currently wants to pull the entire contents of every .debug_mumble section it can find into memory. So debugging that GDB will increase the superior GDB's memory consumption by 14Mb. However, the format-independent data structures that GDB builds from that Dwarf 2 data use bcaches to store all the strings. The bcaches keep only one copy of any given string, and everyone just points at those copies. So those structures are well-behaved; all of GDB's macro information would only occupy 247k + overhead in that form.