[PATCH] D142176: [libunwind] On Darwin, add a callback-based lookup scheme for JIT'd unwind info.

Ben Langmuir via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 10:02:41 PST 2023


benlangmuir added a comment.

I'm not that familiar with development practices for libunwind, but is possible to write a test for this?



================
Comment at: libunwind/src/libunwind_ext.h:71
+
+typedef int (*unw_find_dynamic_unwind_sections)(
+    unw_word_t addr, struct unw_dynamic_unwind_sections *info);
----------------
Should document the return value, particularly since success/failure is not the same as other functions returning `int` in this file.


================
Comment at: libunwind/src/libunwind_ext.h:76
+// registrations.
+extern int __unw_add_find_dynamic_unwind_sections(
+    unw_find_dynamic_unwind_sections find_dynamic_unwind_sections);
----------------
Would be nice to have doc comments for this; maybe just a lightly edited version of this paragraph from your description?

> These can be used to register (and deregister) callbacks that have a similar
> signature to _dyld_find_unwind_sections. During unwinding, if
> _dyld_find_unwind_sections returns false (indicating that no frame info
> was found by dyld) then registered callbacks are run in registration order until
> either the unwind info is found or the end of the list is reached.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142176/new/

https://reviews.llvm.org/D142176



More information about the llvm-commits mailing list