Durin is a library for reading and writing the DWARF debugging format
OCaml
51
182 commits
updated Aug 11, 2026
Durin is a library for reading and writing the Dwarf debugging format.
It supports:
.dwo files, .dwp package files, skeleton units).It provides:
durin supports both ELF (Linux) and MachO (macOS) object
files via the object library.durin also uses DW_AT_sibling references to avoid parsing a DIE's
children to find its next sibling where possible.| Section | Read | Write | DWARF Version |
|---|---|---|---|
.debug_info | Yes | Yes | 4, 5 |
.debug_abbrev | Yes | Yes | 4, 5 |
.debug_line | Yes | Yes | 4, 5 |
.debug_line_str | Yes | Yes | 5 |
.debug_str | Yes | Yes | 4, 5 |
.debug_str_offsets | Yes | Yes | 5 |
.debug_addr | Yes | Yes | 5 |
.debug_frame | Yes | Yes | 4, 5 |
.eh_frame | Yes | Yes | 4, 5 |
.debug_aranges | Yes | Yes | 4, 5 |
.debug_loclists | Yes | Yes | 5 |
.debug_rnglists | Yes | Yes | 5 |
.debug_names | Yes | Yes | 5 |
.debug_macro | Yes | Yes | 5 |
.debug_cu_index | Yes | Yes | 5 |
.debug_tu_index | Yes | Yes | 5 |
.debug_loc | Yes | Yes | 4 |
.debug_ranges | Yes | Yes | 4 |
.debug_pubnames | Yes | Yes | 4 |
.debug_pubtypes | Yes | Yes | 4 |
.debug_macinfo | Yes | Yes | 4 |
.debug_types | Yes | Yes | 4 |
To install durin as a dependency, run:
$ opam install durin
And add durin to your project's dune-project or *.opam files.
example directory
DW_AT_producer).Apple Compact Unwinding Format is defined by the LLVM implementation.
Vendor extensions from GCC https://sourceware.org/elfutils/DwarfExtensions
Big-endian is unsupported. Both read and write paths assume
little-endian throughout. The Object.Buffer.Read functions are
hardcoded LE, and all dwarf_write primitives are LE-only. This
affects PowerPC 64, s390x, and big-endian MIPS targets. Fixing
this requires coordinated changes: making Object.Buffer.Read
endianness-aware, threading byte order through the encoding
type, and adding _be write variants. All current targets
(x86-64, ARM64 on Linux/macOS) are little-endian so this is
low priority.
181 commits
1 commits
OCaml
99.5%
Durin is a library for reading and writing the DWARF debugging format
OCaml
51
182 commits
updated Aug 11, 2026
Durin is a library for reading and writing the Dwarf debugging format.
It supports:
.dwo files, .dwp package files, skeleton units).It provides:
durin supports both ELF (Linux) and MachO (macOS) object
files via the object library.durin also uses DW_AT_sibling references to avoid parsing a DIE's
children to find its next sibling where possible.| Section | Read | Write | DWARF Version |
|---|---|---|---|
.debug_info | Yes | Yes | 4, 5 |
.debug_abbrev | Yes | Yes | 4, 5 |
.debug_line | Yes | Yes | 4, 5 |
.debug_line_str | Yes | Yes | 5 |
.debug_str | Yes | Yes | 4, 5 |
.debug_str_offsets | Yes | Yes | 5 |
.debug_addr | Yes | Yes | 5 |
.debug_frame | Yes | Yes | 4, 5 |
.eh_frame | Yes | Yes | 4, 5 |
.debug_aranges | Yes | Yes | 4, 5 |
.debug_loclists | Yes | Yes | 5 |
.debug_rnglists | Yes | Yes | 5 |
.debug_names | Yes | Yes | 5 |
.debug_macro | Yes | Yes | 5 |
.debug_cu_index | Yes | Yes | 5 |
.debug_tu_index | Yes | Yes | 5 |
.debug_loc | Yes | Yes | 4 |
.debug_ranges | Yes | Yes | 4 |
.debug_pubnames | Yes | Yes | 4 |
.debug_pubtypes | Yes | Yes | 4 |
.debug_macinfo | Yes | Yes | 4 |
.debug_types | Yes | Yes | 4 |
To install durin as a dependency, run:
$ opam install durin
And add durin to your project's dune-project or *.opam files.
example directory
DW_AT_producer).Apple Compact Unwinding Format is defined by the LLVM implementation.
Vendor extensions from GCC https://sourceware.org/elfutils/DwarfExtensions
Big-endian is unsupported. Both read and write paths assume
little-endian throughout. The Object.Buffer.Read functions are
hardcoded LE, and all dwarf_write primitives are LE-only. This
affects PowerPC 64, s390x, and big-endian MIPS targets. Fixing
this requires coordinated changes: making Object.Buffer.Read
endianness-aware, threading byte order through the encoding
type, and adding _be write variants. All current targets
(x86-64, ARM64 on Linux/macOS) are little-endian so this is
low priority.
181 commits
1 commits
OCaml
99.5%