535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
|
if (landingpad != 0 && actionrecords == NULL)
found = CLEANUP_FOUND;
else if (landingpad != 0)
found = find_actionrecord(actionrecords, &lsda, actions,
foreign, e, &filter);
if (!found)
CONTINUE_UNWIND;
if (actions & _UA_SEARCH_PHASE) {
if (!(found & HANDLER_FOUND))
CONTINUE_UNWIND;
/* Cache it so we don't have to search it again in phase 2 */
if (!foreign) {
#if defined(__arm__) || defined(__ARM__)
ex->barrier_cache.sp = _Unwind_GetGR(ctx, 13);
ex->barrier_cache.bitpattern[1] = filter;
ex->barrier_cache.bitpattern[3] = landingpad;
#else
e->landingpad = landingpad;
e->filter = filter;
#endif
}
return _URC_HANDLER_FOUND;
} else if (actions & _UA_CLEANUP_PHASE) {
/* For cleanup, reg #0 must be the exception and reg #1 zero */
_Unwind_SetGR(ctx, __builtin_eh_return_data_regno(0),
(uintptr_t)e);
_Unwind_SetGR(ctx, __builtin_eh_return_data_regno(1), 0);
_Unwind_SetIP(ctx, landingpad);
return _URC_INSTALL_CONTEXT;
}
abort();
}
|
|
<
|
|
|
|
|
<
>
>
|
|
|
>
>
|
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
|
if (landingpad != 0 && actionrecords == NULL)
found = CLEANUP_FOUND;
else if (landingpad != 0)
found = find_actionrecord(actionrecords, &lsda, actions,
foreign, e, &filter);
if (!found || foreign)
CONTINUE_UNWIND;
if (actions & _UA_SEARCH_PHASE) {
if (!(found & HANDLER_FOUND))
CONTINUE_UNWIND;
/* Cache it so we don't have to search it again in phase 2 */
#if defined(__arm__) || defined(__ARM__)
ex->barrier_cache.sp = _Unwind_GetGR(ctx, 13);
ex->barrier_cache.bitpattern[1] = filter;
ex->barrier_cache.bitpattern[3] = landingpad;
#else
e->landingpad = landingpad;
e->filter = filter;
#endif
return _URC_HANDLER_FOUND;
} else if (actions & _UA_CLEANUP_PHASE) {
if (!(found & CLEANUP_FOUND))
CONTINUE_UNWIND;
_Unwind_SetGR(ctx, __builtin_eh_return_data_regno(0),
(uintptr_t)e->object);
_Unwind_SetGR(ctx, __builtin_eh_return_data_regno(1), filter);
_Unwind_SetIP(ctx, landingpad);
free(ex);
return _URC_INSTALL_CONTEXT;
}
abort();
}
|