DynamoRIO API
dr_api.h File Reference

Top-level include file for DynamoRIO API. More...

#include "dr_defines.h"
#include "dr_events.h"
#include "dr_app.h"
#include "dr_ir_opnd.h"
#include "dr_tools.h"
#include "dr_proc.h"
#include "dr_ir_utils.h"
#include "dr_ir_instrlist.h"
#include "dr_ir_instr.h"
#include "dr_ir_opcodes.h"
#include "dr_ir_macros.h"
#include "dr_annotation.h"

Macros

#define DR_DISALLOW_UNSAFE_STATIC   DR_EXPORT LINK_ONCE int _DR_DISALLOW_UNSAFE_STATIC_ = 1;
 

Functions

DR_EXPORT void dr_client_main (client_id_t id, int argc, const char *argv[])
 
DR_EXPORT void dr_init (client_id_t id)
 

Detailed Description

Top-level include file for DynamoRIO API.

Macro Definition Documentation

#define DR_DISALLOW_UNSAFE_STATIC   DR_EXPORT LINK_ONCE int _DR_DISALLOW_UNSAFE_STATIC_ = 1;

This declaration requests that DR perform sanity checks to ensure that client libraries will also operate safely when linked statically into an application. These checks include ensuring that the system allocator is not called outside of process initialization or exit, where such calls raise transparency issues due to the lack of isolation without a private loader. Currently, these checks are only performed in debug builds on UNIX. This can be overridden in client code by calling dr_allow_unsafe_static_behavior().

Function Documentation

DR_EXPORT void dr_client_main ( client_id_t  id,
int  argc,
const char *  argv[] 
)

When registering a process, users must provide a list of paths to client libraries and their associated client-specific options. DR looks up "dr_client_main" in each client library and calls that function when the process starts. Clients can register to receive callbacks for the various events within dr_client_main(). Note that client paths and options cannot include semicolons.

client_id is the ID supplied at registration and is used to identify the client for dr_get_option_array(), dr_get_client_path(), and external nudges.

The arguments passed to the client are specified in argc and argv. To match standalone application conventions, argv[0] is set to the client library path, with the actual parameters starting at index 1.

DR_EXPORT void dr_init ( client_id_t  id)

Legacy, deprecated initialization routine.

Deprecated: