Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
programs/winedbg/be_arm.c | 34 +++++-----
programs/winedbg/be_arm64.c | 70 ++++++++++----------
programs/winedbg/be_i386.c | 102 ++++++++++++++---------------
programs/winedbg/be_x86_64.c | 148 +++++++++++++++++++++---------------------
programs/winedbg/debugger.h | 6 +-
programs/winedbg/winedbg.c | 2 -
6 files changed, 181 insertions(+), 181 deletions(-)
diff --git a/programs/winedbg/be_arm.c b/programs/winedbg/be_arm.c
index 451eb50e772..435dad2e3cc 100644
--- a/programs/winedbg/be_arm.c
+++ b/programs/winedbg/be_arm.c
@@ -1722,23 +1722,23 @@ static void be_arm_print_segment_info(HANDLE hThread, const dbg_ctx_t *ctx)
static struct dbg_internal_var be_arm_ctx[] =
{
- {CV_ARM_R0 + 0, "r0", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R0), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 1, "r1", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R1), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 2, "r2", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R2), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 3, "r3", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R3), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 4, "r4", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R4), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 5, "r5", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R5), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 6, "r6", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R6), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 7, "r7", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R7), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 8, "r8", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R8), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 9, "r9", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R9), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 10, "r10", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R10), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 11, "r11", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R11), dbg_itype_unsigned_int},
- {CV_ARM_R0 + 12, "r12", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R12), dbg_itype_unsigned_int},
- {CV_ARM_SP, "sp", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Sp), dbg_itype_unsigned_int},
- {CV_ARM_LR, "lr", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Lr), dbg_itype_unsigned_int},
- {CV_ARM_PC, "pc", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Pc), dbg_itype_unsigned_int},
- {CV_ARM_CPSR, "cpsr", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Cpsr), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 0, "r0", (void*)FIELD_OFFSET(CONTEXT, R0), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 1, "r1", (void*)FIELD_OFFSET(CONTEXT, R1), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 2, "r2", (void*)FIELD_OFFSET(CONTEXT, R2), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 3, "r3", (void*)FIELD_OFFSET(CONTEXT, R3), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 4, "r4", (void*)FIELD_OFFSET(CONTEXT, R4), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 5, "r5", (void*)FIELD_OFFSET(CONTEXT, R5), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 6, "r6", (void*)FIELD_OFFSET(CONTEXT, R6), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 7, "r7", (void*)FIELD_OFFSET(CONTEXT, R7), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 8, "r8", (void*)FIELD_OFFSET(CONTEXT, R8), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 9, "r9", (void*)FIELD_OFFSET(CONTEXT, R9), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 10, "r10", (void*)FIELD_OFFSET(CONTEXT, R10), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 11, "r11", (void*)FIELD_OFFSET(CONTEXT, R11), dbg_itype_unsigned_int},
+ {CV_ARM_R0 + 12, "r12", (void*)FIELD_OFFSET(CONTEXT, R12), dbg_itype_unsigned_int},
+ {CV_ARM_SP, "sp", (void*)FIELD_OFFSET(CONTEXT, Sp), dbg_itype_unsigned_int},
+ {CV_ARM_LR, "lr", (void*)FIELD_OFFSET(CONTEXT, Lr), dbg_itype_unsigned_int},
+ {CV_ARM_PC, "pc", (void*)FIELD_OFFSET(CONTEXT, Pc), dbg_itype_unsigned_int},
+ {CV_ARM_CPSR, "cpsr", (void*)FIELD_OFFSET(CONTEXT, Cpsr), dbg_itype_unsigned_int},
{0, NULL, 0, dbg_itype_none}
};
diff --git a/programs/winedbg/be_arm64.c b/programs/winedbg/be_arm64.c
index aaf6ecf0bb6..39f17c7d67d 100644
--- a/programs/winedbg/be_arm64.c
+++ b/programs/winedbg/be_arm64.c
@@ -104,41 +104,41 @@ static void be_arm64_print_segment_info(HANDLE hThread, const dbg_ctx_t *ctx)
static struct dbg_internal_var be_arm64_ctx[] =
{
- {CV_ARM64_PSTATE, "cpsr", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Cpsr), dbg_itype_unsigned_int},
- {CV_ARM64_X0 + 0, "x0", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X0), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 1, "x1", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X1), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 2, "x2", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X2), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 3, "x3", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X3), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 4, "x4", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X4), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 5, "x5", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X5), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 6, "x6", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X6), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 7, "x7", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X7), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 8, "x8", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X8), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 9, "x9", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X9), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 10, "x10", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X10), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 11, "x11", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X11), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 12, "x12", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X12), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 13, "x13", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X13), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 14, "x14", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X14), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 15, "x15", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X15), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 16, "x16", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X16), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 17, "x17", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X17), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 18, "x18", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X18), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 19, "x19", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X19), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 20, "x20", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X20), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 21, "x21", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X21), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 22, "x22", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X22), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 23, "x23", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X23), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 24, "x24", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X24), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 25, "x25", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X25), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 26, "x26", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X26), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 27, "x27", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X27), dbg_itype_unsigned_long_int},
- {CV_ARM64_X0 + 28, "x28", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.X28), dbg_itype_unsigned_long_int},
- {CV_ARM64_FP, "fp", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Fp), dbg_itype_unsigned_long_int},
- {CV_ARM64_LR, "lr", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Lr), dbg_itype_unsigned_long_int},
- {CV_ARM64_SP, "sp", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Sp), dbg_itype_unsigned_long_int},
- {CV_ARM64_PC, "pc", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Pc), dbg_itype_unsigned_long_int},
- {0, NULL, 0, dbg_itype_none}
+ {CV_ARM64_PSTATE, "cpsr", (void*)FIELD_OFFSET(CONTEXT, Cpsr), dbg_itype_unsigned_int},
+ {CV_ARM64_X0 + 0, "x0", (void*)FIELD_OFFSET(CONTEXT, u.s.X0), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 1, "x1", (void*)FIELD_OFFSET(CONTEXT, u.s.X1), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 2, "x2", (void*)FIELD_OFFSET(CONTEXT, u.s.X2), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 3, "x3", (void*)FIELD_OFFSET(CONTEXT, u.s.X3), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 4, "x4", (void*)FIELD_OFFSET(CONTEXT, u.s.X4), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 5, "x5", (void*)FIELD_OFFSET(CONTEXT, u.s.X5), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 6, "x6", (void*)FIELD_OFFSET(CONTEXT, u.s.X6), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 7, "x7", (void*)FIELD_OFFSET(CONTEXT, u.s.X7), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 8, "x8", (void*)FIELD_OFFSET(CONTEXT, u.s.X8), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 9, "x9", (void*)FIELD_OFFSET(CONTEXT, u.s.X9), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 10, "x10", (void*)FIELD_OFFSET(CONTEXT, u.s.X10), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 11, "x11", (void*)FIELD_OFFSET(CONTEXT, u.s.X11), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 12, "x12", (void*)FIELD_OFFSET(CONTEXT, u.s.X12), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 13, "x13", (void*)FIELD_OFFSET(CONTEXT, u.s.X13), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 14, "x14", (void*)FIELD_OFFSET(CONTEXT, u.s.X14), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 15, "x15", (void*)FIELD_OFFSET(CONTEXT, u.s.X15), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 16, "x16", (void*)FIELD_OFFSET(CONTEXT, u.s.X16), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 17, "x17", (void*)FIELD_OFFSET(CONTEXT, u.s.X17), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 18, "x18", (void*)FIELD_OFFSET(CONTEXT, u.s.X18), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 19, "x19", (void*)FIELD_OFFSET(CONTEXT, u.s.X19), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 20, "x20", (void*)FIELD_OFFSET(CONTEXT, u.s.X20), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 21, "x21", (void*)FIELD_OFFSET(CONTEXT, u.s.X21), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 22, "x22", (void*)FIELD_OFFSET(CONTEXT, u.s.X22), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 23, "x23", (void*)FIELD_OFFSET(CONTEXT, u.s.X23), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 24, "x24", (void*)FIELD_OFFSET(CONTEXT, u.s.X24), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 25, "x25", (void*)FIELD_OFFSET(CONTEXT, u.s.X25), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 26, "x26", (void*)FIELD_OFFSET(CONTEXT, u.s.X26), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 27, "x27", (void*)FIELD_OFFSET(CONTEXT, u.s.X27), dbg_itype_unsigned_long_int},
+ {CV_ARM64_X0 + 28, "x28", (void*)FIELD_OFFSET(CONTEXT, u.s.X28), dbg_itype_unsigned_long_int},
+ {CV_ARM64_FP, "fp", (void*)FIELD_OFFSET(CONTEXT, u.s.Fp), dbg_itype_unsigned_long_int},
+ {CV_ARM64_LR, "lr", (void*)FIELD_OFFSET(CONTEXT, u.s.Lr), dbg_itype_unsigned_long_int},
+ {CV_ARM64_SP, "sp", (void*)FIELD_OFFSET(CONTEXT, Sp), dbg_itype_unsigned_long_int},
+ {CV_ARM64_PC, "pc", (void*)FIELD_OFFSET(CONTEXT, Pc), dbg_itype_unsigned_long_int},
+ {0, NULL, 0, dbg_itype_none}
};
static BOOL be_arm64_is_step_over_insn(const void* insn)
diff --git a/programs/winedbg/be_i386.c b/programs/winedbg/be_i386.c
index 3bb7b9b4240..8902185d0b0 100644
--- a/programs/winedbg/be_i386.c
+++ b/programs/winedbg/be_i386.c
@@ -277,57 +277,57 @@ static void be_i386_print_segment_info(HANDLE hThread, const dbg_ctx_t *ctx)
static struct dbg_internal_var be_i386_ctx[] =
{
- {CV_REG_AL, "AL", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Eax), dbg_itype_unsigned_char_int},
- {CV_REG_CL, "CL", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Ecx), dbg_itype_unsigned_char_int},
- {CV_REG_DL, "DL", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Edx), dbg_itype_unsigned_char_int},
- {CV_REG_BL, "BL", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Ebx), dbg_itype_unsigned_char_int},
- {CV_REG_AH, "AH", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, Eax)+1), dbg_itype_unsigned_char_int},
- {CV_REG_CH, "CH", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, Ecx)+1), dbg_itype_unsigned_char_int},
- {CV_REG_DH, "DH", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, Edx)+1), dbg_itype_unsigned_char_int},
- {CV_REG_BH, "BH", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, Ebx)+1), dbg_itype_unsigned_char_int},
- {CV_REG_AX, "AX", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Eax), dbg_itype_unsigned_short_int},
- {CV_REG_CX, "CX", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Ecx), dbg_itype_unsigned_short_int},
- {CV_REG_DX, "DX", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Edx), dbg_itype_unsigned_short_int},
- {CV_REG_BX, "BX", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Ebx), dbg_itype_unsigned_short_int},
- {CV_REG_SP, "SP", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Esp), dbg_itype_unsigned_short_int},
- {CV_REG_BP, "BP", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Ebp), dbg_itype_unsigned_short_int},
- {CV_REG_SI, "SI", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Esi), dbg_itype_unsigned_short_int},
- {CV_REG_DI, "DI", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Edi), dbg_itype_unsigned_short_int},
- {CV_REG_EAX, "EAX", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Eax), dbg_itype_unsigned_int},
- {CV_REG_ECX, "ECX", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Ecx), dbg_itype_unsigned_int},
- {CV_REG_EDX, "EDX", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Edx), dbg_itype_unsigned_int},
- {CV_REG_EBX, "EBX", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Ebx), dbg_itype_unsigned_int},
- {CV_REG_ESP, "ESP", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Esp), dbg_itype_unsigned_int},
- {CV_REG_EBP, "EBP", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Ebp), dbg_itype_unsigned_int},
- {CV_REG_ESI, "ESI", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Esi), dbg_itype_unsigned_int},
- {CV_REG_EDI, "EDI", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Edi), dbg_itype_unsigned_int},
- {CV_REG_ES, "ES", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, SegEs), dbg_itype_unsigned_short_int},
- {CV_REG_CS, "CS", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, SegCs), dbg_itype_unsigned_short_int},
- {CV_REG_SS, "SS", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, SegSs), dbg_itype_unsigned_short_int},
- {CV_REG_DS, "DS", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, SegDs), dbg_itype_unsigned_short_int},
- {CV_REG_FS, "FS", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, SegFs), dbg_itype_unsigned_short_int},
- {CV_REG_GS, "GS", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, SegGs), dbg_itype_unsigned_short_int},
- {CV_REG_IP, "IP", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Eip), dbg_itype_unsigned_short_int},
- {CV_REG_FLAGS, "FLAGS", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, EFlags), dbg_itype_unsigned_short_int},
- {CV_REG_EIP, "EIP", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, Eip), dbg_itype_unsigned_int},
- {CV_REG_EFLAGS, "EFLAGS", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, EFlags), dbg_itype_unsigned_int},
- {CV_REG_ST0, "ST0", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[ 0]), dbg_itype_long_real},
- {CV_REG_ST0+1, "ST1", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[10]), dbg_itype_long_real},
- {CV_REG_ST0+2, "ST2", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[20]), dbg_itype_long_real},
- {CV_REG_ST0+3, "ST3", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[30]), dbg_itype_long_real},
- {CV_REG_ST0+4, "ST4", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[40]), dbg_itype_long_real},
- {CV_REG_ST0+5, "ST5", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[50]), dbg_itype_long_real},
- {CV_REG_ST0+6, "ST6", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[60]), dbg_itype_long_real},
- {CV_REG_ST0+7, "ST7", (DWORD_PTR*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[70]), dbg_itype_long_real},
- {CV_AMD64_XMM0, "XMM0", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[0])), dbg_itype_m128a},
- {CV_AMD64_XMM0+1, "XMM1", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[1])), dbg_itype_m128a},
- {CV_AMD64_XMM0+2, "XMM2", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[2])), dbg_itype_m128a},
- {CV_AMD64_XMM0+3, "XMM3", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[3])), dbg_itype_m128a},
- {CV_AMD64_XMM0+4, "XMM4", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[4])), dbg_itype_m128a},
- {CV_AMD64_XMM0+5, "XMM5", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[5])), dbg_itype_m128a},
- {CV_AMD64_XMM0+6, "XMM6", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[6])), dbg_itype_m128a},
- {CV_AMD64_XMM0+7, "XMM7", (DWORD_PTR*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[7])), dbg_itype_m128a},
- {0, NULL, 0, dbg_itype_none}
+ {CV_REG_AL, "AL", (void*)FIELD_OFFSET(WOW64_CONTEXT, Eax), dbg_itype_unsigned_char_int},
+ {CV_REG_CL, "CL", (void*)FIELD_OFFSET(WOW64_CONTEXT, Ecx), dbg_itype_unsigned_char_int},
+ {CV_REG_DL, "DL", (void*)FIELD_OFFSET(WOW64_CONTEXT, Edx), dbg_itype_unsigned_char_int},
+ {CV_REG_BL, "BL", (void*)FIELD_OFFSET(WOW64_CONTEXT, Ebx), dbg_itype_unsigned_char_int},
+ {CV_REG_AH, "AH", (void*)(FIELD_OFFSET(WOW64_CONTEXT, Eax)+1), dbg_itype_unsigned_char_int},
+ {CV_REG_CH, "CH", (void*)(FIELD_OFFSET(WOW64_CONTEXT, Ecx)+1), dbg_itype_unsigned_char_int},
+ {CV_REG_DH, "DH", (void*)(FIELD_OFFSET(WOW64_CONTEXT, Edx)+1), dbg_itype_unsigned_char_int},
+ {CV_REG_BH, "BH", (void*)(FIELD_OFFSET(WOW64_CONTEXT, Ebx)+1), dbg_itype_unsigned_char_int},
+ {CV_REG_AX, "AX", (void*)FIELD_OFFSET(WOW64_CONTEXT, Eax), dbg_itype_unsigned_short_int},
+ {CV_REG_CX, "CX", (void*)FIELD_OFFSET(WOW64_CONTEXT, Ecx), dbg_itype_unsigned_short_int},
+ {CV_REG_DX, "DX", (void*)FIELD_OFFSET(WOW64_CONTEXT, Edx), dbg_itype_unsigned_short_int},
+ {CV_REG_BX, "BX", (void*)FIELD_OFFSET(WOW64_CONTEXT, Ebx), dbg_itype_unsigned_short_int},
+ {CV_REG_SP, "SP", (void*)FIELD_OFFSET(WOW64_CONTEXT, Esp), dbg_itype_unsigned_short_int},
+ {CV_REG_BP, "BP", (void*)FIELD_OFFSET(WOW64_CONTEXT, Ebp), dbg_itype_unsigned_short_int},
+ {CV_REG_SI, "SI", (void*)FIELD_OFFSET(WOW64_CONTEXT, Esi), dbg_itype_unsigned_short_int},
+ {CV_REG_DI, "DI", (void*)FIELD_OFFSET(WOW64_CONTEXT, Edi), dbg_itype_unsigned_short_int},
+ {CV_REG_EAX, "EAX", (void*)FIELD_OFFSET(WOW64_CONTEXT, Eax), dbg_itype_unsigned_int},
+ {CV_REG_ECX, "ECX", (void*)FIELD_OFFSET(WOW64_CONTEXT, Ecx), dbg_itype_unsigned_int},
+ {CV_REG_EDX, "EDX", (void*)FIELD_OFFSET(WOW64_CONTEXT, Edx), dbg_itype_unsigned_int},
+ {CV_REG_EBX, "EBX", (void*)FIELD_OFFSET(WOW64_CONTEXT, Ebx), dbg_itype_unsigned_int},
+ {CV_REG_ESP, "ESP", (void*)FIELD_OFFSET(WOW64_CONTEXT, Esp), dbg_itype_unsigned_int},
+ {CV_REG_EBP, "EBP", (void*)FIELD_OFFSET(WOW64_CONTEXT, Ebp), dbg_itype_unsigned_int},
+ {CV_REG_ESI, "ESI", (void*)FIELD_OFFSET(WOW64_CONTEXT, Esi), dbg_itype_unsigned_int},
+ {CV_REG_EDI, "EDI", (void*)FIELD_OFFSET(WOW64_CONTEXT, Edi), dbg_itype_unsigned_int},
+ {CV_REG_ES, "ES", (void*)FIELD_OFFSET(WOW64_CONTEXT, SegEs), dbg_itype_unsigned_short_int},
+ {CV_REG_CS, "CS", (void*)FIELD_OFFSET(WOW64_CONTEXT, SegCs), dbg_itype_unsigned_short_int},
+ {CV_REG_SS, "SS", (void*)FIELD_OFFSET(WOW64_CONTEXT, SegSs), dbg_itype_unsigned_short_int},
+ {CV_REG_DS, "DS", (void*)FIELD_OFFSET(WOW64_CONTEXT, SegDs), dbg_itype_unsigned_short_int},
+ {CV_REG_FS, "FS", (void*)FIELD_OFFSET(WOW64_CONTEXT, SegFs), dbg_itype_unsigned_short_int},
+ {CV_REG_GS, "GS", (void*)FIELD_OFFSET(WOW64_CONTEXT, SegGs), dbg_itype_unsigned_short_int},
+ {CV_REG_IP, "IP", (void*)FIELD_OFFSET(WOW64_CONTEXT, Eip), dbg_itype_unsigned_short_int},
+ {CV_REG_FLAGS, "FLAGS", (void*)FIELD_OFFSET(WOW64_CONTEXT, EFlags), dbg_itype_unsigned_short_int},
+ {CV_REG_EIP, "EIP", (void*)FIELD_OFFSET(WOW64_CONTEXT, Eip), dbg_itype_unsigned_int},
+ {CV_REG_EFLAGS, "EFLAGS", (void*)FIELD_OFFSET(WOW64_CONTEXT, EFlags), dbg_itype_unsigned_int},
+ {CV_REG_ST0, "ST0", (void*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[ 0]), dbg_itype_long_real},
+ {CV_REG_ST0+1, "ST1", (void*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[10]), dbg_itype_long_real},
+ {CV_REG_ST0+2, "ST2", (void*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[20]), dbg_itype_long_real},
+ {CV_REG_ST0+3, "ST3", (void*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[30]), dbg_itype_long_real},
+ {CV_REG_ST0+4, "ST4", (void*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[40]), dbg_itype_long_real},
+ {CV_REG_ST0+5, "ST5", (void*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[50]), dbg_itype_long_real},
+ {CV_REG_ST0+6, "ST6", (void*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[60]), dbg_itype_long_real},
+ {CV_REG_ST0+7, "ST7", (void*)FIELD_OFFSET(WOW64_CONTEXT, FloatSave.RegisterArea[70]), dbg_itype_long_real},
+ {CV_AMD64_XMM0, "XMM0", (void*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[0])), dbg_itype_m128a},
+ {CV_AMD64_XMM0+1, "XMM1", (void*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[1])), dbg_itype_m128a},
+ {CV_AMD64_XMM0+2, "XMM2", (void*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[2])), dbg_itype_m128a},
+ {CV_AMD64_XMM0+3, "XMM3", (void*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[3])), dbg_itype_m128a},
+ {CV_AMD64_XMM0+4, "XMM4", (void*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[4])), dbg_itype_m128a},
+ {CV_AMD64_XMM0+5, "XMM5", (void*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[5])), dbg_itype_m128a},
+ {CV_AMD64_XMM0+6, "XMM6", (void*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[6])), dbg_itype_m128a},
+ {CV_AMD64_XMM0+7, "XMM7", (void*)(FIELD_OFFSET(WOW64_CONTEXT, ExtendedRegisters) + FIELD_OFFSET(XSAVE_FORMAT, XmmRegisters[7])), dbg_itype_m128a},
+ {0, NULL, 0, dbg_itype_none}
};
static BOOL be_i386_is_step_over_insn(const void* insn)
diff --git a/programs/winedbg/be_x86_64.c b/programs/winedbg/be_x86_64.c
index 45c01a70594..af9f7284685 100644
--- a/programs/winedbg/be_x86_64.c
+++ b/programs/winedbg/be_x86_64.c
@@ -179,80 +179,80 @@ static void be_x86_64_print_segment_info(HANDLE hThread, const dbg_ctx_t *ctx)
static struct dbg_internal_var be_x86_64_ctx[] =
{
- {CV_AMD64_AL, "AL", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rax), dbg_itype_unsigned_char_int},
- {CV_AMD64_BL, "BL", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rbx), dbg_itype_unsigned_char_int},
- {CV_AMD64_CL, "CL", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rcx), dbg_itype_unsigned_char_int},
- {CV_AMD64_DL, "DL", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rdx), dbg_itype_unsigned_char_int},
- {CV_AMD64_AH, "AH", (DWORD_PTR*)(FIELD_OFFSET(CONTEXT, Rax)+1), dbg_itype_unsigned_char_int},
- {CV_AMD64_BH, "BH", (DWORD_PTR*)(FIELD_OFFSET(CONTEXT, Rbx)+1), dbg_itype_unsigned_char_int},
- {CV_AMD64_CH, "CH", (DWORD_PTR*)(FIELD_OFFSET(CONTEXT, Rcx)+1), dbg_itype_unsigned_char_int},
- {CV_AMD64_DH, "DH", (DWORD_PTR*)(FIELD_OFFSET(CONTEXT, Rdx)+1), dbg_itype_unsigned_char_int},
- {CV_AMD64_AX, "AX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rax), dbg_itype_unsigned_short_int},
- {CV_AMD64_BX, "BX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rbx), dbg_itype_unsigned_short_int},
- {CV_AMD64_CX, "CX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rcx), dbg_itype_unsigned_short_int},
- {CV_AMD64_DX, "DX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rdx), dbg_itype_unsigned_short_int},
- {CV_AMD64_SP, "SP", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rsp), dbg_itype_unsigned_short_int},
- {CV_AMD64_BP, "BP", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rbp), dbg_itype_unsigned_short_int},
- {CV_AMD64_SI, "SI", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rsi), dbg_itype_unsigned_short_int},
- {CV_AMD64_DI, "DI", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rdi), dbg_itype_unsigned_short_int},
- {CV_AMD64_EAX, "EAX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rax), dbg_itype_unsigned_int},
- {CV_AMD64_EBX, "EBX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rbx), dbg_itype_unsigned_int},
- {CV_AMD64_ECX, "ECX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rcx), dbg_itype_unsigned_int},
- {CV_AMD64_EDX, "EDX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rdx), dbg_itype_unsigned_int},
- {CV_AMD64_ESP, "ESP", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rsp), dbg_itype_unsigned_int},
- {CV_AMD64_EBP, "EBP", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rbp), dbg_itype_unsigned_int},
- {CV_AMD64_ESI, "ESI", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rsi), dbg_itype_unsigned_int},
- {CV_AMD64_EDI, "EDI", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rdi), dbg_itype_unsigned_int},
- {CV_AMD64_ES, "ES", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, SegEs), dbg_itype_unsigned_short_int},
- {CV_AMD64_CS, "CS", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, SegCs), dbg_itype_unsigned_short_int},
- {CV_AMD64_SS, "SS", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, SegSs), dbg_itype_unsigned_short_int},
- {CV_AMD64_DS, "DS", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, SegDs), dbg_itype_unsigned_short_int},
- {CV_AMD64_FS, "FS", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, SegFs), dbg_itype_unsigned_short_int},
- {CV_AMD64_GS, "GS", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, SegGs), dbg_itype_unsigned_short_int},
- {CV_AMD64_FLAGS, "FLAGS", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, EFlags), dbg_itype_unsigned_short_int},
- {CV_AMD64_EFLAGS, "EFLAGS", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, EFlags), dbg_itype_unsigned_int},
- {CV_AMD64_RIP, "RIP", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rip), dbg_itype_unsigned_long_int},
- {CV_AMD64_RAX, "RAX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rax), dbg_itype_unsigned_long_int},
- {CV_AMD64_RBX, "RBX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rbx), dbg_itype_unsigned_long_int},
- {CV_AMD64_RCX, "RCX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rcx), dbg_itype_unsigned_long_int},
- {CV_AMD64_RDX, "RDX", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rdx), dbg_itype_unsigned_long_int},
- {CV_AMD64_RSP, "RSP", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rsp), dbg_itype_unsigned_long_int},
- {CV_AMD64_RBP, "RBP", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rbp), dbg_itype_unsigned_long_int},
- {CV_AMD64_RSI, "RSI", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rsi), dbg_itype_unsigned_long_int},
- {CV_AMD64_RDI, "RDI", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, Rdi), dbg_itype_unsigned_long_int},
- {CV_AMD64_R8, "R8", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R8), dbg_itype_unsigned_long_int},
- {CV_AMD64_R9, "R9", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R9), dbg_itype_unsigned_long_int},
- {CV_AMD64_R10, "R10", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R10), dbg_itype_unsigned_long_int},
- {CV_AMD64_R11, "R11", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R11), dbg_itype_unsigned_long_int},
- {CV_AMD64_R12, "R12", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R12), dbg_itype_unsigned_long_int},
- {CV_AMD64_R13, "R13", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R13), dbg_itype_unsigned_long_int},
- {CV_AMD64_R14, "R14", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R14), dbg_itype_unsigned_long_int},
- {CV_AMD64_R15, "R15", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, R15), dbg_itype_unsigned_long_int},
- {CV_AMD64_ST0, "ST0", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[0]), dbg_itype_long_real},
- {CV_AMD64_ST0+1, "ST1", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[1]), dbg_itype_long_real},
- {CV_AMD64_ST0+2, "ST2", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[2]), dbg_itype_long_real},
- {CV_AMD64_ST0+3, "ST3", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[3]), dbg_itype_long_real},
- {CV_AMD64_ST0+4, "ST4", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[4]), dbg_itype_long_real},
- {CV_AMD64_ST0+5, "ST5", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[5]), dbg_itype_long_real},
- {CV_AMD64_ST0+6, "ST6", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[6]), dbg_itype_long_real},
- {CV_AMD64_ST0+7, "ST7", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[7]), dbg_itype_long_real},
- {CV_AMD64_XMM0, "XMM0", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm0), dbg_itype_m128a},
- {CV_AMD64_XMM0+1, "XMM1", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm1), dbg_itype_m128a},
- {CV_AMD64_XMM0+2, "XMM2", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm2), dbg_itype_m128a},
- {CV_AMD64_XMM0+3, "XMM3", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm3), dbg_itype_m128a},
- {CV_AMD64_XMM0+4, "XMM4", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm4), dbg_itype_m128a},
- {CV_AMD64_XMM0+5, "XMM5", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm5), dbg_itype_m128a},
- {CV_AMD64_XMM0+6, "XMM6", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm6), dbg_itype_m128a},
- {CV_AMD64_XMM0+7, "XMM7", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm7), dbg_itype_m128a},
- {CV_AMD64_XMM8, "XMM8", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm8), dbg_itype_m128a},
- {CV_AMD64_XMM8+1, "XMM9", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm9), dbg_itype_m128a},
- {CV_AMD64_XMM8+2, "XMM10", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm10), dbg_itype_m128a},
- {CV_AMD64_XMM8+3, "XMM11", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm11), dbg_itype_m128a},
- {CV_AMD64_XMM8+4, "XMM12", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm12), dbg_itype_m128a},
- {CV_AMD64_XMM8+5, "XMM13", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm13), dbg_itype_m128a},
- {CV_AMD64_XMM8+6, "XMM14", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm14), dbg_itype_m128a},
- {CV_AMD64_XMM8+7, "XMM15", (DWORD_PTR*)FIELD_OFFSET(CONTEXT, u.s.Xmm15), dbg_itype_m128a},
- {0, NULL, 0, dbg_itype_none}
+ {CV_AMD64_AL, "AL", (void*)FIELD_OFFSET(CONTEXT, Rax), dbg_itype_unsigned_char_int},
+ {CV_AMD64_BL, "BL", (void*)FIELD_OFFSET(CONTEXT, Rbx), dbg_itype_unsigned_char_int},
+ {CV_AMD64_CL, "CL", (void*)FIELD_OFFSET(CONTEXT, Rcx), dbg_itype_unsigned_char_int},
+ {CV_AMD64_DL, "DL", (void*)FIELD_OFFSET(CONTEXT, Rdx), dbg_itype_unsigned_char_int},
+ {CV_AMD64_AH, "AH", (void*)(FIELD_OFFSET(CONTEXT, Rax)+1), dbg_itype_unsigned_char_int},
+ {CV_AMD64_BH, "BH", (void*)(FIELD_OFFSET(CONTEXT, Rbx)+1), dbg_itype_unsigned_char_int},
+ {CV_AMD64_CH, "CH", (void*)(FIELD_OFFSET(CONTEXT, Rcx)+1), dbg_itype_unsigned_char_int},
+ {CV_AMD64_DH, "DH", (void*)(FIELD_OFFSET(CONTEXT, Rdx)+1), dbg_itype_unsigned_char_int},
+ {CV_AMD64_AX, "AX", (void*)FIELD_OFFSET(CONTEXT, Rax), dbg_itype_unsigned_short_int},
+ {CV_AMD64_BX, "BX", (void*)FIELD_OFFSET(CONTEXT, Rbx), dbg_itype_unsigned_short_int},
+ {CV_AMD64_CX, "CX", (void*)FIELD_OFFSET(CONTEXT, Rcx), dbg_itype_unsigned_short_int},
+ {CV_AMD64_DX, "DX", (void*)FIELD_OFFSET(CONTEXT, Rdx), dbg_itype_unsigned_short_int},
+ {CV_AMD64_SP, "SP", (void*)FIELD_OFFSET(CONTEXT, Rsp), dbg_itype_unsigned_short_int},
+ {CV_AMD64_BP, "BP", (void*)FIELD_OFFSET(CONTEXT, Rbp), dbg_itype_unsigned_short_int},
+ {CV_AMD64_SI, "SI", (void*)FIELD_OFFSET(CONTEXT, Rsi), dbg_itype_unsigned_short_int},
+ {CV_AMD64_DI, "DI", (void*)FIELD_OFFSET(CONTEXT, Rdi), dbg_itype_unsigned_short_int},
+ {CV_AMD64_EAX, "EAX", (void*)FIELD_OFFSET(CONTEXT, Rax), dbg_itype_unsigned_int},
+ {CV_AMD64_EBX, "EBX", (void*)FIELD_OFFSET(CONTEXT, Rbx), dbg_itype_unsigned_int},
+ {CV_AMD64_ECX, "ECX", (void*)FIELD_OFFSET(CONTEXT, Rcx), dbg_itype_unsigned_int},
+ {CV_AMD64_EDX, "EDX", (void*)FIELD_OFFSET(CONTEXT, Rdx), dbg_itype_unsigned_int},
+ {CV_AMD64_ESP, "ESP", (void*)FIELD_OFFSET(CONTEXT, Rsp), dbg_itype_unsigned_int},
+ {CV_AMD64_EBP, "EBP", (void*)FIELD_OFFSET(CONTEXT, Rbp), dbg_itype_unsigned_int},
+ {CV_AMD64_ESI, "ESI", (void*)FIELD_OFFSET(CONTEXT, Rsi), dbg_itype_unsigned_int},
+ {CV_AMD64_EDI, "EDI", (void*)FIELD_OFFSET(CONTEXT, Rdi), dbg_itype_unsigned_int},
+ {CV_AMD64_ES, "ES", (void*)FIELD_OFFSET(CONTEXT, SegEs), dbg_itype_unsigned_short_int},
+ {CV_AMD64_CS, "CS", (void*)FIELD_OFFSET(CONTEXT, SegCs), dbg_itype_unsigned_short_int},
+ {CV_AMD64_SS, "SS", (void*)FIELD_OFFSET(CONTEXT, SegSs), dbg_itype_unsigned_short_int},
+ {CV_AMD64_DS, "DS", (void*)FIELD_OFFSET(CONTEXT, SegDs), dbg_itype_unsigned_short_int},
+ {CV_AMD64_FS, "FS", (void*)FIELD_OFFSET(CONTEXT, SegFs), dbg_itype_unsigned_short_int},
+ {CV_AMD64_GS, "GS", (void*)FIELD_OFFSET(CONTEXT, SegGs), dbg_itype_unsigned_short_int},
+ {CV_AMD64_FLAGS, "FLAGS", (void*)FIELD_OFFSET(CONTEXT, EFlags), dbg_itype_unsigned_short_int},
+ {CV_AMD64_EFLAGS, "EFLAGS", (void*)FIELD_OFFSET(CONTEXT, EFlags), dbg_itype_unsigned_int},
+ {CV_AMD64_RIP, "RIP", (void*)FIELD_OFFSET(CONTEXT, Rip), dbg_itype_unsigned_long_int},
+ {CV_AMD64_RAX, "RAX", (void*)FIELD_OFFSET(CONTEXT, Rax), dbg_itype_unsigned_long_int},
+ {CV_AMD64_RBX, "RBX", (void*)FIELD_OFFSET(CONTEXT, Rbx), dbg_itype_unsigned_long_int},
+ {CV_AMD64_RCX, "RCX", (void*)FIELD_OFFSET(CONTEXT, Rcx), dbg_itype_unsigned_long_int},
+ {CV_AMD64_RDX, "RDX", (void*)FIELD_OFFSET(CONTEXT, Rdx), dbg_itype_unsigned_long_int},
+ {CV_AMD64_RSP, "RSP", (void*)FIELD_OFFSET(CONTEXT, Rsp), dbg_itype_unsigned_long_int},
+ {CV_AMD64_RBP, "RBP", (void*)FIELD_OFFSET(CONTEXT, Rbp), dbg_itype_unsigned_long_int},
+ {CV_AMD64_RSI, "RSI", (void*)FIELD_OFFSET(CONTEXT, Rsi), dbg_itype_unsigned_long_int},
+ {CV_AMD64_RDI, "RDI", (void*)FIELD_OFFSET(CONTEXT, Rdi), dbg_itype_unsigned_long_int},
+ {CV_AMD64_R8, "R8", (void*)FIELD_OFFSET(CONTEXT, R8), dbg_itype_unsigned_long_int},
+ {CV_AMD64_R9, "R9", (void*)FIELD_OFFSET(CONTEXT, R9), dbg_itype_unsigned_long_int},
+ {CV_AMD64_R10, "R10", (void*)FIELD_OFFSET(CONTEXT, R10), dbg_itype_unsigned_long_int},
+ {CV_AMD64_R11, "R11", (void*)FIELD_OFFSET(CONTEXT, R11), dbg_itype_unsigned_long_int},
+ {CV_AMD64_R12, "R12", (void*)FIELD_OFFSET(CONTEXT, R12), dbg_itype_unsigned_long_int},
+ {CV_AMD64_R13, "R13", (void*)FIELD_OFFSET(CONTEXT, R13), dbg_itype_unsigned_long_int},
+ {CV_AMD64_R14, "R14", (void*)FIELD_OFFSET(CONTEXT, R14), dbg_itype_unsigned_long_int},
+ {CV_AMD64_R15, "R15", (void*)FIELD_OFFSET(CONTEXT, R15), dbg_itype_unsigned_long_int},
+ {CV_AMD64_ST0, "ST0", (void*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[0]), dbg_itype_long_real},
+ {CV_AMD64_ST0+1, "ST1", (void*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[1]), dbg_itype_long_real},
+ {CV_AMD64_ST0+2, "ST2", (void*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[2]), dbg_itype_long_real},
+ {CV_AMD64_ST0+3, "ST3", (void*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[3]), dbg_itype_long_real},
+ {CV_AMD64_ST0+4, "ST4", (void*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[4]), dbg_itype_long_real},
+ {CV_AMD64_ST0+5, "ST5", (void*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[5]), dbg_itype_long_real},
+ {CV_AMD64_ST0+6, "ST6", (void*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[6]), dbg_itype_long_real},
+ {CV_AMD64_ST0+7, "ST7", (void*)FIELD_OFFSET(CONTEXT, u.FltSave.FloatRegisters[7]), dbg_itype_long_real},
+ {CV_AMD64_XMM0, "XMM0", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm0), dbg_itype_m128a},
+ {CV_AMD64_XMM0+1, "XMM1", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm1), dbg_itype_m128a},
+ {CV_AMD64_XMM0+2, "XMM2", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm2), dbg_itype_m128a},
+ {CV_AMD64_XMM0+3, "XMM3", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm3), dbg_itype_m128a},
+ {CV_AMD64_XMM0+4, "XMM4", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm4), dbg_itype_m128a},
+ {CV_AMD64_XMM0+5, "XMM5", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm5), dbg_itype_m128a},
+ {CV_AMD64_XMM0+6, "XMM6", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm6), dbg_itype_m128a},
+ {CV_AMD64_XMM0+7, "XMM7", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm7), dbg_itype_m128a},
+ {CV_AMD64_XMM8, "XMM8", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm8), dbg_itype_m128a},
+ {CV_AMD64_XMM8+1, "XMM9", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm9), dbg_itype_m128a},
+ {CV_AMD64_XMM8+2, "XMM10", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm10), dbg_itype_m128a},
+ {CV_AMD64_XMM8+3, "XMM11", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm11), dbg_itype_m128a},
+ {CV_AMD64_XMM8+4, "XMM12", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm12), dbg_itype_m128a},
+ {CV_AMD64_XMM8+5, "XMM13", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm13), dbg_itype_m128a},
+ {CV_AMD64_XMM8+6, "XMM14", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm14), dbg_itype_m128a},
+ {CV_AMD64_XMM8+7, "XMM15", (void*)FIELD_OFFSET(CONTEXT, u.s.Xmm15), dbg_itype_m128a},
+ {0, NULL, 0, dbg_itype_none}
};
#define f_mod(b) ((b)>>6)
diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h
index 0e6d715a2d1..506a7d1797b 100644
--- a/programs/winedbg/debugger.h
+++ b/programs/winedbg/debugger.h
@@ -255,8 +255,8 @@ extern HANDLE dbg_houtput;
struct dbg_internal_var
{
DWORD_PTR val;
- const char* name;
- DWORD_PTR *pval;
+ const char* name;
+ void* pval;
ULONG typeid; /* always internal type */
};
@@ -509,7 +509,7 @@ extern struct dbg_internal_var dbg_internal_vars[];
#define DBG_IVARNAME(_var) dbg_internal_var_##_var
#define DBG_IVARSTRUCT(_var) dbg_internal_vars[DBG_IVARNAME(_var)]
-#define DBG_IVAR(_var) (*(DBG_IVARSTRUCT(_var).pval))
+#define DBG_IVAR(_var) (DBG_IVARSTRUCT(_var).val)
#define INTERNAL_VAR(_var,_val,_ref,itype) DBG_IVARNAME(_var),
enum debug_int_var
{
diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c
index 659ca364544..803a26f1e55 100644
--- a/programs/winedbg/winedbg.c
+++ b/programs/winedbg/winedbg.c
@@ -240,7 +240,7 @@ const struct dbg_internal_var* dbg_get_internal_var(const char* name)
struct dbg_internal_var* ret = (void*)lexeme_alloc_size(sizeof(*ret));
/* relocate register's field against current context */
*ret = *div;
- ret->pval = (DWORD_PTR*)((char*)&dbg_context + (DWORD_PTR)div->pval);
+ ret->pval = (char*)&dbg_context + (DWORD_PTR)div->pval;
return ret;
}
}