4 releases
| 0.0.4 | Oct 5, 2023 |
|---|---|
| 0.0.3 | Oct 3, 2023 |
| 0.0.2 | Mar 10, 2023 |
| 0.0.1 | Dec 17, 2022 |
#910 in Unix APIs
10,233 downloads per month
Used in 4 crates
(2 directly)
125KB
3.5K
SLoC
btfdump
BTF introspection tool
Compiling
btfdump is written in Rust and relies on standard Cargo package manager.
To compile btfdump:
- Get rust toolchain. See https://www.rust-lang.org/tools/install for instructions.
a. Using rustup is the simplest option: just run
curl https://sh.rustup.rs -sSf | sh. b. If you are behind HTTP/HTTPS proxy, you can specify it usinghttp_proxyandhttps_proxyenvvars:$ export http_proxy=http://fwdproxy:8080 $ export https_proxy=http://fwdproxy:8080 $ curl https://sh.rustup.rs -sSf | sh - Once Cargo and rustc is installed, run
cargo buildorcargo build --releaseto compile it. This will buildbtfbinary intarget/{debug,release}/directory. - Alternatively, you can use
cargo run -- <args>to compile and run through Cargo.
Supported commands
Dump
- Dump BTF types in various formats:
btf dump --format [human|c] <elf-file>
- You can filter out which types to print out using
--type,--name, and--idoptions. Seebtf dump --helpfor more details. - Check also
--datasetoption for dumping .BTF.ext data as well.
Stat
Output high-level stats about .BTF and .BTF.ext data.
btf stat <elf-file>
Dependencies
~8–23MB
~290K SLoC