summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_personality.cpp
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2015-05-29 15:34:24 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2015-05-29 15:34:24 +0000
commitbbb4b1ca2557a4cdc771c1fab76a271db721d5b9 (patch)
tree5bbe30ed5b8d4ccfaf8b9f9fa35c9b6bd14e8811 /libcxxabi/src/cxa_personality.cpp
parent7fab97f364d2e2f0beb7fffa3e42885db72982d5 (diff)
downloadbcm5719-llvm-bbb4b1ca2557a4cdc771c1fab76a271db721d5b9.tar.gz
bcm5719-llvm-bbb4b1ca2557a4cdc771c1fab76a271db721d5b9.zip
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. llvm-svn: 238561
Diffstat (limited to 'libcxxabi/src/cxa_personality.cpp')
-rw-r--r--libcxxabi/src/cxa_personality.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index 0cdc52f1a22..4ef48275281 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -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_unwind_frame(_Unwind_Exception*, _Unwind_Co
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;
}
OpenPOWER on IntegriCloud