Jacek Caban : ntdll: Use syscall frame for volatile registers in x64_64 NtGetContextThread.

Alexandre Julliard julliard at winehq.org
Wed Feb 17 16:23:33 CST 2021


Module: wine
Branch: master
Commit: b817eb3ec804d3e9fce698f8f4bbc6299deae6d8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b817eb3ec804d3e9fce698f8f4bbc6299deae6d8

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb 15 21:58:49 2021 +0100

ntdll: Use syscall frame for volatile registers in x64_64 NtGetContextThread.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/unix/signal_x86_64.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 35395283619..6e34e0d9979 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -1923,16 +1923,16 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
     {
         if (needed_flags & CONTEXT_INTEGER)
         {
-            context->Rax = 0;
+            context->Rax = frame->rax;
             context->Rbx = frame->rbx;
-            context->Rcx = 0;
-            context->Rdx = 0;
+            context->Rcx = frame->rcx;
+            context->Rdx = frame->rdx;
             context->Rsi = frame->rsi;
             context->Rdi = frame->rdi;
-            context->R8  = 0;
-            context->R9  = 0;
-            context->R10 = 0;
-            context->R11 = 0;
+            context->R8  = frame->r8;
+            context->R9  = frame->r9;
+            context->R10 = frame->r10;
+            context->R11 = frame->r11;
             context->R12 = frame->r12;
             context->R13 = frame->r13;
             context->R14 = frame->r14;




More information about the wine-cvs mailing list