mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-05 06:39:52 +00:00
Thread.cpp: Report VM addresses on VM segfault
This commit is contained in:
parent
64c53fcc61
commit
7b8fee7cdb
@ -1818,6 +1818,11 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp) noexcept
|
||||
pExp->ExceptionRecord->ExceptionInformation[0] == 1 ? "writing" : "reading";
|
||||
|
||||
fmt::append(msg, "Segfault %s location %p at %p.\n", cause, pExp->ExceptionRecord->ExceptionInformation[1], pExp->ExceptionRecord->ExceptionAddress);
|
||||
|
||||
if (vm::try_get_addr(reinterpret_cast<u8*>(pExp->ExceptionRecord->ExceptionInformation[1])).second)
|
||||
{
|
||||
fmt::append(msg, "Sudo Addr: %p, VM Addr: %p\n", vm::g_sudo_addr, vm::g_base_addr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1999,6 +2004,11 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
|
||||
|
||||
std::string msg = fmt::format("Segfault %s location %p at %p.\n", cause, info->si_addr, RIP(context));
|
||||
|
||||
if (vm::try_get_addr(info->si_addr).second)
|
||||
{
|
||||
fmt::append(msg, "Sudo Addr: %p, VM Addr: %p\n", vm::g_sudo_addr, vm::g_base_addr);
|
||||
}
|
||||
|
||||
append_thread_name(msg);
|
||||
|
||||
sys_log.fatal("\n%s", msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user