drwrap.h File Reference

Header for DynamoRIO Function Wrapping and Replacing Extension. More...

Defines

#define DRMGR_PRIORITY_NAME_DRWRAP   "drwrap"

Enumerations

enum  {
  DRMGR_PRIORITY_APP2APP_DRWRAP = -500,
  DRMGR_PRIORITY_INSERT_DRWRAP = 500
}
enum  drwrap_wrap_flags_t { DRWRAP_UNWIND_ON_EXCEPTION = 0x01 }
enum  drwrap_global_flags_t {
  DRWRAP_SAFE_READ_RETADDR = 0x01,
  DRWRAP_SAFE_READ_ARGS = 0x02,
  DRWRAP_NO_FRILLS = 0x04,
  DRWRAP_FAST_CLEANCALLS = 0x08
}

Functions

DR_EXPORT bool drwrap_init (void)
DR_EXPORT void drwrap_exit (void)
DR_EXPORT bool drwrap_replace (app_pc original, app_pc replacement, bool override)
DR_EXPORT bool drwrap_wrap (app_pc func, void(*pre_func_cb)(void *wrapcxt, OUT void **user_data), void(*post_func_cb)(void *wrapcxt, void *user_data))
DR_EXPORT bool drwrap_wrap_ex (app_pc func, void(*pre_func_cb)(void *wrapcxt, INOUT void **user_data), void(*post_func_cb)(void *wrapcxt, void *user_data), void *user_data, drwrap_wrap_flags_t flags)
DR_EXPORT bool drwrap_unwrap (app_pc func, void(*pre_func_cb)(void *wrapcxt, OUT void **user_data), void(*post_func_cb)(void *wrapcxt, void *user_data))
DR_EXPORT app_pc drwrap_get_drcontext (void *wrapcxt)
DR_EXPORT app_pc drwrap_get_func (void *wrapcxt)
DR_EXPORT dr_mcontext_tdrwrap_get_mcontext (void *wrapcxt)
DR_EXPORT dr_mcontext_tdrwrap_get_mcontext_ex (void *wrapcxt, dr_mcontext_flags_t flags)
DR_EXPORT bool drwrap_set_mcontext (void *wrapcxt)
DR_EXPORT app_pc drwrap_get_retaddr (void *wrapcxt)
DR_EXPORT void * drwrap_get_arg (void *wrapcxt, int arg)
DR_EXPORT bool drwrap_set_arg (void *wrapcxt, int arg, void *val)
DR_EXPORT void * drwrap_get_retval (void *wrapcxt)
DR_EXPORT bool drwrap_set_retval (void *wrapcxt, void *val)
DR_EXPORT bool drwrap_skip_call (void *wrapcxt, void *retval, size_t stdcall_args_size)
DR_EXPORT bool drwrap_register_post_call_notify (void(*cb)(app_pc pc))
DR_EXPORT bool drwrap_unregister_post_call_notify (void(*cb)(app_pc pc))
DR_EXPORT bool drwrap_mark_as_post_call (app_pc pc)
DR_EXPORT bool drwrap_set_global_flags (drwrap_global_flags_t flags)
DR_EXPORT bool drwrap_is_wrapped (app_pc func, void(*pre_func_cb)(void *wrapcxt, OUT void **user_data), void(*post_func_cb)(void *wrapcxt, void *user_data))
DR_EXPORT bool drwrap_is_post_wrap (app_pc pc)

Detailed Description

Header for DynamoRIO Function Wrapping and Replacing Extension.


  DynamoRIO API version 3.2.0 --- Wed Mar 28 12:55:33 2012