dr_defines.h File Reference

Basic defines and type definitions. More...

#include <windows.h>
#include <winbase.h>

Data Structures

struct  opnd_t
struct  instr_t
union  _dr_xmm_t
union  _dr_ymm_t
struct  _dr_mcontext_t
struct  dr_time_t

Defines

#define MAXIMUM_PATH   260
#define INVALID_FILE   INVALID_HANDLE_VALUE
#define STDOUT   (dr_get_stdout_file())
#define STDERR   (dr_get_stderr_file())
#define STDIN   (dr_get_stdin_file())
#define INVALID_FILE   -1
#define STDOUT   (our_stdout == INVALID_FILE ? stdout->_fileno : our_stdout)
#define STDERR   (our_stderr == INVALID_FILE ? stderr->_fileno : our_stderr)
#define STDIN   (our_stdin == INVALID_FILE ? stdin->_fileno : our_stdin)
#define NUM_XMM_SLOTS   6
#define PRE_XMM_PADDING   16

Typedefs

typedef size_t app_rva_t
typedef uint client_id_t
typedef union _dr_xmm_t dr_xmm_t
typedef union _dr_ymm_t dr_ymm_t
typedef struct _dr_mcontext_t dr_mcontext_t

Enumerations

enum  dr_mcontext_flags_t {
  DR_MC_INTEGER = 0x01,
  DR_MC_CONTROL = 0x02,
  DR_MC_MULTIMEDIA = 0x04,
  DR_MC_ALL = (DR_MC_INTEGER | DR_MC_CONTROL | DR_MC_MULTIMEDIA)
}

Variables

file_t our_stdout
file_t our_stderr
file_t our_stdin

Detailed Description

Basic defines and type definitions.


Define Documentation

#define INVALID_FILE   -1

The sentinel value for an invalid file_t.

#define INVALID_FILE   INVALID_HANDLE_VALUE

The sentinel value for an invalid file_t.

#define MAXIMUM_PATH   260

Cross-platform maximum file path length.

#define NUM_XMM_SLOTS   6

Number of [xy]mm reg slots in dr_mcontext_t

#define PRE_XMM_PADDING   16

Bytes of padding before xmm/ymm dr_mcontext_t slots

#define STDERR   (our_stderr == INVALID_FILE ? stderr->_fileno : our_stderr)

The file_t value for standard error.

#define STDERR   (dr_get_stderr_file())

The file_t value for standard error.

#define STDIN   (our_stdin == INVALID_FILE ? stdin->_fileno : our_stdin)

The file_t value for standard input.

The file_t value for standard error.

#define STDIN   (dr_get_stdin_file())

The file_t value for standard input.

The file_t value for standard error.

#define STDOUT   (our_stdout == INVALID_FILE ? stdout->_fileno : our_stdout)

The file_t value for standard output.

#define STDOUT   (dr_get_stdout_file())

The file_t value for standard output.


Typedef Documentation

typedef size_t app_rva_t

Application offset from module base. PE32+ modules are limited to 2GB, but not ELF x64 med/large code model.

typedef uint client_id_t

ID used to uniquely identify a client. This value is set at client registration and passed to the client in dr_init().

typedef struct _dr_mcontext_t dr_mcontext_t

Machine context structure.

typedef union _dr_xmm_t dr_xmm_t

128-bit XMM register.

typedef union _dr_ymm_t dr_ymm_t

256-bit YMM register.


Enumeration Type Documentation

Values for the flags field of dr_mcontext_t

Enumerator:
DR_MC_INTEGER 

Selects the xdi, xsi, xbp, xbx, xdx, xcx, xax, and r8-r15 fields (i.e., all of the general-purpose registers excluding xsp, xip, and xflags).

DR_MC_CONTROL 

Selects the xsp, xflags, and xip fields.

Note:
: The xip field is only honored as an input for dr_redirect_execution(), and as an output for system call events.
DR_MC_MULTIMEDIA 

Selects the ymm (and xmm) fields. This flag is ignored unless dr_mcontext_xmm_fields_valid() returns true. If dr_mcontext_xmm_fields_valid() returns false, the application values of the multimedia registers remain in the registers themselves.

DR_MC_ALL 

Selects all fields


Variable Documentation

file_t our_stderr

Allow use of stderr after the application closes it.

file_t our_stdin

Allow use of stdin after the application closes it.

file_t our_stdout

Allow use of stdout after the application closes it.


  DynamoRIO API version 3.1.0 --- Fri Jan 6 13:48:52 2012