Libunwind's raison d'être

Some of your questions were answered here: [libunwind] relation between llvm libunwind and nongnu libunwind - #2 by David_Chisnall3

LLVM’s libunwind provides a replacement for platforms without a system unwinder (e.g. libgcc) and common functionality from HP’s libunwind. There are multiple parts related to unwinding:

  • Gathering unwind info from, e.g., program headers or through __register_frame. This is provided by libgcc and LLVM’s libunwind, but not the nongnu libwind (this gets the information from the system unwinder).
  • The level 1 Itanium ABI (_Unwind_*), used for exception unwinding. This is provided by libgcc, LLVM’s libunwind, and nongnu libunwind.
  • The C unwinding API (unw_*). This is defined and provided by the nongnu libunwind, but not libgcc. LLVM’s libunwind largely provides a drop-in replacement, but as you noted, some things like remote unwinding are not implemented.
3 Likes