diff --git a/src/ldc/eh/libunwind.d b/src/ldc/eh/libunwind.d index a1f1499520..3b21591dc7 100644 --- a/src/ldc/eh/libunwind.d +++ b/src/ldc/eh/libunwind.d @@ -247,7 +247,17 @@ struct NativeContext debug(EH_personality) printf(" - Found catch clause for %p\n", exception_struct); if (actions & _Unwind_Action.SEARCH_PHASE) + { + // Cache phase 1 data (TODO: take advantage of cache) + version (ARM_EABI_UNWINDER) with (exception_struct.unwind_info) + { + barrier_cache.sp = _Unwind_GetGR(context, UNWIND_STACK_REG); + barrier_cache.bitpattern[1] = ti_offset; + barrier_cache.bitpattern[3] = landingPadAddr; + } + return _Unwind_Reason_Code.HANDLER_FOUND; + } if (!(actions & _Unwind_Action.CLEANUP_PHASE)) fatalerror("Unknown phase");