From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22568 invoked by alias); 20 Aug 2006 16:28:25 -0000 Received: (qmail 22558 invoked by uid 22791); 20 Aug 2006 16:28:25 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 20 Aug 2006 16:28:23 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GEq9t-0005WQ-3o; Sun, 20 Aug 2006 12:28:21 -0400 Date: Sun, 20 Aug 2006 17:05:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: [rfc, frame] Add backtrace stop reasons Message-ID: <20060820162821.GA20987@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb-patches@sourceware.org References: <20060819154646.GA25238@nevyn.them.org> <200608201438.k7KEcJho022644@elgar.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608201438.k7KEcJho022644@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00141.txt.bz2 Hi Mark, thanks for looking at these. On Sun, Aug 20, 2006 at 04:38:19PM +0200, Mark Kettenis wrote: > > A nice bonus, in my opinion: if the backtrace stops because unwinding > > detects an error or the end of the stack, "info frame" will explain > > why. For instance: > > > > Stops backtrace: previous frame inner to this frame (corrupt stack?) > > Is this really useful? It adds an extra line to the "info frame" > output, which might mean that more useful information about the frame > scrolls of my screen :(. (gdb) info frame Stack level 0, frame at 0xbf8e5838: eip = 0xffffe410 in __kernel_vsyscall; saved eip 0xb7ea61cb called by frame at 0xbf8e5850 Arglist at 0xbf8e5830, args: Locals at 0xbf8e5830, Previous frame's sp is 0xbf8e5838 Saved registers: ebp at 0xbf8e5828, eip at 0xbf8e5834 Where are we really in danger of this scrolling off the screen? Frames with dozens of arguments (which generally wouldn't stop the backtrace anyway, so wouldn't have the line)? I can imagine reasons to dislike adding more information, but I confess this one confuses me a bit :-) I think it will be useful, especially as the set of reasons grows. As you correctly noticed, the other patches don't fundamentally depend on this one, but I did them in this order deliberately; two later followups could be converting the zero PC check to use a stop reason, and allowing the architecture unwinders to return stop reasons. Backtrace would print out the "error" reasons, but not the "normal" reasons; you could look in info frame for the "normal" reasons, like "Unwinding indicated no return address" for the undefined retaddr column markers we use in DWARF-2. > The implementation looks good to me, but I don't see why we need this > functionality yet. Can you hold on to this until we really need it? If you want; there's no point in this unless at least one of the other patches goes in. The problem with holding things until we really need them is that we build up these huge queues of patches related to a single project. I'm sure this code wouldn't turn into abandonware. But it's a small patch, so I can easily carry it along until we're ready for it if you prefer. -- Daniel Jacobowitz CodeSourcery