Install
[]
= "0.1"
Build the CLI from a checkout:
cargo install --path gsymtool
Read
use Gsym;
let gsym = open?;
if let Some = gsym.lookup?
# Ok::
Write
use ;
let mut builder = new.base_address;
let source = builder.add_file?;
builder.add_function?;
let bytes = builder.to_bytes?;
let gsym = parse?;
let symbol = gsym.lookup?.expect;
assert_eq!;
# Ok::
Convert ELF
#
#
# Ok::
gsymtool convert ./app -o ./app.gsym
gsymtool convert ./app -o ./app.gsym --version v2
gsymtool convert ./app -o ./app.gsym --dwp ./app.dwp
gsymtool convert ./bin --output-dir ./gsym --recursive --jobs 8
Query and inspect
gsymtool lookup ./app.gsym 0x401120 0x40113a
gsymtool dump ./app.gsym --functions
gsymtool verify ./app.gsym
gsymtool transcode ./app.gsym -o ./app-v2.gsym --version v2 --endian big
gsymtool segment ./app-v2.gsym -o ./app-shard.gsym --size 64MiB
lookup accepts the unslid virtual addresses stored in the ELF image. Subtract
the load bias from runtime addresses in PIE executables and shared libraries.
Performance
Support
| Input or format | Support |
|---|---|
| GSYM | v1 and v2, little-endian and big-endian |
| Linux | x86-64 and AArch64 |
| Linked ELF | ET_EXEC and ET_DYN |
| Relocatable ELF | ET_REL |
| DWARF | Versions 2 through 5, lines, inline frames, and call sites |
| Separate debug files | Explicit paths, .gnu_debuglink, and GNU build-ID trees |
| Compressed debug data | SHF-compressed sections and .gnu_debugdata |
| Split DWARF | .dwo and .dwp |
| Supplementary DWARF | .gnu_debugaltlink |
| Remote debug files | debuginfod |
Cargo features
| Feature | Default | Provides |
|---|---|---|
mmap |
Yes | Memory-mapped GSYM files |
convert |
Yes | Linux ELF and DWARF conversion |
debuginfod |
No | Remote separate-debug discovery |
Reader and writer only:
[]
= { = "0.1", = false }
License
Licensed under either Apache-2.0 or MIT, at your option.