Home | History | Annotate | Download | only in src

Lines Matching refs:exception_header

50 // Note:  This is never called when exception_header is masquerading as a
55 thrown_object_from_cxa_exception(__cxa_exception* exception_header)
57 return static_cast<void*>(exception_header + 1);
132 __cxa_exception* exception_header = cxa_exception_from_exception_unwind_exception(unwind_exception);
134 std::__terminate(exception_header->terminateHandler);
140 static LIBCXXABI_NORETURN void failed_throw(__cxa_exception* exception_header) {
148 (void) __cxa_begin_catch(&exception_header->unwindHeader);
149 std::__terminate(exception_header->terminateHandler);
161 __cxa_exception* exception_header = static_cast<__cxa_exception*>(do_malloc(actual_size));
162 if (NULL == exception_header)
164 std::memset(exception_header, 0, actual_size);
165 return thrown_object_from_cxa_exception(exception_header);
226 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
228 exception_header->unexpectedHandler = std::get_unexpected();
229 exception_header->terminateHandler = std::get_terminate();
230 exception_header->exceptionType = tinfo;
231 exception_header->exceptionDestructor = dest;
232 setExceptionClass(&exception_header->unwindHeader);
233 exception_header->referenceCount = 1; // This is a newly allocated exception, no need for thread safety.
236 exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
238 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
240 _Unwind_RaiseException(&exception_header->unwindHeader);
244 failed_throw(exception_header);
280 __cxa_exception* exception_header =
285 if (0 == exception_header->propagationCount)
287 exception_header->nextPropagatingException = globals->propagatingExceptions;
288 globals->propagatingExceptions = exception_header;
290 ++exception_header->propagationCount;
298 globals->propagatingExceptions = exception_header;
318 __cxa_exception* exception_header = globals->propagatingExceptions;
319 if (NULL == exception_header)
326 if (isOurExceptionClass(&exception_header->unwindHeader))
328 --exception_header->propagationCount;
329 if (0 == exception_header->propagationCount)
331 globals->propagatingExceptions = exception_header->nextPropagatingException;
332 exception_header->nextPropagatingException = NULL;
339 return &exception_header->unwindHeader;
393 // exception_header is a hackish offset from a foreign exception, but it
396 __cxa_exception* exception_header =
404 exception_header->handlerCount = exception_header->handlerCount < 0 ?
405 -exception_header->handlerCount + 1 : exception_header->handlerCount + 1;
408 if (exception_header != globals->caughtExceptions)
410 exception_header->nextException = globals->caughtExceptions;
411 globals->caughtExceptions = exception_header;
415 return reinterpret_cast<void*>(exception_header->unwindHeader.barrier_cache.bitpattern[0]);
417 return exception_header->adjustedPtr;
425 globals->caughtExceptions = exception_header;
462 __cxa_exception* exception_header = globals->caughtExceptions;
466 if (NULL != exception_header)
468 bool native_exception = isOurExceptionClass(&exception_header->unwindHeader);
472 if (exception_header->handlerCount < 0)
475 if (0 == incrementHandlerCount(exception_header))
478 globals->caughtExceptions = exception_header->nextException;
488 if (0 == decrementHandlerCount(exception_header))
491 globals->caughtExceptions = exception_header->nextException;
494 if (isDependentException(&exception_header->unwindHeader))
496 // Reset exception_header to primaryException and deallocate the dependent exception
498 reinterpret_cast<__cxa_dependent_exception*>(exception_header);
499 exception_header =
505 __cxa_decrement_exception_refcount(thrown_object_from_cxa_exception(exception_header));
522 // Note: exception_header may be masquerading as a __cxa_dependent_exception
530 __cxa_exception *exception_header = globals->caughtExceptions;
531 if (NULL == exception_header)
533 if (!isOurExceptionClass(&exception_header->unwindHeader))
535 return exception_header->exceptionType;
547 Note: exception_header may be masquerading as a __cxa_dependent_exception
555 __cxa_exception* exception_header = globals->caughtExceptions;
556 if (NULL == exception_header)
558 bool native_exception = isOurExceptionClass(&exception_header->unwindHeader);
562 exception_header->handlerCount = -exception_header->handlerCount;
575 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
577 _Unwind_RaiseException(&exception_header->unwindHeader);
584 __cxa_begin_catch(&exception_header->unwindHeader);
586 std::__terminate(exception_header->terminateHandler);
587 // Foreign exception: can't get exception_header->terminateHandler
603 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
604 __sync_add_and_fetch(&exception_header->referenceCount, 1);
621 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
622 if (__sync_sub_and_fetch(&exception_header->referenceCount, size_t(1)) == 0)
624 if (NULL != exception_header->exceptionDestructor)
625 exception_header->exceptionDestructor(thrown_object);
648 __cxa_exception* exception_header = globals->caughtExceptions;
649 if (NULL == exception_header)
651 if (!isOurExceptionClass(&exception_header->unwindHeader))
653 if (isDependentException(&exception_header->unwindHeader)) {
655 reinterpret_cast<__cxa_dependent_exception*>(exception_header);
656 exception_header = cxa_exception_from_thrown_object(dep_exception_header->primaryException);
658 void* thrown_object = thrown_object_from_cxa_exception(exception_header);
692 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
697 dep_exception_header->exceptionType = exception_header->exceptionType;