1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//!
//! [`ElfConverter`](crate::convert::ElfConverter) reads an ELF image, imports
//! its `STT_FUNC` symbols and DWARF subprogram information, and returns a
//! populated [`GsymBuilder`](crate::GsymBuilder) rather than finished bytes, so
//! the model can be inspected or edited before an encoding is chosen.
//!
//! ```no_run
//! use gsym::convert::ElfConverter;
//!
//! let report = ElfConverter::default().convert_path("./app")?;
//! std::fs::write("./app.gsym", report.builder.to_bytes()?)?;
//! # Ok::<(), gsym::Error>(())
//! ```
//!
//! [`convert_path`](crate::convert::ElfConverter::convert_path) also searches
//! for separate debug files: `.gnu_debuglink` targets validated by CRC,
//! build-ID trees, debuginfod when it is configured, embedded
//! `.gnu_debugdata`, supplementary `.gnu_debugaltlink` objects, and split
//! DWARF. [`convert`](crate::convert::ElfConverter::convert) takes
//! caller-supplied [`ElfInputs`](crate::convert::ElfInputs) instead and
//! searches for nothing.
//!
//! Conversion is lenient. Anything unusable is skipped, counted in
//! [`ConversionStats`](crate::convert::ConversionStats), and explained in a
//! [`ConversionWarning`](crate::convert::ConversionWarning), so one bad
//! compilation unit does not fail the whole file. Errors are reserved for input
//! that cannot be used at all, such as a malformed image or a companion file
//! belonging to a different build.
//!
//! See [`docs::conversion`](crate::docs::conversion) for the full guide.
use ;
pub use ConversionWarning;
pub use ;