mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-04 05:45:03 -06:00
Add stacktrace in case of exception
This commit is contained in:
parent
1c5e30e83f
commit
d97851376d
@ -14,6 +14,11 @@
|
|||||||
#include "Emu/CPU/Backends/AArch64/AArch64Signal.h"
|
#include "Emu/CPU/Backends/AArch64/AArch64Signal.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cpp_lib_stacktrace
|
||||||
|
#include "rpcs3_version.h"
|
||||||
|
#include <stacktrace>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <Psapi.h>
|
#include <Psapi.h>
|
||||||
@ -2800,6 +2805,16 @@ void thread_base::exec()
|
|||||||
|
|
||||||
[[noreturn]] void thread_ctrl::emergency_exit(std::string_view reason)
|
[[noreturn]] void thread_ctrl::emergency_exit(std::string_view reason)
|
||||||
{
|
{
|
||||||
|
// Print stacktrace
|
||||||
|
#ifdef __cpp_lib_stacktrace
|
||||||
|
if (rpcs3::is_local_build())
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
oss << std::stacktrace::current();
|
||||||
|
sys_log.notice("StackTrace\n\n%s\n", oss.str());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (const std::string info = dump_useful_thread_info(); !info.empty())
|
if (const std::string info = dump_useful_thread_info(); !info.empty())
|
||||||
{
|
{
|
||||||
sys_log.notice("\n%s", info);
|
sys_log.notice("\n%s", info);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user