From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12292 invoked by alias); 29 Nov 2004 16:11:48 -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 12226 invoked from network); 29 Nov 2004 16:11:43 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 29 Nov 2004 16:11:43 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CYo7l-0000PM-I5; Mon, 29 Nov 2004 11:11:37 -0500 Date: Mon, 29 Nov 2004 16:14:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Eli Zaretskii , Andrew Burgess , gdb@sources.redhat.com Subject: Re: new option --readnever & script gstack? Message-ID: <20041129161137.GA1494@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Eli Zaretskii , Andrew Burgess , gdb@sources.redhat.com References: <41A24D4E.6090301@redhat.com> <01c4d151$Blat.v2.2.2$ca52d9c0@zahav.net.il> <41A363FE.9060307@redhat.com> <01c4d19d$Blat.v2.2.2$0109b2e0@zahav.net.il> <01c4d1f2$Blat.v2.2.2$5a3f3880@zahav.net.il> <41AB492A.8070804@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41AB492A.8070804@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00257.txt.bz2 On Mon, Nov 29, 2004 at 11:07:06AM -0500, Andrew Cagney wrote: > Eli Zaretskii wrote: > >>Cc: gdb@sources.redhat.com > >>From: "Andrew Burgess" > >>Date: Tue, 23 Nov 2004 13:42:54 -0800 > >> > >> > >>>It sounds like the -readnever option you propose would be useful only > >>>in the pstack-like situation. So how about adding a -pstack option > >>>which will do whatever it takes for GDB to emulate pstack, i.e. avoid > >>>reading the symbols, produce a backtrace, and then detach from the > >>>process? > >> > >>I think I would tend to use it 'with' symbols myself... > > > > > >Then perhaps using the -readnow switch would do what you want. > > > >I understand that the motivation for not reading the symbols is the > >long time it takes GDB to do that, right? > > Yes, the objective is to get in, get a minimal backtrace, and get out. > Apparently this is a relatively common task in production environments - > a few seconds down time is considered acceptable but not a few minutes > (that's the magnitude difference I'm seeing :-/). I also don't see the > option as being pstack specific - this technique is equally applicable > to other scripts - gcore comes to mind - again only minimal symbol > information being required. > > So, ..., would a gstack.sh script and an option to disable symbolic > debug information reading be useful additions to GDB? I think so. I've often wanted a way to load .debug_frame without loading .debug_info, on platforms with "tricky" unwinding. The other thing that might be useful is a way to load only shared libraries which appear in the backtrace (for either .debug_frame or .debug_info). -- Daniel Jacobowitz