November 27, 2017

Stack frame structure

❑ Stack frame is this(Link)

❑ Stack frame structure
┌─────────────────────┐ → Low address
Local variables(Top to bottom in source code)
├─────────────────────
SFP(Saved Frame Pointer)
─────────────────────
RET(Return address)
─────────────────────
Parameters(Right to left in source code)
└─────────────────────┘ → High address
❍ Parameters : The values passed to the function.
❍ RET : The address to return to the parent function.
❍ SFP : The EBP address of the parent function.
❍ Local variables : The variables used by current function.