[libcxxabi] r238561 - libcxx: Switch to use __gnu_unwind_frame() for libunwind.

Logan Chien tzuhsiang.chien at gmail.com
Fri May 29 08:34:24 PDT 2015


Author: logan
Date: Fri May 29 10:34:24 2015
New Revision: 238561

URL: http://llvm.org/viewvc/llvm-project?rev=238561&view=rev
Log:
libcxx: Switch to use __gnu_unwind_frame() for libunwind.

As a step to fix libunwind unw_step(), a new function
__gnu_unwind_frame() has been introduced to libunwind, and it is
required to use this function so that some libunwind internal data
structure can be updated properly.

Modified:
    libcxxabi/trunk/src/cxa_personality.cpp

Modified: libcxxabi/trunk/src/cxa_personality.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_personality.cpp?rev=238561&r1=238560&r2=238561&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_personality.cpp (original)
+++ libcxxabi/trunk/src/cxa_personality.cpp Fri May 29 10:34:24 2015
@@ -1019,9 +1019,8 @@ __gxx_personality_v0
 }
 #else
 
-#if !LIBCXXABI_USE_LLVM_UNWINDER
-extern "C" _Unwind_Reason_Code __gnu_unwind_frame(_Unwind_Exception*, _Unwind_Context*);
-#endif
+extern "C" _Unwind_Reason_Code __gnu_unwind_frame(_Unwind_Exception*,
+                                                  _Unwind_Context*);
 
 // Helper function to unwind one frame.
 // ARM EHABI 7.3 and 7.4: If the personality function returns _URC_CONTINUE_UNWIND, the
@@ -1030,37 +1029,8 @@ extern "C" _Unwind_Reason_Code __gnu_unw
 static _Unwind_Reason_Code continue_unwind(_Unwind_Exception* unwind_exception,
                                            _Unwind_Context* context)
 {
-#if LIBCXXABI_USE_LLVM_UNWINDER
-    // ARM EHABI # 6.2, # 9.2
-    //
-    //  +---- ehtp
-    //  v
-    // +--------------------------------------+
-    // | +--------+--------+--------+-------+ |
-    // | |0| prel31 to __gxx_personality_v0 | |
-    // | +--------+--------+--------+-------+ |
-    // | |      N |      unwind opcodes     | |  <-- unwind_opcodes
-    // | +--------+--------+--------+-------+ |
-    // | | Word 2        unwind opcodes     | |
-    // | +--------+--------+--------+-------+ |
-    // | ...                                  |
-    // | +--------+--------+--------+-------+ |
-    // | | Word N        unwind opcodes     | |
-    // | +--------+--------+--------+-------+ |
-    // | | LSDA                             | |  <-- lsda
-    // | | ...                              | |
-    // | +--------+--------+--------+-------+ |
-    // +--------------------------------------+
-
-    uint32_t *unwind_opcodes = unwind_exception->pr_cache.ehtp + 1;
-    size_t opcode_words = ((*unwind_opcodes >> 24) & 0xff) + 1;
-    if (_Unwind_VRS_Interpret(context, unwind_opcodes, 1, opcode_words * 4) !=
-        _URC_CONTINUE_UNWIND)
-        return _URC_FAILURE;
-#else
     if (__gnu_unwind_frame(unwind_exception, context) != _URC_OK)
         return _URC_FAILURE;
-#endif
     return _URC_CONTINUE_UNWIND;
 }
 





More information about the cfe-commits mailing list