Dr. Memory
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

#include <drsyscall.h>

Data Fields

drsys_sysnum_t sysnum
void * drcontext
bool pre
dr_mcontext_t * mc
int ordinal
drsys_param_mode_t mode
drsys_param_type_t type
const char * type_name
drsys_param_type_t containing_type
const char * arg_name
reg_id_t reg
bool valid
void * start_addr
ptr_uint_t value
size_t size
uint64 value64
const char * enum_name

Detailed Description

Describes a system call parameter or memory region.

Field Documentation

const char* _drsys_arg_t::arg_name

A string describing the parameter. This may be NULL.

drsys_param_type_t _drsys_arg_t::containing_type

For the memarg iterator, the type of the containing structure. This is only set for some types when the sub-fields of the sructure are separated into different pieces due to gaps in the structure and the containing structure has its own type enum value. If not valid, it is set to DRSYS_TYPE_INVALID. Invalid for the arg iterator.

void* _drsys_arg_t::drcontext

The current thread's drcontext. Set for the dynamic iterators only.

const char* _drsys_arg_t::enum_name

A string describing the symbolic name of named constant. Indicates first entry in the set of enum or define constants. May be NULL.

dr_mcontext_t* _drsys_arg_t::mc

The application state, cached at the pre- or post-system call event. This contains DR_MC_CONTROL|DR_MC_INTEGER. Set for the dynamic iterators only.

drsys_param_mode_t _drsys_arg_t::mode

The mode (whether inlined, or read or written memory, etc.) of the parameter.

int _drsys_arg_t::ordinal

The ordinal of the parameter. Set to -1 for a return value.

bool _drsys_arg_t::pre

Whether operating pre-system call (if true) or post-system call (if false). Set for the dynamic iterators only (drsys_iterate_args() and drsys_iterate_memargs()).

reg_id_t _drsys_arg_t::reg

If not set to DR_REG_NULL, indicates which register the parameter's value is stored in.

size_t _drsys_arg_t::size

For the memarg iterator, specifies the size in bytes of the memory region. For the arg iterator, specifies the size in bytes of the parameter.

void* _drsys_arg_t::start_addr

For the memarg iterator, holds the address of the start of the memory region represented by this parameter. For the arg iterator, if this parameter is in memory, holds the address of the memory location; if this parameter is a register, holds NULL (and the register is in the reg field).

drsys_syscall_t* _drsys_arg_t::syscall

The system call handle.

drsys_sysnum_t _drsys_arg_t::sysnum

The system call number.

drsys_param_type_t _drsys_arg_t::type

The type of the parameter.

const char* _drsys_arg_t::type_name

A string further describing the type of the parameter. May be NULL.

bool _drsys_arg_t::valid

Indicates whether the start_addr and value fields are valid. For memarg iteration, this is always true, as a failure to read will result in not calling the callback for that memarg. For arg iteration this field can be false. For static iteration this field is always false.

ptr_uint_t _drsys_arg_t::value

For the arg iterator, holds the value of the parameter. Unused for the memarg iterator.

For 32-bit applications, some platforms (namely MacOS) support 64-bit arguments. For such cases, this field will hold only the bottom 32 bits of the value. Use the value64 field to retrieve the whole value. For cross-platform code, we recommend using value64 rather than this field.
uint64 _drsys_arg_t::value64

Identical to value, except it holds the full value of the parameter for the arg iterator for 32-bit applications on MacOS when the value is an 8-byte type. For cross-plaform code, we recommend using this field rather than value.

Unused for the memarg iterator.

The documentation for this struct was generated from the following file: