A few years ago, Apple introduced a new kind of unwinding info (I’ll explain what that is in the next section) – the “compact unwinding format

The Apple Compact Unwinding Format: Documented and Explained - Mozilla Hacks - the Web developer blog

submited by
Style Pass
2021-06-15 14:00:07

A few years ago, Apple introduced a new kind of unwinding info (I’ll explain what that is in the next section) – the “compact unwinding format”, which can be found in __unwind_info sections of binaries.

Clang also started preferentially emitting that format over DWARF CFI on Apple’s platforms. So to generate good backtraces on Apple platforms, you need to be able to parse and interpret compact unwinding tables.

Unfortunately, this format is defined only by its implementation in llvm. Notably these files include lots of useful details, but you need to do a lot of studying of the actual implementation to figure everything out:

Firefox’s crash reporter needs good backtraces on Apple platforms, so learning this format and implementing a parser/interpreter for it became my problem. As I often do, I proceeded to write complete documentation for the format, to the best of my ability.

Note however that my work omits details on the “personality” and “LSDA” parts of the format, as those are only needed for running things like destructors, which aren’t needed for backtraces.

Leave a Comment