[libunwind] ba9b2cd - [libunwind] [SEH] Add debug logging in __libunwind_seh_personality

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 13:07:17 PDT 2023


Author: Martin Storsjö
Date: 2023-04-19T23:05:48+03:00
New Revision: ba9b2cdb9c00f68f1759386fdafc2285e0227357

URL: https://github.com/llvm/llvm-project/commit/ba9b2cdb9c00f68f1759386fdafc2285e0227357
DIFF: https://github.com/llvm/llvm-project/commit/ba9b2cdb9c00f68f1759386fdafc2285e0227357.diff

LOG: [libunwind] [SEH] Add debug logging in __libunwind_seh_personality

Differential Revision: https://reviews.llvm.org/D148659

Added: 
    

Modified: 
    libunwind/src/Unwind-seh.cpp

Removed: 
    


################################################################################
diff  --git a/libunwind/src/Unwind-seh.cpp b/libunwind/src/Unwind-seh.cpp
index 150ba6453a225..b2bb119ed6d29 100644
--- a/libunwind/src/Unwind-seh.cpp
+++ b/libunwind/src/Unwind-seh.cpp
@@ -212,10 +212,18 @@ __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;


        


More information about the cfe-commits mailing list