1 Star 0 Fork 0

lycclsltt / blazesym

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
Daniel Müller 提交于 2023-11-02 14:36 . Bump version to 0.2.0-alpha.8

pipeline rustc

blazecli

blazecli is a command line interface for the blazesym library. It aims to closely mirror the structure of the library in its command and sub-command structure.

Usage

As mentioned above, the program's sub-command aim to mirror the library's public API structure. Hence, to symbolize an address in an ELF file -- which blazesym allows via the symbolize::Symbolizer type in conjunction with the Elf source -- is possible via the symbolize elf sub-command:

# Just an example to illustrate symbolization on live data.
$ readelf --syms /lib64/libc.so.6 --wide | grep readdir64_r
>   2253: 00000000000caee0   228 FUNC    WEAK   DEFAULT   12 readdir64_r@@GLIBC_2.2.5

$ blazecli symbolize elf --path /lib64/libc.so.6 00000000000caee0
> 0xcaee0: readdir_r@0xcaee0+0 :0

To run the program from within a checkout (without any kind of installation), you would use:

$ cargo run -p blazecli -- symbolize elf --path /lib64/libc.so.6 00000000000caee0

Similarly, to symbolize an address inside a process the symbolize process sub-command can be used. Please refer to the program's help text for additional details.

Shell Completion

blazecli comes with shell completion support (for various shells). A completion script can be generated via the shell-complete utility program and then only needs to be sourced to make the current shell provide context-sensitive tab completion support. E.g.,

$ cargo run --bin=shell-complete --features="clap_complete" -- bash > blazecli.bash
$ source blazecli.bash

The generated completion script can be installed system-wide and sourced through initialization files, such as ~/.bashrc.

Completion scripts for other shells work in a similar manner. Please refer to the help text (--help) of the shell-complete program for the list of supported shells.

1
https://gitee.com/lycclsltt/blazesym.git
git@gitee.com:lycclsltt/blazesym.git
lycclsltt
blazesym
blazesym
main

搜索帮助