Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Andrew Haley <aph@redhat.com>
Cc: Ian Lance Taylor <iant@google.com>,
		Mark Kettenis <mark.kettenis@xs4all.nl>,
		Jan Kratochvil <jan.kratochvil@redhat.com>,
	gcc@gcc.gnu.org, 	libc-alpha@sources.redhat.com,
	gdb@sourceware.org, 	Jakub Jelinek <jakub@redhat.com>,
	Richard Henderson <rth@redhat.com>
Subject: Re: Unwinding CFI gcc practice of assumed `same value' regs
Date: Wed, 13 Dec 2006 18:02:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0612131851100.29962@wotan.suse.de> (raw)
In-Reply-To: <17790.57726.696229.240657@zebedee.pink>

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.


  parent reply	other threads:[~2006-12-13 18:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-11 19:03 Jan Kratochvil
2006-12-11 22:40 ` Roland McGrath
2006-12-12 15:54   ` Jakub Jelinek
2006-12-12 13:55 ` Andrew Haley
2006-12-12 14:55   ` Mark Kettenis
2006-12-12 15:04     ` Andrew Haley
2006-12-12 15:21       ` Ulrich Drepper
2006-12-12 15:26         ` Andrew Haley
2006-12-12 15:39           ` Ulrich Drepper
2006-12-13 18:11             ` Michael Matz
2006-12-12 15:50           ` Jan Kratochvil
2006-12-12 16:19           ` Jakub Jelinek
2006-12-12 16:55       ` Ian Lance Taylor
2006-12-12 17:06         ` Andrew Haley
2006-12-12 17:34           ` Mark Kettenis
2006-12-13 18:02           ` Michael Matz [this message]
2006-12-13 18:10 ` Michael Matz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0612131851100.29962@wotan.suse.de \
    --to=matz@suse.de \
    --cc=aph@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sourceware.org \
    --cc=iant@google.com \
    --cc=jakub@redhat.com \
    --cc=jan.kratochvil@redhat.com \
    --cc=libc-alpha@sources.redhat.com \
    --cc=mark.kettenis@xs4all.nl \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox