7 releases

0.3.0 Aug 27, 2024
0.2.3 Mar 4, 2024
0.2.2 Feb 29, 2024
0.2.1 Jan 18, 2024
0.1.0 Jul 25, 2023

#421 in Parser implementations

Download history 427/week @ 2024-07-24 315/week @ 2024-07-31 342/week @ 2024-08-07 333/week @ 2024-08-14 411/week @ 2024-08-21 389/week @ 2024-08-28 352/week @ 2024-09-04 274/week @ 2024-09-11 315/week @ 2024-09-18 667/week @ 2024-09-25 844/week @ 2024-10-02 744/week @ 2024-10-09 631/week @ 2024-10-16 616/week @ 2024-10-23 639/week @ 2024-10-30 480/week @ 2024-11-06

2,516 downloads per month
Used in framehop

MIT license

50KB
961 lines

crates.io page docs.rs page

pe-unwind-info

A zero-copy parser for the contents of the .pdata section and unwind info structures (typically addressed by the contents of the .pdata section).

This library provides low-level, efficient parsers for the function tables in .pdata as well as unwind info structures in other places. On top of this functionality, higher-level functionality to unwind an entire frame (given a module's contents) is provided. This only copies data as necessary. No heap allocations are needed.

This currently targets x86_64 PE modules. ARM64 support will be added soon.

This library assumes all information is little-endian: as far as I can tell, Windows always either targets little-endian-only CPUs or configures CPUs which support little- and big-endian to be little-endian.


lib.rs:

Zero-copy parsers of the contents of the .pdata section and unwind information in PE binaries.

On top of these parsers, some higher-level interfaces are provided to easily unwind frames. The parsers and the higher interfaces are written with efficiency in mind, doing minimal copying of data. There is no heap allocation.

Dependencies

~1–1.7MB
~30K SLoC