aboutsummaryrefslogtreecommitdiff
path: root/lib/libunwind/src/Unwind-seh.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-08-11 17:19:17 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-09-19 09:37:31 -0700
commit571a4c86c39d83b28a0c6f413f3fc259b48cf422 (patch)
tree4084e777e8d7cd3e305622f3631bc5ff72c0c756 /lib/libunwind/src/Unwind-seh.cpp
parent6a07b7024a33211f158f0c332267050955896918 (diff)
downloadzig-571a4c86c39d83b28a0c6f413f3fc259b48cf422.tar.gz
zig-571a4c86c39d83b28a0c6f413f3fc259b48cf422.zip
libunwind: update to LLVM 17
release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8
Diffstat (limited to 'lib/libunwind/src/Unwind-seh.cpp')
-rw-r--r--lib/libunwind/src/Unwind-seh.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/libunwind/src/Unwind-seh.cpp b/lib/libunwind/src/Unwind-seh.cpp
index d08c29c213..b2bb119ed6 100644
--- a/lib/libunwind/src/Unwind-seh.cpp
+++ b/lib/libunwind/src/Unwind-seh.cpp
@@ -212,11 +212,20 @@ __libunwind_seh_personality(int version, _Unwind_Action state,
ms_exc.ExceptionInformation[2] = state;
DISPATCHER_CONTEXT *disp_ctx =
__unw_seh_get_disp_ctx((unw_cursor_t *)context);
+ _LIBUNWIND_TRACE_UNWINDING("__libunwind_seh_personality() calling "
+ "LanguageHandler %p(%p, %p, %p, %p)",
+ (void *)disp_ctx->LanguageHandler, (void *)&ms_exc,
+ (void *)disp_ctx->EstablisherFrame,
+ (void *)disp_ctx->ContextRecord, (void *)disp_ctx);
EXCEPTION_DISPOSITION ms_act = disp_ctx->LanguageHandler(&ms_exc,
(PVOID)disp_ctx->EstablisherFrame,
disp_ctx->ContextRecord,
disp_ctx);
+ _LIBUNWIND_TRACE_UNWINDING("__libunwind_seh_personality() LanguageHandler "
+ "returned %d",
+ (int)ms_act);
switch (ms_act) {
+ case ExceptionContinueExecution: return _URC_END_OF_STACK;
case ExceptionContinueSearch: return _URC_CONTINUE_UNWIND;
case 4 /*ExceptionExecuteHandler*/:
return phase2 ? _URC_INSTALL_CONTEXT : _URC_HANDLER_FOUND;
@@ -238,7 +247,7 @@ unwind_phase2_forced(unw_context_t *uc,
// Update info about this frame.
unw_proc_info_t frameInfo;
if (__unw_get_proc_info(&cursor2, &frameInfo) != UNW_ESUCCESS) {
- _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): __unw_step "
+ _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): __unw_get_proc_info "
"failed => _URC_END_OF_STACK",
(void *)exception_object);
return _URC_FATAL_PHASE2_ERROR;
@@ -304,6 +313,12 @@ unwind_phase2_forced(unw_context_t *uc,
// We may get control back if landing pad calls _Unwind_Resume().
__unw_resume(&cursor2);
break;
+ case _URC_END_OF_STACK:
+ _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): "
+ "personality returned "
+ "_URC_END_OF_STACK",
+ (void *)exception_object);
+ break;
default:
// Personality routine returned an unknown result code.
_LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): "
@@ -312,6 +327,8 @@ unwind_phase2_forced(unw_context_t *uc,
(void *)exception_object, personalityResult);
return _URC_FATAL_PHASE2_ERROR;
}
+ if (personalityResult == _URC_END_OF_STACK)
+ break;
}
}