From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30662 invoked by alias); 12 Dec 2006 16:19:28 -0000 Received: (qmail 30563 invoked by uid 22791); 12 Dec 2006 16:19:26 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Dec 2006 16:19:18 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kBCGJ79M025277; Tue, 12 Dec 2006 11:19:07 -0500 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kBCGJ4dx024817; Tue, 12 Dec 2006 11:19:04 -0500 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kBCGI4Oh019471; Tue, 12 Dec 2006 11:18:04 -0500 Received: (from jakub@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id kBCGI4h5019469; Tue, 12 Dec 2006 11:18:04 -0500 Date: Tue, 12 Dec 2006 16:19:00 -0000 From: Jakub Jelinek To: Andrew Haley Cc: Ulrich Drepper , Mark Kettenis , Jan Kratochvil , gcc@gcc.gnu.org, libc-alpha@sources.redhat.com, gdb@sourceware.org, Richard Henderson Subject: Re: Unwinding CFI gcc practice of assumed `same value' regs Message-ID: <20061212161804.GI29911@devserv.devel.redhat.com> Reply-To: Jakub Jelinek References: <20061211190300.GA4372@host0.dyn.jankratochvil.net> <17790.46246.634400.638852@zebedee.pink> <22844.82.92.89.47.1165935102.squirrel@webmail.xs4all.nl> <17790.50417.668957.495292@zebedee.pink> <457EC8BF.3040707@redhat.com> <17790.51754.814267.773596@zebedee.pink> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17790.51754.814267.773596@zebedee.pink> User-Agent: Mutt/1.4.1i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00101.txt.bz2 On Tue, Dec 12, 2006 at 03:26:34PM +0000, Andrew Haley wrote: > Ulrich Drepper writes: > > Andrew Haley wrote: > > > Null-terminating the call stack is too well-established practice to be > > > changed now. > > > > Which does not mean that the mistake should hold people back. > > Sure it does. Not breaking things is an excellent reason, probably > one of the the best reasons you can have. Well, libgcc unwinder handles neither %rbp 0 termination (even if that would be rephrased as outermost frame on x86-64 is determined by %rbp == 0 if CFA is %rbp + offset (that would handle the -fomit-frame-pointer routines where CFA is %rsp + offset)), nor DW_CFA_undefined %rip termination ATM. Things worked until now simply because the outermost routine (_start resp. thread_start hunk in clone in glibc) so far didn't have any unwind info. What would work with stock libgcc unwinder would probably be if _start or clone's child hunk had %rip point to memory containing 0 or DW_CFA_val_expression returning 0 (well, on SPARC that would need to be -8, as RETURN_ADDR_OFFSET is added to it). Jakub