[PATCH] [libcxxabi] Make _Unwind_Backtrace() work on ARM.

Jon Roelofs jonathan at codesourcery.com
Thu Aug 28 16:48:47 PDT 2014


================
Comment at: include/unwind.h:210
@@ -209,2 +209,3 @@
 
+extern uint32_t* decode_eht_entry(const uint32_t*, size_t*, size_t*);
 extern _Unwind_Reason_Code _Unwind_VRS_Interpret(_Unwind_Context *context,
----------------
This is an implementation detail, and doesn't belong in the public interface. Can this go in a header in src/Unwind?

================
Comment at: src/Unwind/Unwind-EHABI.cpp:171
@@ -172,3 +170,3 @@
   Descriptor::Format format =
-      static_cast<Descriptor::Format>((unwindInfo & 0x0f000000) >> 24);
+      static_cast<Descriptor::Format>((*unwindingData & 0x0f000000) >> 24);
   size_t len = 0;
----------------
The assert should stay.

================
Comment at: src/Unwind/Unwind-EHABI.cpp:241
@@ +240,3 @@
+
+  return const_cast<uint32_t*>(data);
+}
----------------
const_cast is icky. can we make this return `const uint32_t*`?

================
Comment at: src/Unwind/UnwindLevel1-gcc-ext.c:145
@@ +144,3 @@
+
+#if LIBCXXABI_ARM_EHABI
+    // Get the information for this frame.
----------------
This needs to go before the callback is called, otherwise the first callback would have the context corresponding to the _Unwind_Backtrace function itself. The best place is probably right under the `if (unw_step(...)) {` block.

http://reviews.llvm.org/D5112






More information about the cfe-commits mailing list