| Crates.io | cargo-sym |
| lib.rs | cargo-sym |
| version | 0.0.6 |
| created_at | 2016-11-08 07:21:10.485443+00 |
| updated_at | 2017-03-15 04:58:06.820064+00 |
| description | Prints various binary symbols in your crate |
| homepage | |
| repository | https://github.com/m4b/cargo-sym |
| max_upload_size | |
| id | 7172 |
| size | 35,151 |
Prints various binary symbols in your crate. Also experimentally disassembles.
This uses capstone for disassembly, so it will compile faster if you have capstone installed as a system library.
First install:
cargo install cargo-sym
or via git:
cargo install --git https://github.com/m4b/cargo-sym -f
Then:
cargo sym will print every debugging symbol it finds in the first valid binary target in target/<target>/debug. This can be, for example:a.target/debug (this is used if it doesn't find a special target, like the following)
b. target/x86_64-unknown-linux-musl/debug
cargo sym -C will print every debugging symbol demangledcargo sym -e will print every exported symbol importable by other binariescargo sym -Ce will do -C and -e together :]cargo sym -d will disassemble your binary, objdump style. experimentalcargo sym -d -C /bin/ls will disassemble the binary ls at /bin/ (actually most distros strip /bin/ls so it actually won't)cargo sym -Cd --target=aarch64-linux-android will disassemble your crates binary at target/aarch64-linux-android/debug/<crate_name>cargo sym -C --release -x example will print the symbols from the example binary you compiled in release mode (at target/release/examples/example)cargo sym -Cd --target=debug -x main will disassemble the example binary main in the regular debug location target/debug/examples/mainTry cargo sym --help for more information!
PRs welcome of course :)