Stack walking
=============

The functions in <jit/jit-walk.h> allow the caller to walk up the native execution stack, inspecting frames and return addresses.

 -- Function: void * jit_get_frame_address (unsigned int N)
     Get the frame address for the call frame N levels up the stack.  Setting N to zero will retrieve the frame address for the current function.  Returns NULL if it isn't possible to retrieve the address of the specified frame.

 -- Function: void * jit_get_current_frame (void)
     Get the frame address for the current function.  This may be more efficient on some platforms than using jit_get_frame_address(0). Returns NULL if it isn't possible to retrieve the address of the current frame.

 -- Function: void * jit_get_next_frame_address (void *FRAME)
     Get the address of the next frame up the stack from FRAME. Returns NULL if it isn't possible to retrieve the address of the next frame up the stack.

 -- Function: void * jit_get_return_address (void *FRAME)
     Get the return address from a specified frame.  The address represents the place where execution returns to when the specified frame exits.  Returns NULL if it isn't possible to retrieve the return address of the specified frame.

 -- Function: void * jit_get_current_return (void)
     Get the return address for the current function.  This may be more efficient on some platforms than using jit_get_return_address(0). Returns NULL if it isn't possible to retrieve the return address of the current frame.

 -- Function: int jit_frame_contains_crawl_mark (void *FRAME, jit_crawl_mark_t *MARK)
     Determine if the stack frame that resides just above FRAME contains a local variable whose address is MARK.  The MARK parameter should be the address of a local variable that is declared with jit_declare_crawl_mark(NAME).

     Crawl marks are used internally by libjit to determine where control passes between JIT'ed and ordinary code during an exception throw. They can also be used to mark frames that have special security conditions associated with them.