• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H03-May-2022-9284

examples/H03-May-2022-300267

src/H03-May-2022-1,7641,426

tests/H03-May-2022-357296

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

.gitignoreH A D01-Jan-197033 65

.travis.ymlH A D01-Jan-1970363 2317

CHANGELOG.mdH A D01-Jan-19706.9 KiB248150

Cargo.lockH A D01-Jan-197011.4 KiB438385

Cargo.tomlH A D01-Jan-19702.8 KiB123100

Cargo.toml.orig-cargoH A D01-Jan-19702.3 KiB7964

LICENSE-APACHEH A D01-Jan-197010.6 KiB202169

LICENSE-MITH A D01-Jan-19701 KiB2622

README.mdH A D01-Jan-19702.6 KiB5037

bench.plot.rH A D01-Jan-19701,000 2420

benchmark.shH A D01-Jan-19703 KiB11390

coverageH A D01-Jan-1970724 2710

README.md

1# addr2line
2
3[![](http://meritbadge.herokuapp.com/addr2line) ![](https://img.shields.io/crates/d/addr2line.svg)](https://crates.io/crates/addr2line)
4[![](https://docs.rs/addr2line/badge.svg)](https://docs.rs/addr2line/)
5[![Build Status](https://travis-ci.org/gimli-rs/addr2line.svg?branch=master)](https://travis-ci.org/gimli-rs/addr2line)
6[![Coverage Status](https://coveralls.io/repos/github/gimli-rs/addr2line/badge.svg?branch=master)](https://coveralls.io/github/gimli-rs/addr2line?branch=master)
7
8A cross-platform library for retrieving per-address debug information
9from files with DWARF debug information.
10
11`addr2line` uses [`gimli`](https://github.com/gimli-rs/gimli) to parse
12the debug information, and exposes an interface for finding
13the source file, line number, and wrapping function for instruction
14addresses within the target program. These lookups can either be
15performed programmatically through `Context::find_location` and
16`Context::find_frames`, or via the included example binary,
17`addr2line` (named and modelled after the equivalent utility from
18[GNU binutils](https://sourceware.org/binutils/docs/binutils/addr2line.html)).
19
20# Quickstart
21 - Add the [`addr2line` crate](https://crates.io/crates/addr2line) to your `Cargo.toml`
22 - Load the file and parse it with [`addr2line::object::File::parse`](https://docs.rs/object/*/object/struct.File.html#method.parse)
23 - Pass the parsed file to [`addr2line::Context::new` ](https://docs.rs/addr2line/*/addr2line/struct.Context.html#method.new)
24 - Use [`addr2line::Context::find_location`](https://docs.rs/addr2line/*/addr2line/struct.Context.html#method.find_location)
25   or [`addr2line::Context::find_frames`](https://docs.rs/addr2line/*/addr2line/struct.Context.html#method.find_frames)
26   to look up debug information for an address
27
28# Performance
29
30`addr2line` optimizes for speed over memory by caching parsed information.
31The DWARF information is parsed lazily where possible.
32
33The library aims to perform similarly to equivalent existing tools such
34as `addr2line` from binutils, `eu-addr2line` from elfutils, and
35`llvm-symbolize` from the llvm project, and in the past some benchmarking
36was done that indicates a comparable performance.
37
38## License
39
40Licensed under either of
41
42  * Apache License, Version 2.0 ([`LICENSE-APACHE`](./LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
43  * MIT license ([`LICENSE-MIT`](./LICENSE-MIT) or http://opensource.org/licenses/MIT)
44
45at your option.
46
47Unless you explicitly state otherwise, any contribution intentionally submitted
48for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
49dual licensed as above, without any additional terms or conditions.
50