From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26228 invoked by alias); 13 Dec 2006 18:02:47 -0000 Received: (qmail 26213 invoked by uid 22791); 13 Dec 2006 18:02:44 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Dec 2006 18:02:34 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 799162162C; Wed, 13 Dec 2006 19:02:31 +0100 (CET) Date: Wed, 13 Dec 2006 18:02:00 -0000 From: Michael Matz To: Andrew Haley Cc: Ian Lance Taylor , Mark Kettenis , Jan Kratochvil , gcc@gcc.gnu.org, libc-alpha@sources.redhat.com, gdb@sourceware.org, Jakub Jelinek , Richard Henderson Subject: Re: Unwinding CFI gcc practice of assumed `same value' regs In-Reply-To: <17790.57726.696229.240657@zebedee.pink> Message-ID: 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> <17790.57726.696229.240657@zebedee.pink> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/msg00116.txt.bz2 Hi, On Tue, 12 Dec 2006, Andrew Haley wrote: > > > In practice, %ebp either points to a call frame -- not necessarily > > > the most recent one -- or is null. I don't think that having an > > > optional frame pointer mees you can use %ebp for anything random at > > > all, but we need to make a clarification request of the ABI. > > > > I don't see that as feasible. If %ebp/%rbp may be used as a general > > callee-saved register, then it can hold any value. > > Sure, we already know that, as has been clear. The question is *if* > %rbp may be used as a general callee-saved register that can hold any > value. Yes of course it was meant to be used such. The ABI actually only gives a recommendation that %rbp should be zero in the outermost frame, it's not a must. The ABI _requires_ proper .eh_frame descriptors when unwinding is desired; so it's useless (and wrong) for any unwinder to look at %rbp and determine if it should stop. Alternatively (though not sanctioned by the ABI) all functions through which unwinding is desired but for which no unwind info is created _have_ to use %rbp as frame pointer and not as general register. In that case the zeroing of %rbp would be a usable stop condition for functions without unwind info. But that's already outside the ABI. Ciao, Michael.