ntdll: Allow getting/setting x86_64 context of x86 processes in wine64.
commit77481d36d3a9ce87a213424aef65ad094b42b022
authorRafał Harabień <rafalh92@outlook.com>
Sun, 28 Feb 2021 23:42:28 +0000 (1 00:42 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 9 Mar 2021 20:33:43 +0000 (9 21:33 +0100)
tree297d094daf10a6f0a71bd379beb79ba1a341b258
parentbee9f0126fe43359b87b2d9fc2c1e2577ebda4c1
ntdll: Allow getting/setting x86_64 context of x86 processes in wine64.

WoW64 process has two separate contexts:
- x86 context used most of the time (e.g. by application code)
- x86_64 context used by system when it quits x86 emulation and jumps to
  the kernel code
A notable exception are debug registers - their state is shared. Some
debuggers make use of that fact and sets/gets debug registers of x86
processes using x86_64 thread context.

Add support for setting and getting debug registers using x86_64
thread context. Getting other registers is allowed too and will return
values from x86 thread context.

Fixes hardware breakpoints in IDA 7.0 disassembler (x86_64 app) when
debugging x86 (32 bit) applications.

Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/ntdll/tests/exception.c
dlls/ntdll/unix/signal_x86_64.c
server/thread.c