Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / libc++abi / trunk / src / Unwind / UnwindLevel1-gcc-ext.c
index c84db76..745c309 100644 (file)
 
 ///  Called by __cxa_rethrow().
 _LIBUNWIND_EXPORT _Unwind_Reason_Code
-_Unwind_Resume_or_Rethrow(struct _Unwind_Exception *exception_object) {
+_Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) {
   _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), "
-                             "private_1=%ld\n",
-                              exception_object, exception_object->private_1);
+                       "private_1=%ld\n",
+                       exception_object,
+#if LIBCXXABI_ARM_EHABI
+                       (long)exception_object->unwinder_cache.reserved1);
+#else
+                       (long)exception_object->private_1);
+#endif
+
+#if LIBCXXABI_ARM_EHABI
+  // _Unwind_RaiseException on EHABI will always set the reserved1 field to 0,
+  // which is in the same position as private_1 below.
+  return _Unwind_RaiseException(exception_object);
+#else
   // If this is non-forced and a stopping place was found, then this is a
   // re-throw.
   // Call _Unwind_RaiseException() as if this was a new exception
@@ -42,6 +53,7 @@ _Unwind_Resume_or_Rethrow(struct _Unwind_Exception *exception_object) {
   _Unwind_Resume(exception_object);
   _LIBUNWIND_ABORT("_Unwind_Resume_or_Rethrow() called _Unwind_RaiseException()"
                    " which unexpectedly returned");
+#endif
 }
 
 
@@ -116,7 +128,8 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
       unw_get_proc_info(&cursor, &frameInfo);
       _LIBUNWIND_TRACE_UNWINDING(
           " _backtrace: start_ip=0x%llX, func=%s, lsda=0x%llX, context=%p\n",
-          frameInfo.start_ip, functionName, frameInfo.lsda, &cursor);
+          (long long)frameInfo.start_ip, functionName, (long long)frameInfo.lsda,
+          &cursor);
     }
 
     // call trace function with this frame