Lines Matching defs:exception_header
47 // Note: This is never called when exception_header is masquerading as a
52 thrown_object_from_cxa_exception(__cxa_exception* exception_header)
54 return static_cast<void*>(exception_header + 1);
115 __cxa_exception* exception_header = cxa_exception_from_exception_unwind_exception(unwind_exception);
117 std::__terminate(exception_header->terminateHandler);
123 static LIBCXXABI_NORETURN void failed_throw(__cxa_exception* exception_header) {
131 (void) __cxa_begin_catch(&exception_header->unwindHeader);
132 std::__terminate(exception_header->terminateHandler);
144 __cxa_exception *exception_header =
146 if (NULL == exception_header)
148 std::memset(exception_header, 0, actual_size);
149 return thrown_object_from_cxa_exception(exception_header);
208 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
210 exception_header->unexpectedHandler = std::get_unexpected();
211 exception_header->terminateHandler = std::get_terminate();
212 exception_header->exceptionType = tinfo;
213 exception_header->exceptionDestructor = dest;
214 setExceptionClass(&exception_header->unwindHeader);
215 exception_header->referenceCount = 1; // This is a newly allocated exception, no need for thread safety.
218 exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
220 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
222 _Unwind_RaiseException(&exception_header->unwindHeader);
226 failed_throw(exception_header);
258 __cxa_exception* exception_header =
263 if (0 == exception_header->propagationCount)
265 exception_header->nextPropagatingException = globals->propagatingExceptions;
266 globals->propagatingExceptions = exception_header;
268 ++exception_header->propagationCount;
276 globals->propagatingExceptions = exception_header;
296 __cxa_exception* exception_header = globals->propagatingExceptions;
297 if (NULL == exception_header)
304 if (isOurExceptionClass(&exception_header->unwindHeader))
306 --exception_header->propagationCount;
307 if (0 == exception_header->propagationCount)
309 globals->propagatingExceptions = exception_header->nextPropagatingException;
310 exception_header->nextPropagatingException = NULL;
317 return &exception_header->unwindHeader;
371 // exception_header is a hackish offset from a foreign exception, but it
374 __cxa_exception* exception_header =
382 exception_header->handlerCount = exception_header->handlerCount < 0 ?
383 -exception_header->handlerCount + 1 : exception_header->handlerCount + 1;
386 if (exception_header != globals->caughtExceptions)
388 exception_header->nextException = globals->caughtExceptions;
389 globals->caughtExceptions = exception_header;
393 return reinterpret_cast<void*>(exception_header->unwindHeader.barrier_cache.bitpattern[0]);
395 return exception_header->adjustedPtr;
403 globals->caughtExceptions = exception_header;
440 __cxa_exception* exception_header = globals->caughtExceptions;
444 if (NULL != exception_header)
446 bool native_exception = isOurExceptionClass(&exception_header->unwindHeader);
450 if (exception_header->handlerCount < 0)
453 if (0 == incrementHandlerCount(exception_header))
456 globals->caughtExceptions = exception_header->nextException;
466 if (0 == decrementHandlerCount(exception_header))
469 globals->caughtExceptions = exception_header->nextException;
472 if (isDependentException(&exception_header->unwindHeader))
474 // Reset exception_header to primaryException and deallocate the dependent exception
476 reinterpret_cast<__cxa_dependent_exception*>(exception_header);
477 exception_header =
483 __cxa_decrement_exception_refcount(thrown_object_from_cxa_exception(exception_header));
500 // Note: exception_header may be masquerading as a __cxa_dependent_exception
508 __cxa_exception *exception_header = globals->caughtExceptions;
509 if (NULL == exception_header)
511 if (!isOurExceptionClass(&exception_header->unwindHeader))
513 return exception_header->exceptionType;
525 Note: exception_header may be masquerading as a __cxa_dependent_exception
530 __cxa_exception* exception_header = globals->caughtExceptions;
531 if (NULL == exception_header)
533 bool native_exception = isOurExceptionClass(&exception_header->unwindHeader);
537 exception_header->handlerCount = -exception_header->handlerCount;
550 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
552 _Unwind_RaiseException(&exception_header->unwindHeader);
559 __cxa_begin_catch(&exception_header->unwindHeader);
561 std::__terminate(exception_header->terminateHandler);
562 // Foreign exception: can't get exception_header->terminateHandler
577 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
578 __sync_add_and_fetch(&exception_header->referenceCount, 1);
594 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
595 if (__sync_sub_and_fetch(&exception_header->referenceCount, size_t(1)) == 0)
597 if (NULL != exception_header->exceptionDestructor)
598 exception_header->exceptionDestructor(thrown_object);
619 __cxa_exception* exception_header = globals->caughtExceptions;
620 if (NULL == exception_header)
622 if (!isOurExceptionClass(&exception_header->unwindHeader))
624 if (isDependentException(&exception_header->unwindHeader)) {
626 reinterpret_cast<__cxa_dependent_exception*>(exception_header);
627 exception_header = cxa_exception_from_thrown_object(dep_exception_header->primaryException);
629 void* thrown_object = thrown_object_from_cxa_exception(exception_header);
663 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
668 dep_exception_header->exceptionType = exception_header->exceptionType;