9 releases (breaking)

0.8.0 Feb 7, 2019
0.7.0 Jul 10, 2018
0.6.0 Jan 23, 2018
0.5.0 Aug 21, 2017
0.1.0 Dec 3, 2016

#21 in Debugging

Download history 50/week @ 2018-12-20 21/week @ 2018-12-27 28/week @ 2019-01-03 30/week @ 2019-01-10 10/week @ 2019-01-17 34/week @ 2019-01-24 43/week @ 2019-01-31 180/week @ 2019-02-07 107/week @ 2019-02-14 114/week @ 2019-02-21 121/week @ 2019-02-28 81/week @ 2019-03-07 32/week @ 2019-03-14 142/week @ 2019-03-21 115/week @ 2019-03-28

347 downloads per month
Used in 2 crates


751 lines


Build Status Coverage Status

A cross-platform library for retrieving per-address debug information from executables with DWARF debug symbols.

addr2line uses gimli to parse the debug symbols of an executable, and exposes an interface for finding the source file, line number, and wrapping function for instruction addresses within the target program. These lookups can either be performed programmatically through Context::find_location and Context::find_frames, or via the included example binary, addr2line (named and modelled after the equivalent utility from GNU binutils).



The library aims to perform similarly to equivalent existing tools such as addr2line from binutils, eu-addr2line from elfutils, and llvm-symbolize from the llvm project.

Currently the library optimizes for memory over for speed when parsing line number sequences. In particular, the algorithm used can be slow for large line sequences, but uses much less memory. Note that LLVM generates one line sequence per function, but gcc can include multiple functions in each line sequence.

We haven't done extensive benchmarking (yet), but the runtime and memory use results we observe for one relatively large Rust application are quite promising:

addr2line runtime addr2line memory


Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~62K SLoC