From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6885 invoked by alias); 10 Nov 2005 23:09:07 -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 6871 invoked by uid 22791); 10 Nov 2005 23:09:04 -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:09:04 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EaLXO-0000tK-Uc; Thu, 10 Nov 2005 18:08:59 -0500 Date: Fri, 11 Nov 2005 10:31:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: andrew.stubbs@st.com, gdb-patches@sources.redhat.com Subject: Re: [SH][PATCH] Disable ABI frame sniffer Message-ID: <20051110230858.GA3195@nevyn.them.org> Mail-Followup-To: Mark Kettenis , andrew.stubbs@st.com, 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> <200511102259.jAAMxdJC029449@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200511102259.jAAMxdJC029449@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-11/txt/msg00140.txt.bz2 On Thu, Nov 10, 2005 at 11:59:39PM +0100, Mark Kettenis wrote: > Ah there's your real problem. The unwinder walks off the stack and at > that point concludes the stack is thrashed. This is a recurring > problem on many platforms, especially when threads are involved. It > might be possible to detect the end of the stack on your platform and > teach the fallback unwinder about it. That might involve some changes > to the threads library and/or crt0 though, to make it mark the end of > the stack properly. It'd also be great to have a way to encode the > end of the stack in CFI. Unfortunately there has been quite a bit of > talk about this, but nobody has implemeneted anything yet. How short your memory... :-) http://sources.redhat.com/ml/gdb-patches/2005-03/msg00021.html There's no way in GCC to annotate a function with this property, and it appears that the thread-start routine in Andrew's OS is written in C, so I don't know if it helps. The fp == 0 and pc == 0 checks are one level off for stopping this, as I recall. A cleverer solution to that might be possible. -- Daniel Jacobowitz CodeSourcery, LLC