[PATCH] Add .eh_frame_hdr search to Linux unwinder.

Dan Albert danalbert at google.com
Thu Jan 22 13:42:26 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: src/Unwind/AddressSpace.hpp:375
@@ +374,3 @@
+  int found = dl_iterate_phdr(
+      [](struct dl_phdr_info *pinfo, size_t, void *data) -> int {
+        auto cbdata = static_cast<dl_iterate_cb_data *>(data);
----------------
jroelofs wrote:
> Do byval captures not work here?
No captures whatsoever. Those only work where the function actually takes a std::function, whereas this is a plain old function pointer.

================
Comment at: src/Unwind/AddressSpace.hpp:409
@@ +408,3 @@
+          cbdata->sects->dwarf_section_length = object_length;
+          return true;
+        } else {
----------------
jroelofs wrote:
> 
> 
 

================
Comment at: src/Unwind/EHHeaderParser.hpp:111
@@ +110,3 @@
+  size_t high = hdrInfo.fdeCount;
+  while (low < high) {
+    size_t mid = (low + high) / 2;
----------------
jroelofs wrote:
> The EHABI unwinder uses some library function for doing its binary search for the EHT entry. Maybe that can be re-used here too.
I'll look in to that.

http://reviews.llvm.org/D6848

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list