From 54839b293bf374ab6fc7daeab8bbf314e1787d3a Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sun, 10 Aug 2014 22:56:42 +0300 Subject: [PATCH] Log name of syscall, when access violation occurs --- rpcs3/Emu/CPU/CPUThread.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index 4267e56f91..1f318b8abc 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -1,5 +1,6 @@ #include "stdafx.h" #include "Emu/SysCalls/ErrorCodes.h" +#include "Emu/SysCalls/SysCalls.h" #include "Utilities/Log.h" #include "Emu/Memory/Memory.h" #include "Emu/System.h" @@ -285,8 +286,8 @@ void _se_translator(unsigned int u, EXCEPTION_POINTERS* pExp) // TODO: allow recovering from a page fault //GetCurrentPPUThread().Stop(); Emu.Pause(); - throw fmt::Format("Access violation: addr = 0x%x (last_syscall=0x%llx)", - (u32)addr, (u64)GetCurrentCPUThread()->m_last_syscall); + throw fmt::Format("Access violation: addr = 0x%x (last_syscall=0x%llx (%s))", + (u32)addr, (u64)GetCurrentCPUThread()->m_last_syscall, SysCalls::GetHLEFuncName((u64)GetCurrentCPUThread()->m_last_syscall).c_str()); } else {