From 1fad315029afb7d7ef4d92b670f31da96cb01be8 Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Tue, 4 Feb 2025 13:47:30 +0100 Subject: [PATCH] Fix debug register logging --- src/windows-emulator/syscalls.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/windows-emulator/syscalls.cpp b/src/windows-emulator/syscalls.cpp index 01d3b070..5a9e1cd8 100644 --- a/src/windows-emulator/syscalls.cpp +++ b/src/windows-emulator/syscalls.cpp @@ -3550,7 +3550,7 @@ namespace thread->restore(c.emu); thread_context.access([&](CONTEXT64& context) { - if (context.ContextFlags & CONTEXT_DEBUG_REGISTERS_64) + if ((context.ContextFlags & CONTEXT_DEBUG_REGISTERS_64) == CONTEXT_DEBUG_REGISTERS_64) { c.win_emu.log.print(color::pink, "--> Reading debug registers!\n"); } @@ -3588,6 +3588,12 @@ namespace const auto context = thread_context.read(); context_frame::restore(c.emu, context); + + if ((context.ContextFlags & CONTEXT_DEBUG_REGISTERS_64) == CONTEXT_DEBUG_REGISTERS_64) + { + c.win_emu.log.print(color::pink, "--> Setting debug registers!\n"); + } + return STATUS_SUCCESS; }