X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdebug%2Fexceptiontrace.cpp;h=8ffc9c81b988667cffa12d770c1a6e97e5244ba6;hb=f7087c847a03a2bb4e9392e41eac4cb1ec37172c;hp=30df4b6f353718c687774878c04e0f4252b4e9b6;hpb=c7b4b9d6e07b3e32e5b03f41f0640a8273eed848;p=libs%2Fcore.git diff --git a/source/debug/exceptiontrace.cpp b/source/debug/exceptiontrace.cpp index 30df4b6..8ffc9c8 100644 --- a/source/debug/exceptiontrace.cpp +++ b/source/debug/exceptiontrace.cpp @@ -32,13 +32,7 @@ bool trace_enabled = false; Msp::Debug::Backtrace &get_thread_backtrace() { -#if __cplusplus>=201103L static thread_local Msp::Debug::Backtrace backtrace; -#elif defined(__GNUC__) - static __thread Msp::Debug::Backtrace backtrace; -#else - static Msp::Debug::Backtrace backtrace; -#endif return backtrace; } @@ -61,11 +55,11 @@ const Backtrace &get_exception_trace() } // namespace Msp #if defined(WITH_EXCEPTION_TRACE) && !defined(_WIN32) && defined(__GLIBC__) -extern "C" void __cxa_throw(void *exc, std::type_info *type, void (*dest) (void *)) +extern "C" void __cxa_throw(void *exc, type_info *type, void (*dest) (void *)) { if(trace_enabled) get_thread_backtrace() = Msp::Debug::Backtrace::create(); orig_cxa_throw(exc, type, dest); - std::terminate(); + terminate(); } #endif