On Fri, Oct 28, 2011 at 6:19 PM, [email protected] <[email protected]> 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 _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
