Add rbpf-cli tool (#17378)

* Add rbpf-cli tool

* Replace explicit file type specification by required positional arg

- the type of file is determined automatically.  If ELF magic found,
  the program file is considered to be an executable ELF file, and
  an assembly input file otherwise.

* Add a note about tool's limitations and input format description
This commit is contained in:
Dmitri Makarov
2021-05-28 13:28:30 +02:00
committed by GitHub
parent 2316ddb90a
commit b8897df515
6 changed files with 920 additions and 32 deletions

18
rbpf-cli/Cargo.toml Normal file
View File

@@ -0,0 +1,18 @@
[package]
name = "rbpf-cli"
version = "1.8.0"
description = "CLI to test and analyze eBPF programs"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/rbpf"
homepage = "https://solana.com/"
keywords = ["BPF", "eBPF", "interpreter", "JIT"]
edition = "2018"
[dependencies]
clap = "3.0.0-beta.2"
serde = "1.0.122"
serde_json = "1.0.56"
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.8.0" }
solana-logger = { path = "../logger", version = "=1.8.0" }
solana-sdk = { path = "../sdk", version = "=1.8.0" }
solana_rbpf = "=0.2.11"