[libcxx-commits] [PATCH] D111863: [libunwind] Add an interface for dynamic .eh_frame registration

Lang Hames via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 19 11:39:28 PDT 2021


lhames added a comment.

In D111863#3072827 <https://reviews.llvm.org/D111863#3072827>, @joerg wrote:

> `__register_frame` requires parsing the CIE header, but not the whole FDE program. E.g. that's the `findPCRange` logic. After that, the FDE is just added to the internal block list. Parsing a whole segment is more involved as it needs to look for the terminator of each block to find the next FDE.

Ok -- that makes sense. So I think `__unw_add_dynamic_eh_frame_section` just needs to walk the section and register the FDEs with `__unw_add_dynamic_fde`, rather than calling into DwarfFDECache up-front. Does that sound right?

>From the JIT's perspective we're looking for two things: (1) to register a whole section with a single call (this avoids jumping in and out of libunwind for every FDE), and (2) a new symbol name whose semantics we can rely on, since `__register_frame` behaves differently in different unwinding libraries.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111863



More information about the libcxx-commits mailing list