diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2024-11-22 20:10:22 +0100 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2024-11-22 20:10:26 +0100 |
commit | d2f4f6bf543afc05c538e130ac4156e453b900c7 (patch) | |
tree | 27c94084dea43140972da5c067d649168d026f36 /gdb/windows-nat.c | |
parent | 987db70acefd0b223a8df2240d4e5ca544cc0a91 (diff) | |
download | gdb-d2f4f6bf543afc05c538e130ac4156e453b900c7.zip gdb-d2f4f6bf543afc05c538e130ac4156e453b900c7.tar.gz gdb-d2f4f6bf543afc05c538e130ac4156e453b900c7.tar.bz2 |
Use appropriate context flags for Wow64 processes
When I implemented debugging of Wow64 processes, I missed that there are
extra ContextFlags defines for them.
It's a bit surprising that the wrong ones actually worked, except that
CONTEXT_EXTENDED_REGISTERS is not available for x86_64, and they are
needed for i686, since that's where the xmm registers are stored.
So this replaces the ContextFlags values with their WOW64_* equivalents.
On gdbserver this also duplicates the fallback logic if the
GetThreadContext call failed with CONTEXT_EXTENDED_REGISTERS.
Fixes these fails:
FAIL: gdb.arch/i386-sse.exp: check float contents of %xmm0
FAIL: gdb.arch/i386-sse.exp: check int8 contents of %xmm0
FAIL: gdb.arch/i386-sse.exp: check float contents of %xmm1
FAIL: gdb.arch/i386-sse.exp: check int8 contents of %xmm1
FAIL: gdb.arch/i386-sse.exp: check float contents of %xmm2
FAIL: gdb.arch/i386-sse.exp: check int8 contents of %xmm2
FAIL: gdb.arch/i386-sse.exp: check float contents of %xmm3
FAIL: gdb.arch/i386-sse.exp: check int8 contents of %xmm3
FAIL: gdb.arch/i386-sse.exp: check float contents of %xmm4
FAIL: gdb.arch/i386-sse.exp: check int8 contents of %xmm4
FAIL: gdb.arch/i386-sse.exp: check float contents of %xmm5
FAIL: gdb.arch/i386-sse.exp: check int8 contents of %xmm5
FAIL: gdb.arch/i386-sse.exp: check float contents of %xmm6
FAIL: gdb.arch/i386-sse.exp: check int8 contents of %xmm6
FAIL: gdb.arch/i386-sse.exp: check float contents of %xmm7
FAIL: gdb.arch/i386-sse.exp: check int8 contents of %xmm7
FAIL: gdb.arch/i386-sse.exp: check contents of data[0]
FAIL: gdb.arch/i386-sse.exp: check contents of data[1]
FAIL: gdb.arch/i386-sse.exp: check contents of data[2]
FAIL: gdb.arch/i386-sse.exp: check contents of data[3]
FAIL: gdb.arch/i386-sse.exp: check contents of data[4]
FAIL: gdb.arch/i386-sse.exp: check contents of data[5]
FAIL: gdb.arch/i386-sse.exp: check contents of data[6]
FAIL: gdb.arch/i386-sse.exp: check contents of data[7]
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r-- | gdb/windows-nat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 37c1f46..abacafe 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -730,7 +730,7 @@ windows_nat_target::fetch_registers (struct regcache *regcache, int r) #ifdef __x86_64__ if (windows_process.wow64_process) { - th->wow64_context.ContextFlags = CONTEXT_DEBUGGER_DR; + th->wow64_context.ContextFlags = WOW64_CONTEXT_ALL; CHECK (Wow64GetThreadContext (th->h, &th->wow64_context)); /* Copy dr values from that thread. But only if there were not modified since last stop. @@ -1290,7 +1290,7 @@ windows_nat_target::windows_continue (DWORD continue_status, int id, { if (th->debug_registers_changed) { - th->wow64_context.ContextFlags |= CONTEXT_DEBUG_REGISTERS; + th->wow64_context.ContextFlags |= WOW64_CONTEXT_DEBUG_REGISTERS; th->wow64_context.Dr0 = windows_process.dr[0]; th->wow64_context.Dr1 = windows_process.dr[1]; th->wow64_context.Dr2 = windows_process.dr[2]; |