From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30796 invoked by alias); 5 Oct 2004 15:00:45 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30787 invoked from network); 5 Oct 2004 15:00:44 -0000 Received: from unknown (HELO borg.ics.uci.edu) (128.195.1.103) by sourceware.org with SMTP; 5 Oct 2004 15:00:44 -0000 Received: from rio (c-24-7-116-111.client.comcast.net [24.7.116.111]) by borg.ics.uci.edu (8.12.10/8.12.10) with SMTP id i95F0goN029436 for ; Tue, 5 Oct 2004 08:00:42 -0700 (PDT) Message-ID: <057e01c4aaec$1ab156d0$5a02a8c0@rio> From: "Nick Savoiu" To: References: <044c01c4aa56$e5f7fb00$5a02a8c0@rio> <20041004211514.GA16453@nevyn.them.org> <20041004221420.GA2937@nevyn.them.org> <04cb01c4aa68$e0a13b00$5a02a8c0@rio> <20041004232553.GA16539@nevyn.them.org> Subject: Re: Debugging a large program Date: Tue, 05 Oct 2004 15:26:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00093.txt.bz2 ----- Original Message ----- From: "Daniel Jacobowitz" To: "Nick Savoiu" Cc: Sent: Monday, October 04, 2004 4:25 PM Subject: Re: Debugging a large program > On Mon, Oct 04, 2004 at 04:21:28PM -0700, Nick Savoiu wrote: > > ----- Original Message ----- > > From: "Daniel Jacobowitz" > > To: "Nick Savoiu" ; > > Sent: Monday, October 04, 2004 3:14 PM > > Subject: Re: Debugging a large program > > > > > > > On Mon, Oct 04, 2004 at 05:15:14PM -0400, Daniel Jacobowitz wrote: > > > > > BTW, 405MB was for gdb running to main() not just what I said above :) > > There > > > > > probably are a few global variables but I don't think they should take > > up > > > > > too much space. > > > > > > > > That requires loading symbol information for all the shared libraries, > > > > which is probably what's taking all the space. 400MB+ is a bit > > > > unusual, but I don't know how big your libraries are. > > > > > > Your libraries contain 288MB of DWARF2 debug information. We're > > > winding up with less than twice that in memory usage for reading in > > > partial symbols. It probably could be reduced somewhat - say, 30%. > > > But some of this data we've just got to hold in memory. > > > > I see. If one of the .so files is not actually used, can I somehow prevent > > GDB from loading even its partial symbols? How much memory do partial > > symbols use? > > Partial symbols are most or all of that memory. Try "set > auto-solib-add 0", followed by "sharedlibrary REGEXP-YOU-WANT-LOADED". This seems to work reasonably well (a bit tedious since one has to know what libs to load and when). I wish that GDB could infer that automagically. Nick