From cb4711203bcba3624d03095017ea2c75d55cee2c Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 4 Dec 2021 12:14:46 +0200 Subject: [PATCH] logging: Tell apart PPU access violation caused by executing unmapped memory --- Utilities/Thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 3a9c99a506..32bb89872c 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1582,7 +1582,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) no // Do not log any further access violations in this case. if (!g_tls_access_violation_recovered) { - vm_log.fatal("Access violation %s location 0x%x (%s) [type=u%u]", is_writing ? "writing" : "reading", addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory", d_size * 8); + vm_log.fatal("Access violation %s location 0x%x (%s) [type=u%u]", is_writing ? "writing" : (cpu && cpu->id_type() == 1 && cpu->get_pc() == addr ? "executing" : "reading"), addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory", d_size * 8); } while (Emu.IsPaused())