logs improvements

* Do not use unsafe pointer arithmetics exceeding existing memory. (exceeding m_fptr)
* Properly use the enire 32MB of the buffer, previously only 16MB were used for cuncurrent access.
* Fix a bug occurring after attempting to push 1TB (40 bits).
* Flush the log before hitting a debugging breakpoint.
This commit is contained in:
Eladash 2022-11-11 18:35:52 +02:00 committed by Ivan
parent 60c01ef9a9
commit e9e139c364
3 changed files with 98 additions and 26 deletions

View file

@ -1927,7 +1927,10 @@ const bool s_terminate_handler_set = []() -> bool
std::set_terminate([]()
{
if (IsDebuggerPresent())
{
logs::listener::sync_all();
utils::trap();
}
report_fatal_error("RPCS3 has abnormally terminated.");
});
@ -2650,7 +2653,10 @@ void thread_base::exec()
sig_log.fatal("Thread terminated due to fatal error: %s", reason);
if (IsDebuggerPresent())
{
logs::listener::sync_all();
utils::trap();
}
if (const auto _this = g_tls_this_thread)
{