mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
Thread.cpp: Report VM addresses on VM segfault
This commit is contained in:
parent
64c53fcc61
commit
7b8fee7cdb
1 changed files with 10 additions and 0 deletions
|
@ -1818,6 +1818,11 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp) noexcept
|
||||||
pExp->ExceptionRecord->ExceptionInformation[0] == 1 ? "writing" : "reading";
|
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);
|
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
|
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));
|
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);
|
append_thread_name(msg);
|
||||||
|
|
||||||
sys_log.fatal("\n%s", msg);
|
sys_log.fatal("\n%s", msg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue