During the course of program execution, it is sometimes necessary to navigate the call chain. Frame-based exception handling is one case where this is done. Call chain navigation is only possible in the reverse direction (latest to earliest or top to bottom procedure).
The steps to perform for call chain navigation are:
For the current routine, an initial invocation context block can be obtained by calling RtlCaptureContext().
Compilers are allowed to optimize high-level language procedure calls in such a way that they do not appear in the invocation chain. For example, inline procedures never appear in the invocation chain.
No assumptions should be made about the relative positions of any memory used for procedure frame information. There is no guarantee that successive stack frames will always appear at higher addresses.