From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12460 invoked by alias); 10 Nov 2005 23:13:41 -0000 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 Received: (qmail 12444 invoked by uid 22791); 10 Nov 2005 23:13:38 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 10 Nov 2005 23:13:38 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EaLbs-0000wv-JO; Thu, 10 Nov 2005 18:13:36 -0500 Date: Fri, 11 Nov 2005 10:35:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: gdb-patches@sources.redhat.com Subject: Re: [SH][PATCH] Disable ABI frame sniffer Message-ID: <20051110231336.GB3195@nevyn.them.org> Mail-Followup-To: Andrew STUBBS , gdb-patches@sources.redhat.com References: <43722DEF.8060300@st.com> <20051110013122.GB11334@nevyn.them.org> <437321EE.7010904@st.com> <20051110133905.GB21420@nevyn.them.org> <43735A1D.6010406@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43735A1D.6010406@st.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-11/txt/msg00141.txt.bz2 On Thu, Nov 10, 2005 at 02:33:01PM +0000, Andrew STUBBS wrote: > Hmm, confusing. Well, I can change the name easily enough. It is the > unwinder based on the ABI though. How come the unwind function is called > sniffer? It's not. That doesn't _do_ the unwinding, it _selects_ which unwinder to use. Sniffs around for the right one, I suppose. > >Quite on the contrary, my experience is that in most programs you'll > >need it at least a couple of times, e.g. to get out of bits of libc or > >linker-generated code. > > Bare-machine (or OS21) sh-elf doesn't use glibc with all its > complications. We use newlib and we always compile it with debug info > and CFI so there is it should never need to fall back. There are assembly routines in newlib too, you know. I didn't say anything about glibc. You may encounter linker generated branch trampolines in some cases, too. > >>It may be possible to improve the unwinder. However, it is dependent on > >>the values in registers and in memory. It would be impossible to prevent > >>it getting occasionally confused. > > > > > >Just like the rest of GDB on both counts. In case you missed my sarcasm here, I was responding to "dependent on the values in registers and memory". Of course it is! > The problem only occurs in threads (unless 'set backtrace pastmain' is > set, in which case it happens in any program) when the backtrace falls > off the end of the program. There are no more frames because there's no > more stack, but there's no way to know that unless you assume the CFI > and program run out at the same time. See Mark's reply for more on this. Had you said what your problem really was, we could have saved a couple of back-and-forth exchanges; I'm extremely familiar with the problem of finding clean ways to terminate the backtrace. > BTW, were you (and others) waiting for them to do something about the SH > specific patches I have been sending? I ask because I have had no > response on a few. I review patches as fast as I am able. I am more likely to review patches to code I know something about, which does not include the SH backend. -- Daniel Jacobowitz CodeSourcery, LLC