• Rafał Harabień's avatar
    ntdll: Allow getting/setting x86_64 context of x86 processes in wine64. · 77481d36
    Rafał Harabień authored
    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: 's avatarRafał Harabień <rafalh92@outlook.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    77481d36
thread.c 61.1 KB