drbbdup.h File Reference

Header for DynamoRIO Basic Block Duplicator Extension. More...

#include "drmgr.h"
#include <stdint.h>

Data Structures

struct  drbbdup_options_t
 
struct  drbbdup_stats_t
 

Macros

#define DRMGR_PRIORITY_APP2APP_NAME_DRBBDUP   "drbbdup_app2app"
 
#define DRMGR_PRIORITY_INSERT_NAME_DRBBDUP   "drbbdup_insert"
 
#define DRMGR_PRIORITY_RESTORE_NAME_DRBBDUP   "drbbdup_restore"
 

Typedefs

typedef uintptr_t(* drbbdup_set_up_bb_dups_t) (void *drbbdup_ctx, void *drcontext, void *tag, instrlist_t *bb, DR_PARAM_IN bool *enable_dups, DR_PARAM_IN bool *enable_dynamic_handling, void *user_data)
 
typedef bool(* drbbdup_allow_gen_t) (void *drcontext, void *tag, instrlist_t *ilist, uintptr_t new_case, bool *enable_dynamic_handling, void *user_data)
 
typedef void(* drbbdup_analyze_orig_t) (void *drcontext, void *tag, instrlist_t *bb, void *user_data, DR_PARAM_IN void **orig_analysis_data)
 
typedef void(* drbbdup_destroy_orig_analysis_t) (void *drcontext, void *user_data, void *orig_analysis_data)
 
typedef void(* drbbdup_analyze_case_t) (void *drcontext, void *tag, instrlist_t *bb, uintptr_t encoding, void *user_data, void *orig_analysis_data, DR_PARAM_IN void **case_analysis_data)
 
typedef dr_emit_flags_t(* drbbdup_analyze_case_ex_t) (void *drcontext, void *tag, instrlist_t *bb, bool for_trace, bool translating, uintptr_t encoding, void *user_data, void *orig_analysis_data, DR_PARAM_IN void **case_analysis_data)
 
typedef void(* drbbdup_destroy_case_analysis_t) (void *drcontext, uintptr_t encoding, void *user_data, void *orig_analysis_data, void *case_analysis_data)
 
typedef void(* drbbdup_insert_encode_t) (void *drcontext, void *tag, instrlist_t *bb, instr_t *where, void *user_data, void *orig_analysis_data)
 
typedef void(* drbbdup_instrument_instr_t) (void *drcontext, void *tag, instrlist_t *bb, instr_t *instr, instr_t *where, uintptr_t encoding, void *user_data, void *orig_analysis_data, void *case_analysis_data)
 
typedef dr_emit_flags_t(* drbbdup_instrument_instr_ex_t) (void *drcontext, void *tag, instrlist_t *bb, instr_t *instr, instr_t *where, bool for_trace, bool translating, uintptr_t encoding, void *user_data, void *orig_analysis_data, void *case_analysis_data)
 

Enumerations

enum  drbbdup_status_t {
  DRBBDUP_SUCCESS,
  DRBBDUP_ERROR_INVALID_PARAMETER,
  DRBBDUP_ERROR_INVALID_OPND,
  DRBBDUP_ERROR_CASE_ALREADY_REGISTERED,
  DRBBDUP_ERROR_CASE_LIMIT_REACHED,
  DRBBDUP_ERROR_ALREADY_INITIALISED,
  DRBBDUP_ERROR,
  DRBBDUP_ERROR_UNSET_FEATURE,
  DRBBDUP_ERROR_NOT_INITIALIZED
}
 
enum  {
  DRMGR_PRIORITY_APP2APP_DRBBDUP = 6500,
  DRMGR_PRIORITY_INSERT_DRBBDUP = -6500,
  DRMGR_PRIORITY_RESTORE_DRBBDUP = -99900
}
 

Functions

DR_EXPORT drbbdup_status_t drbbdup_init (drbbdup_options_t *ops_in)
 
DR_EXPORT drbbdup_status_t drbbdup_exit (void)
 
DR_EXPORT drbbdup_status_t drbbdup_register_case_encoding (void *drbbdup_ctx, uintptr_t encoding)
 
DR_EXPORT drbbdup_status_t drbbdup_is_first_instr (void *drcontext, instr_t *instr, DR_PARAM_OUT bool *is_start)
 
DR_EXPORT drbbdup_status_t drbbdup_is_first_nonlabel_instr (void *drcontext, instr_t *instr, bool *is_nonlabel)
 
DR_EXPORT drbbdup_status_t drbbdup_is_last_instr (void *drcontext, instr_t *instr, DR_PARAM_OUT bool *is_last)
 
DR_EXPORT drbbdup_status_t drbbdup_get_stats (DR_PARAM_OUT drbbdup_stats_t *stats)
 

Detailed Description

Header for DynamoRIO Basic Block Duplicator Extension.