+ #if DEBUG_ENABLED
+ DEBUG("__cxa_throw(%p,%p,%p) '%s' by %p",
+ thrown_exception, tinfo, dest, tinfo->name(), __builtin_return_address(0)
+ );
+ {
+ const ::std::exception* e = reinterpret_cast<const ::std::exception*>(thrown_exception);
+ DEBUG("- e.what() = '%s'", e->what());
+ }
+ #endif
+
+ __cxa_exception *except = static_cast<__cxa_exception*>( thrown_exception ) - 1;
+
+ except->unexpectedHandler = 0;
+ except->terminateHandler = 0;
+ except->exceptionType = tinfo;
+ except->exceptionDestructor = dest;
+ memcpy(&except->unwindHeader.exception_class, EXCEPTION_CLASS_ACESS, 8);
+ __cxa_get_globals()->uncaughtExceptions ++;
+
+ int rv = _Unwind_RaiseException( &except->unwindHeader );
+
+ ::_SysDebug("__cxa_throw(%p,%s) :: UNCAUGHT %i", thrown_exception, tinfo->name(), rv);
+ ::std::terminate();
+}
+
+extern "C" void *__cxa_begin_catch(_Unwind_Exception *exceptionObject)
+{
+ __cxa_exception *except = reinterpret_cast<__cxa_exception*>( exceptionObject+1 )-1;
+ DEBUG("__cxa_begin_catch(%p) - except=%p", exceptionObject, except);