A method used for walking forward through a binary image of a procedure to
identify a return instruction, and while walking forward through the
binary image, identifying a set of instructions that affect the distance
to a return address stored in the stack. After calculating distance
structure variables based on the set of instructions, and using the
distance structure variables to update the stack pointer and the
instruction pointer, returning to walk forward through the binary image
pointed to by the updated instruction pointer. This continues until the
stack is empty, and then a list of all instruction pointers are returned,
as a call chain. An additional optimization includes caching a list on
instruction pointer addresses with already computed distance structure
variables.