More logging

This commit is contained in:
Maurice Heumann
2025-04-07 15:36:25 +02:00
parent f087d3998a
commit 66a529cf43
3 changed files with 4 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ using NTSTATUS = std::uint32_t;
#define STATUS_CONNECTION_REFUSED ((NTSTATUS)0xC0000236L)
#define STATUS_TIMER_RESOLUTION_NOT_SET ((NTSTATUS)0xC0000245L)
#define STATUS_ADDRESS_ALREADY_ASSOCIATED ((NTSTATUS)0xC0000328L)
#define STATUS_DEBUGGER_INACTIVE ((NTSTATUS)0xC0000354L)
#define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L)

View File

@@ -3853,7 +3853,7 @@ namespace
NTSTATUS handle_NtSystemDebugControl()
{
return STATUS_NOT_SUPPORTED;
return STATUS_DEBUGGER_INACTIVE;
}
NTSTATUS handle_NtRequestWaitReplyPort()

View File

@@ -457,7 +457,8 @@ void windows_emulator::setup_hooks()
this->emu().hook_instruction(x64_hookable_instructions::invalid, [&] {
const auto ip = this->emu().read_instruction_pointer();
this->log.print(color::gray, "Invalid instruction at: 0x%" PRIx64 "\n", ip);
this->log.print(color::gray, "Invalid instruction at: 0x%" PRIx64 " (via 0x%" PRIx64 ")\n", ip,
this->process.previous_ip);
return instruction_hook_continuation::skip_instruction;
});