From fc3ea7d1ef6860ab04fcfaa24353c5a8d06ff8ee Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 7 Feb 2018 16:51:17 +0330 Subject: [PATCH] winedbg: Handle byte-sized registers in cpu_register() and cpu_register_hex_from(). Like for example the recently added floating-point TagWord on AMD64. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- programs/winedbg/gdbproxy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index 5fa48830e2b..618c5dfc98e 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -517,6 +517,7 @@ static inline DWORD64 cpu_register(CONTEXT* ctx, unsigned idx) { switch (cpu_register_map[idx].ctx_length) { + case 1: return *(BYTE*)cpu_register_ptr(ctx, idx); case 2: return *(WORD*)cpu_register_ptr(ctx, idx); case 4: return *(DWORD*)cpu_register_ptr(ctx, idx); case 8: return *(DWORD64*)cpu_register_ptr(ctx, idx); @@ -545,6 +546,7 @@ static inline void cpu_register_hex_from(CONTEXT* ctx, unsigned idx, const } switch (cpu_register_map[idx].ctx_length) { + case 1: *(BYTE*)cpu_register_ptr(ctx, idx) = (BYTE)val; break; case 2: *(WORD*)cpu_register_ptr(ctx, idx) = (WORD)val; break; case 4: *(DWORD*)cpu_register_ptr(ctx, idx) = (DWORD)val; break; case 8: *(DWORD64*)cpu_register_ptr(ctx, idx) = val; break;