From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31627 invoked by alias); 20 Jan 2007 17:02:30 -0000 Received: (qmail 31619 invoked by uid 22791); 20 Jan 2007 17:02:30 -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; Sat, 20 Jan 2007 17:02:25 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H8Jbj-0004bk-By; Sat, 20 Jan 2007 12:02:23 -0500 Date: Sat, 20 Jan 2007 17:02:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] Prints the frame id when target stops Message-ID: <20070120170223.GA17653@nevyn.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <45AB9A7F.1090502@st.com> <17837.16328.46414.146270@kahikatea.snap.net.nz> <200701170234.34303.ghost@cs.msu.su> <20070117061815.GD19331@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00416.txt.bz2 On Thu, Jan 18, 2007 at 12:46:11AM +0300, Vladimir Prus wrote: > > The backtrace is different in an interesting way here if you set a > > breakpoint on foo and continue twice, but if you choose your buffer > > sizes just right, then you can get the two calls to foo to have the > > same ID. If your IDE doesn't refresh its stack display, you're > > going to have a stale call trace. > > Yes, that's an obvious problem. What makes you think a frontend > is in better position to fix it? I don't. Sorry if I was unclear. > > Apple implemented a very high performance, light weight unwinder that > > just does frame IDs - on PPC this happens to be quite easy. We could > > make other targets do the same thing. That probably helps here. > > Just to clarify -- you mean you don't get any function names or > code lines so you don't have to look in the symbol tables? And > if this backtrace changes you can get the full backtrace. Well, you might have to look in the symbol table anyway - I'm not sure how many shortcuts they take, but normally you'd still need to know where the start of functions were. But you don't need line numbers or other saved registers. I suspect they just rely on the PPC ABI frame convention, which is very quick to unwind. You can do the same thing more flexibly by caching the result of a prologue analyzer, too. -- Daniel Jacobowitz CodeSourcery