libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] local vars


From: Arun Sharma
Subject: Re: [Libunwind-devel] local vars
Date: Fri, 28 Oct 2011 19:20:44 -0700

On Fri, Oct 28, 2011 at 6:19 PM, address@hidden <address@hidden> wrote:
> Technically, I don't think the cfa is absolutely  guaranteed to be the SP
> just before the call. That's just the most common and straightforward way to
> set it up; the dwarf cfi can set it to whatever it wants as long as it can
> get to the saved state from it. It's rather unlikely to be anything but a
> constant offset from that SP.
>
> As I recall, the spec has confusing language like "the cfa is commonly
> defined as the SP just before the call", which isn't a definition at all.
>

You're right - I didn't catch this vague "definition" when I read it
this morning.

<quote>
An area of memory that is allocated on a stack called a “call frame.”
The call frame is identified by an address on the stack. We refer to
this address as the Canonical Frame Address or CFA. Typically, the CFA
is defined to be the value of the stack pointer at the call site in
the previous frame (which may be different from its value on entry to
the current frame).
</quote>

Re-reading your first message, all your looking for is a solid
definition of CFA in libunwind and as long as you're using the same
concept of CFA in C++ and JIT'ed frames, everything is good?

How about going with this definition: libunwind CFA == value of stack
pointer at the IP address in question.

 -Arun



reply via email to

[Prev in Thread] Current Thread [Next in Thread]