[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb
Subject:    Re: Debugging a large program
From:       "Nick Savoiu" <savoiu () ics ! uci ! edu>
Date:       2004-10-05 15:00:50
Message-ID: 057e01c4aaec$1ab156d0$5a02a8c0 () rio
[Download RAW message or body]

----- Original Message ----- 
From: "Daniel Jacobowitz" <drow@false.org>
To: "Nick Savoiu" <savoiu@ics.uci.edu>
Cc: <gdb@sources.redhat.com>
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" <drow@false.org>
> > To: "Nick Savoiu" <savoiu@ics.uci.edu>; <gdb@sources.redhat.com>
> > 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic