struct CallFrame
Defined at line 74 of file ../../zircon/kernel/lib/arch/include/lib/arch/backtrace.h
Each frame records its caller's FP and PC (return address). A call pushes
the PC and the prologue then pushes the caller's FP (x86), or the prologue
pushes the return-address register and PC together (other CPUs). Since the
stack grows down, the PC is always just after the FP in memory. It then
sets the FP to point at (or above) the FP, PC pair just pushed. On x86 it's
unavoidable that the FP is two words below the CFA (SP at call site), since
the call itself puts the PC there; the FP points directly to the FP, PC pair
describing the caller. On ARM, the compiler will often place the FP, PC
pair at the bottom of the new frame instead of the top; the FP points
directly to the FP, PC pair describing the caller, but there's no guarantee
where the FP is in relation to the CFA. On RISC-V, the FP is set to the CFA
(SP at call site / entry); so it points *just past* the FP, PC pair
describing the caller, but it's also guaranteed to be the CFA.
Public Members
const CallFrame * fp
uintptr_t pc