_dr_mcontext_t Struct Reference

#include <dr_defines.h>

Data Fields

size_t size
dr_mcontext_flags_t flags
union {
   reg_t   xdi
   reg_t   rdi
}; 
union {
   reg_t   xsi
   reg_t   rsi
}; 
union {
   reg_t   xbp
   reg_t   rbp
}; 
union {
   reg_t   xsp
   reg_t   rsp
}; 
union {
   reg_t   xbx
   reg_t   rbx
}; 
union {
   reg_t   xdx
   reg_t   rdx
}; 
union {
   reg_t   xcx
   reg_t   rcx
}; 
union {
   reg_t   xax
   reg_t   rax
}; 
reg_t r8
reg_t r9
reg_t r10
reg_t r11
reg_t r12
reg_t r13
reg_t r14
reg_t r15
union {
   reg_t   xflags
   reg_t   rflags
}; 
union {
   byte *   xip
   byte *   pc
   byte *   rip
}; 
byte padding [PRE_XMM_PADDING]
dr_ymm_t ymm [NUM_XMM_SLOTS]

Detailed Description

Machine context structure.


Field Documentation

union { ... }

anonymous union of alternative names for rdi/edi register

union { ... }

anonymous union of alternative names for rdx/edx register

union { ... }

anonymous union of alternative names for rcx/ecx register

union { ... }

anonymous union of alternative names for rax/eax register

union { ... }

anonymous union of alternative names for rflags/eflags register

union { ... }

Anonymous union of alternative names for the program counter / instruction pointer (eip/rip). This field is not always set or read by all API routines.

union { ... }

anonymous union of alternative names for rsi/esi register

union { ... }

anonymous union of alternative names for rbp/ebp register

union { ... }

anonymous union of alternative names for rsp/esp register

union { ... }

anonymous union of alternative names for rbx/ebx register

The valid fields of this structure. This field must be set prior to filling in the fields. For input requests (dr_get_mcontext()), this indicates which fields should be written. Writing the multimedia fields frequently can incur a performance hit. For output requests (dr_set_mcontext() and dr_redirect_execution()), this indicates which fields will be copied to the actual context.

byte _dr_mcontext_t::padding[PRE_XMM_PADDING]

padding to get ymm field 32-byte aligned

platform-independent alt name for full rip/eip register

r10 register.

Note:
For 64-bit DR builds only.

r11 register.

Note:
For 64-bit DR builds only.

r12 register.

Note:
For 64-bit DR builds only.

r13 register.

Note:
For 64-bit DR builds only.

r14 register.

Note:
For 64-bit DR builds only.

r15 register.

Note:
For 64-bit DR builds only.

r8 register.

Note:
For 64-bit DR builds only.

r9 register.

Note:
For 64-bit DR builds only.

platform-dependent name for rax/eax register

platform-dependent name for rbp/ebp register

platform-dependent name for rbx/ebx register

platform-dependent name for rcx/ecx register

platform-dependent name for rdi/edi register

platform-dependent name for rdx/edx register

platform-dependent name for rflags/eflags register

platform-dependent name for rip/eip register

platform-dependent name for rsi/esi register

platform-dependent name for rsp/esp register

The size of this structure. This field must be set prior to filling in the fields to support forward compatibility.

platform-independent name for full rax/eax register

platform-independent name for full rbp/ebp register

platform-independent name for full rbx/ebx register

platform-independent name for full rcx/ecx register

platform-independent name for full rdi/edi register

platform-independent name for full rdx/edx register

platform-independent name for full rflags/eflags register

platform-independent name for full rip/eip register

platform-independent name for full rsi/esi register

platform-independent name for full rsp/esp register

dr_ymm_t _dr_mcontext_t::ymm[NUM_XMM_SLOTS]

The SSE registers xmm0-xmm5 (-xmm15 on Linux) are volatile (caller-saved) for 64-bit and WOW64, and are actually zeroed out on Windows system calls. These fields are ignored for 32-bit processes that are not WOW64, or if the underlying processor does not support SSE. Use dr_mcontext_xmm_fields_valid() to determine whether the fields are valid.

When the fields are valid, on processors with AVX enabled (i.e., proc_has_feature(FEATURE_AVX) returns true), these fields will contain the full ymm register values; otherwise, the top 128 bits of each slot will be undefined.


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

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