server: Check for system regs before suspending for ptrace.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2021-05-24 14:45:40 +03:00 committed by Alexandre Julliard
parent 8a54803c4a
commit 385142bb9e
1 changed files with 3 additions and 3 deletions

View File

@ -571,15 +571,15 @@ void get_thread_context( struct thread *thread, context_t *context, unsigned int
/* all other regs are handled on the client side */
assert( flags == SERVER_CTX_DEBUG_REGISTERS );
if (!suspend_for_ptrace( thread )) return;
if (!(thread->system_regs & SERVER_CTX_DEBUG_REGISTERS))
{
/* caller has initialized everything to 0 already, just return */
context->flags |= SERVER_CTX_DEBUG_REGISTERS;
goto done;
return;
}
if (!suspend_for_ptrace( thread )) return;
for (i = 0; i < 8; i++)
{
if (i == 4 || i == 5) continue;