Lines Matching full: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);
278 __cxa_exception* exception_header =
283 if (0 == exception_header->propagationCount)
285 exception_header->nextPropagatingException = globals->propagatingExceptions;
286 globals->propagatingExceptions = exception_header;
288 ++exception_header->propagationCount;
296 globals->propagatingExceptions = exception_header;
316 __cxa_exception* exception_header = globals->propagatingExceptions;
317 if (NULL == exception_header)
324 if (isOurExceptionClass(&exception_header->unwindHeader))
326 --exception_header->propagationCount;
327 if (0 == exception_header->propagationCount)
329 globals->propagatingExceptions = exception_header->nextPropagatingException;
330 exception_header->nextPropagatingException = NULL;
337 return &exception_header->unwindHeader;
391 // exception_header is a hackish offset from a foreign exception, but it
394 __cxa_exception* exception_header =
402 exception_header->handlerCount = exception_header->handlerCount < 0 ?
403 -exception_header->handlerCount + 1 : exception_header->handlerCount + 1;
406 if (exception_header != globals->caughtExceptions)
408 exception_header->nextException = globals->caughtExceptions;
409 globals->caughtExceptions = exception_header;
413 return reinterpret_cast<void*>(exception_header->unwindHeader.barrier_cache.bitpattern[0]);
415 return exception_header->adjustedPtr;
423 globals->caughtExceptions = exception_header;
460 __cxa_exception* exception_header = globals->caughtExceptions;
464 if (NULL != exception_header)
466 bool native_exception = isOurExceptionClass(&exception_header->unwindHeader);
470 if (exception_header->handlerCount < 0)
473 if (0 == incrementHandlerCount(exception_header))
476 globals->caughtExceptions = exception_header->nextException;
486 if (0 == decrementHandlerCount(exception_header))
489 globals->caughtExceptions = exception_header->nextException;
492 if (isDependentException(&exception_header->unwindHeader))
494 // Reset exception_header to primaryException and deallocate the dependent exception
496 reinterpret_cast<__cxa_dependent_exception*>(exception_header);
497 exception_header =
503 __cxa_decrement_exception_refcount(thrown_object_from_cxa_exception(exception_header));
520 // Note: exception_header may be masquerading as a __cxa_dependent_exception
528 __cxa_exception *exception_header = globals->caughtExceptions;
529 if (NULL == exception_header)
531 if (!isOurExceptionClass(&exception_header->unwindHeader))
533 return exception_header->exceptionType;
545 Note: exception_header may be masquerading as a __cxa_dependent_exception
553 __cxa_exception* exception_header = globals->caughtExceptions;
554 if (NULL == exception_header)
556 bool native_exception = isOurExceptionClass(&exception_header->unwindHeader);
560 exception_header->handlerCount = -exception_header->handlerCount;
573 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
575 _Unwind_RaiseException(&exception_header->unwindHeader);
582 __cxa_begin_catch(&exception_header->unwindHeader);
584 std::__terminate(exception_header->terminateHandler);
585 // Foreign exception: can't get exception_header->terminateHandler
601 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
602 __sync_add_and_fetch(&exception_header->referenceCount, 1);
619 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
620 if (__sync_sub_and_fetch(&exception_header->referenceCount, size_t(1)) == 0)
622 if (NULL != exception_header->exceptionDestructor)
623 exception_header->exceptionDestructor(thrown_object);
646 __cxa_exception* exception_header = globals->caughtExceptions;
647 if (NULL == exception_header)
649 if (!isOurExceptionClass(&exception_header->unwindHeader))
651 if (isDependentException(&exception_header->unwindHeader)) {
653 reinterpret_cast<__cxa_dependent_exception*>(exception_header);
654 exception_header = cxa_exception_from_thrown_object(dep_exception_header->primaryException);
656 void* thrown_object = thrown_object_from_cxa_exception(exception_header);
690 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
695 dep_exception_header->exceptionType = exception_header->exceptionType;