#debug-information #dwarf #file-format #mach-o #object-file #stack-trace

symbolic-debuginfo

A library to inspect and load DWARF debugging information from binaries, such as Mach-O or ELF

122 stable releases (11 major)

new 12.12.3 Nov 26, 2024
12.12.0 Oct 1, 2024
12.10.0 Jul 24, 2024
12.8.0 Dec 1, 2023
1.1.5 Dec 2, 2017

#413 in Debugging

Download history 5216/week @ 2024-08-06 4681/week @ 2024-08-13 3911/week @ 2024-08-20 4414/week @ 2024-08-27 5588/week @ 2024-09-03 4000/week @ 2024-09-10 4583/week @ 2024-09-17 5181/week @ 2024-09-24 9052/week @ 2024-10-01 7007/week @ 2024-10-08 9131/week @ 2024-10-15 8952/week @ 2024-10-22 9603/week @ 2024-10-29 9922/week @ 2024-11-05 9739/week @ 2024-11-12 9264/week @ 2024-11-19

40,271 downloads per month
Used in 26 crates (13 directly)

MIT license

740KB
13K SLoC

Abstractions for dealing with object files and debug information.

This module defines the Object type, which is an abstraction over various object file formats used in different platforms. Also, since executables on MacOS might contain multiple object files (called a "Fat MachO"), there is an Archive type, that provides a uniform interface with access to an objects iterator in all platforms.

Most processing of object files will happen on the Object type or its concrete implementation for one platform. To allow abstraction over this, there is the ObjectLike trait. It defines common attributes and gives access to a DebugSession, which can be used to perform more stateful handling of debug information.

See Object for the full API, or use one of the modules for direct access to the platform-dependent data.

Background

The functionality of symbolic::debuginfo is conceptionally similar to the object crate. However, there are key differences that warranted a separate implementation:

  • object has a stronger focus on executable formats, while symbolic focusses on debugging information. This is why symbolic also includes a variant for PDBs and Breakpad objects, where object instead has a WASM variant.
  • object contains far more generic access to the data within objects at the cost of performance. symbolic tries to optimize for debugging scenarios at the cost of generic usage.
  • symbolic contains an abstraction for multi-object files (Archive), which is not easily possible in object due to the use of lifetimes on the object::Object trait.

Dependencies

~0.8–9MB
~89K SLoC