[PATCH] D148659: [libunwind] [SEH] Add debug logging in __libunwind_seh_personality

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 13:59:00 PDT 2023


mstorsjo created this revision.
mstorsjo added a reviewer: cdavis5x.
Herald added projects: libunwind, All.
Herald added a reviewer: libunwind.
mstorsjo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148659

Files:
  libunwind/src/Unwind-seh.cpp


Index: libunwind/src/Unwind-seh.cpp
===================================================================
--- libunwind/src/Unwind-seh.cpp
+++ libunwind/src/Unwind-seh.cpp
@@ -212,10 +212,18 @@
   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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148659.514736.patch
Type: text/x-patch
Size: 1327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230418/39043e9c/attachment.bin>


More information about the llvm-commits mailing list