#object-file #file-format #information #dwarf #iterator #mach-o

symbolic-debuginfo

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

112 stable releases (11 major)

12.8.0 Dec 1, 2023
12.7.1 Nov 29, 2023
12.5.0 Oct 24, 2023
12.3.0 Jul 19, 2023
1.1.5 Dec 2, 2017

#135 in Debugging

Download history 1287/week @ 2023-11-20 1093/week @ 2023-11-27 1258/week @ 2023-12-04 1017/week @ 2023-12-11 960/week @ 2023-12-18 443/week @ 2023-12-25 788/week @ 2024-01-01 1624/week @ 2024-01-08 2183/week @ 2024-01-15 2496/week @ 2024-01-22 3241/week @ 2024-01-29 7517/week @ 2024-02-05 4266/week @ 2024-02-12 4875/week @ 2024-02-19 5920/week @ 2024-02-26 3704/week @ 2024-03-04

19,401 downloads per month
Used in 22 crates (12 directly)

MIT license

735KB
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.9–10MB
~79K SLoC