From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8515 invoked by alias); 22 Feb 2004 17:40:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8507 invoked from network); 22 Feb 2004 17:40:56 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.170.238) by sources.redhat.com with SMTP; 22 Feb 2004 17:40:56 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4C36B2B92; Sun, 22 Feb 2004 12:40:53 -0500 (EST) Message-ID: <4038E9A5.2090601@gnu.org> Date: Sun, 22 Feb 2004 17:40:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] The off again, on again, PC == 0 in get_prev_frame References: <40367BCD.8090403@gnu.org> <200402202323.i1KNNaL4027099@elgar.kettenis.dyndns.org> In-Reply-To: <200402202323.i1KNNaL4027099@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00613.txt.bz2 > Andrew, I think that this case is completely broken. The frame chain > isn't properly terminated. The clone(2) system call that has created > this thread tries to mark frame #3 as the outermost frame by clearing > %rbp. However, since most amd64 code doesn't use the frame pointer, > this is pointless; GDB doesn't look at it. The fact that you're > seeing a zero PC here is merely accidental; it just happens to be that > (%rsp) contains zero. Therefore I don't think we should consider a > zero PC as a marker for the end of the frame chain. > > The Linux folks should add proper CFI to the implementation of > close(2) in glibc. A DW_CFA_def_cfa rule that sets the CFA to %rbp > should do the trick. clone(2)? How come the trad unwind code doesn't recover? Thinking about it, the test would stop this backtrace: sigsegv_handler "null" foo (which called "null") main is this tested anywhere? Andrew