--- title: "Callstack Walker" layout: default permalink: /group__drcallstack.html ---
DynamoRIO
|
Data Structures | |
struct | _drcallstack_options_t |
struct | _drcallstack_frame_t |
Typedefs | |
typedef struct _drcallstack_options_t | drcallstack_options_t |
typedef struct _drcallstack_frame_t | drcallstack_frame_t |
typedef struct _drcallstack_walk_t | drcallstack_walk_t |
Enumerations | |
enum | drcallstack_status_t { DRCALLSTACK_SUCCESS, DRCALLSTACK_NO_MORE_FRAMES, DRCALLSTACK_ERROR, DRCALLSTACK_ERROR_INVALID_PARAMETER, DRCALLSTACK_ERROR_FEATURE_NOT_AVAILABLE } |
Functions | |
DR_EXPORT drcallstack_status_t | drcallstack_init (drcallstack_options_t *ops) |
DR_EXPORT drcallstack_status_t | drcallstack_exit (void) |
DR_EXPORT drcallstack_status_t | drcallstack_init_walk (dr_mcontext_t *mc, OUT drcallstack_walk_t **walk) |
DR_EXPORT drcallstack_status_t | drcallstack_cleanup_walk (drcallstack_walk_t *walk) |
DR_EXPORT drcallstack_status_t | drcallstack_next_frame (drcallstack_walk_t *walk, OUT drcallstack_frame_t *frame) |
typedef struct _drcallstack_frame_t drcallstack_frame_t |
Describes one callstack frame.
typedef struct _drcallstack_options_t drcallstack_options_t |
Specifies the options when initializing drcallstack.
typedef struct _drcallstack_walk_t drcallstack_walk_t |
Opaque type.
enum drcallstack_status_t |
Success code for each drcallstack operation.
DR_EXPORT drcallstack_status_t drcallstack_cleanup_walk | ( | drcallstack_walk_t * | walk | ) |
Called when the 'walk' pointer is no longer needed.
DR_EXPORT drcallstack_status_t drcallstack_exit | ( | void | ) |
Cleans up the drcallstack extension.
DR_EXPORT drcallstack_status_t drcallstack_init | ( | drcallstack_options_t * | ops | ) |
Initializes the drcallstack extension. Must be called prior to any of the other routines. Can be called multiple times (by separate components, normally) but each call must be paired with a corresponding call to drcallstack_exit().
[in] | ops | Specifies the optional parameters that control how drcallstack operates. |
DR_EXPORT drcallstack_status_t drcallstack_init_walk | ( | dr_mcontext_t * | mc, |
OUT drcallstack_walk_t ** | walk | ||
) |
Initializes a new callstack walk with the passed-in context 'mc', which must have DR_MC_CONTROL and DR_MC_INTEGER filled in. The 'walk' pointer should then be passed to repeated calls to drcallstack_next_frame() until it returns DRCALLSTACK_NO_MORE_FRAMES. drcallstack_cleanup_walk() should then be called to free up resources.
DR_EXPORT drcallstack_status_t drcallstack_next_frame | ( | drcallstack_walk_t * | walk, |
OUT drcallstack_frame_t * | frame | ||
) |
First, call drcallstack_init_walk() to initialize 'walk'. The 'walk' pointer should then be passed to repeated calls to drcallstack_next_frame() until it returns DRCALLSTACK_NO_MORE_FRAMES or an error code. drcallstack_cleanup_walk() should then be called to free up resources.