Lines Matching refs:exception_header
55 thrown_object_from_cxa_exception(__cxa_exception* exception_header) in thrown_object_from_cxa_exception() argument
57 return static_cast<void*>(exception_header + 1); in thrown_object_from_cxa_exception()
132 …__cxa_exception* exception_header = cxa_exception_from_exception_unwind_exception(unwind_exception… in exception_cleanup_func() local
134 std::__terminate(exception_header->terminateHandler); in exception_cleanup_func()
140 static LIBCXXABI_NORETURN void failed_throw(__cxa_exception* exception_header) { in failed_throw() argument
148 (void) __cxa_begin_catch(&exception_header->unwindHeader); in failed_throw()
149 std::__terminate(exception_header->terminateHandler); in failed_throw()
161 __cxa_exception* exception_header = static_cast<__cxa_exception*>(do_malloc(actual_size)); in __cxa_allocate_exception() local
162 if (NULL == exception_header) in __cxa_allocate_exception()
164 std::memset(exception_header, 0, actual_size); in __cxa_allocate_exception()
165 return thrown_object_from_cxa_exception(exception_header); in __cxa_allocate_exception()
226 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); in __cxa_throw() local
228 exception_header->unexpectedHandler = std::get_unexpected(); in __cxa_throw()
229 exception_header->terminateHandler = std::get_terminate(); in __cxa_throw()
230 exception_header->exceptionType = tinfo; in __cxa_throw()
231 exception_header->exceptionDestructor = dest; in __cxa_throw()
232 setExceptionClass(&exception_header->unwindHeader); in __cxa_throw()
233 …exception_header->referenceCount = 1; // This is a newly allocated exception, no need for thread … in __cxa_throw()
236 exception_header->unwindHeader.exception_cleanup = exception_cleanup_func; in __cxa_throw()
238 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader); in __cxa_throw()
240 _Unwind_RaiseException(&exception_header->unwindHeader); in __cxa_throw()
244 failed_throw(exception_header); in __cxa_throw()
278 __cxa_exception* exception_header = in __cxa_begin_cleanup() local
283 if (0 == exception_header->propagationCount) in __cxa_begin_cleanup()
285 exception_header->nextPropagatingException = globals->propagatingExceptions; in __cxa_begin_cleanup()
286 globals->propagatingExceptions = exception_header; in __cxa_begin_cleanup()
288 ++exception_header->propagationCount; in __cxa_begin_cleanup()
296 globals->propagatingExceptions = exception_header; in __cxa_begin_cleanup()
316 __cxa_exception* exception_header = globals->propagatingExceptions; in __cxa_end_cleanup_impl() local
317 if (NULL == exception_header) in __cxa_end_cleanup_impl()
324 if (isOurExceptionClass(&exception_header->unwindHeader)) in __cxa_end_cleanup_impl()
326 --exception_header->propagationCount; in __cxa_end_cleanup_impl()
327 if (0 == exception_header->propagationCount) in __cxa_end_cleanup_impl()
329 globals->propagatingExceptions = exception_header->nextPropagatingException; in __cxa_end_cleanup_impl()
330 exception_header->nextPropagatingException = NULL; in __cxa_end_cleanup_impl()
337 return &exception_header->unwindHeader; in __cxa_end_cleanup_impl()
394 __cxa_exception* exception_header = in __cxa_begin_catch() local
402 exception_header->handlerCount = exception_header->handlerCount < 0 ? in __cxa_begin_catch()
403 -exception_header->handlerCount + 1 : exception_header->handlerCount + 1; in __cxa_begin_catch()
406 if (exception_header != globals->caughtExceptions) in __cxa_begin_catch()
408 exception_header->nextException = globals->caughtExceptions; in __cxa_begin_catch()
409 globals->caughtExceptions = exception_header; in __cxa_begin_catch()
413 return reinterpret_cast<void*>(exception_header->unwindHeader.barrier_cache.bitpattern[0]); in __cxa_begin_catch()
415 return exception_header->adjustedPtr; in __cxa_begin_catch()
423 globals->caughtExceptions = exception_header; in __cxa_begin_catch()
460 __cxa_exception* exception_header = globals->caughtExceptions; in __cxa_end_catch() local
464 if (NULL != exception_header) in __cxa_end_catch()
466 bool native_exception = isOurExceptionClass(&exception_header->unwindHeader); in __cxa_end_catch()
470 if (exception_header->handlerCount < 0) in __cxa_end_catch()
473 if (0 == incrementHandlerCount(exception_header)) in __cxa_end_catch()
476 globals->caughtExceptions = exception_header->nextException; in __cxa_end_catch()
486 if (0 == decrementHandlerCount(exception_header)) in __cxa_end_catch()
489 globals->caughtExceptions = exception_header->nextException; in __cxa_end_catch()
492 if (isDependentException(&exception_header->unwindHeader)) in __cxa_end_catch()
496 reinterpret_cast<__cxa_dependent_exception*>(exception_header); in __cxa_end_catch()
497 exception_header = in __cxa_end_catch()
503 … __cxa_decrement_exception_refcount(thrown_object_from_cxa_exception(exception_header)); in __cxa_end_catch()
528 __cxa_exception *exception_header = globals->caughtExceptions; in __cxa_current_exception_type() local
529 if (NULL == exception_header) in __cxa_current_exception_type()
531 if (!isOurExceptionClass(&exception_header->unwindHeader)) in __cxa_current_exception_type()
533 return exception_header->exceptionType; in __cxa_current_exception_type()
553 __cxa_exception* exception_header = globals->caughtExceptions; in __cxa_rethrow() local
554 if (NULL == exception_header) in __cxa_rethrow()
556 bool native_exception = isOurExceptionClass(&exception_header->unwindHeader); in __cxa_rethrow()
560 exception_header->handlerCount = -exception_header->handlerCount; in __cxa_rethrow()
573 _Unwind_SjLj_RaiseException(&exception_header->unwindHeader); in __cxa_rethrow()
575 _Unwind_RaiseException(&exception_header->unwindHeader); in __cxa_rethrow()
582 __cxa_begin_catch(&exception_header->unwindHeader); in __cxa_rethrow()
584 std::__terminate(exception_header->terminateHandler); in __cxa_rethrow()
601 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); in __cxa_increment_exception_refcount() local
602 __sync_add_and_fetch(&exception_header->referenceCount, 1); in __cxa_increment_exception_refcount()
619 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); in __cxa_decrement_exception_refcount() local
620 if (__sync_sub_and_fetch(&exception_header->referenceCount, size_t(1)) == 0) in __cxa_decrement_exception_refcount()
622 if (NULL != exception_header->exceptionDestructor) in __cxa_decrement_exception_refcount()
623 exception_header->exceptionDestructor(thrown_object); in __cxa_decrement_exception_refcount()
646 __cxa_exception* exception_header = globals->caughtExceptions; in __cxa_current_primary_exception() local
647 if (NULL == exception_header) in __cxa_current_primary_exception()
649 if (!isOurExceptionClass(&exception_header->unwindHeader)) in __cxa_current_primary_exception()
651 if (isDependentException(&exception_header->unwindHeader)) { in __cxa_current_primary_exception()
653 reinterpret_cast<__cxa_dependent_exception*>(exception_header); in __cxa_current_primary_exception()
654 exception_header = cxa_exception_from_thrown_object(dep_exception_header->primaryException); in __cxa_current_primary_exception()
656 void* thrown_object = thrown_object_from_cxa_exception(exception_header); in __cxa_current_primary_exception()
690 __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); in __cxa_rethrow_primary_exception() local
695 dep_exception_header->exceptionType = exception_header->exceptionType; in __cxa_rethrow_primary_exception()