# dwarf: add support for \.eh_frame_hdr when unwinding · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5781016c35c27a64b08c0701a92ad7c1a253a869)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5781016c35c27a64b08c0701a92ad7c1a253a869

Requested commit: 5781016c35c27a64b08c0701a92ad7c1a253a869

Commit: 5781016c35c27a64b08c0701a92ad7c1a253a869

Tree: 00d90503c3fbdedd43c77365104e95a38d9f9cab

Author: kcbanner

Committer: kcbanner

## Message

```
dwarf: add support for .eh_frame_hdr when unwinding

- .eh_frame_hdr contains a binary-searchable data structure for finding an FDE. If present, we can use this
section to avoid having to parse the entire FDE/CIE list in the binary, instead only entries that are actually
required for unwinding are read.
- rework the inputs pc-relative pointer decoding to support both already-mapped sections as well as sections
mapped from a file
- store the VirtualMachine on UnwindContext so the allocations can be reused

```

## Parents

- [dd2035735fa2160f85bf8fb8cd8b978d77fac292](https://git.cafe/gitcafe/zig/commit/dd2035735fa2160f85bf8fb8cd8b978d77fac292?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5781016c35c27a64b08c0701a92ad7c1a253a869?format=markdown)
