Skip to content

Commit b4b10e3

Browse files
committed
instrument: README: fix invocation
1 parent 9a2bd6e commit b4b10e3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dynamic_instrumentation/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
```sh
2-
cargo run -- analysis_metadata.bc ../analysis/tests/misc/src/main.rs -L ~/.rustup/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/ -L ../target/debug/deps/ --extern c2rust_analysis_rt=../target/debug/deps/libc2rust_analysis_rt-4c5a3dcb09c8161c.rlib
3-
INSTRUMENT_BACKEND=debug METADATA_FILE=analysis_metadata.bc ./main
2+
cargo build
3+
${CARGO_TARGET_DIR:-../target/debug/c2rust-instrument} --metadata instrument.target/debug/metadata.bc -- build --manifest-path analysis/tests/misc/Cargo.toml
4+
(cd analysis/tests/misc/instrument.target/debug; INSTRUMENT_BACKEND=debug INSTRUMENT_RUNTIME=bg METADATA_FILE=metadata.bc ./c2rust-analysis-tests-misc)
45
```
56

67
This instruments the binary built from main.rs with dynamic memory tracing, and
78
outputs the necessary metadata to match up instrumentation points to source code
8-
into `analysis_metadata.bc`. We then run the binary, printing output to the
9+
into `metadata.bc`. We then run the binary, printing output to the
910
debug console and using the aformentioned metadata file.

0 commit comments

Comments
 (0)