diff --git a/dynamic_instrumentation/README.md b/dynamic_instrumentation/README.md index b70b4dfec9..4a19a02d9c 100644 --- a/dynamic_instrumentation/README.md +++ b/dynamic_instrumentation/README.md @@ -1,9 +1,10 @@ ```sh -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 -INSTRUMENT_BACKEND=debug METADATA_FILE=analysis_metadata.bc ./main +cargo build +${CARGO_TARGET_DIR:-../target/debug/c2rust-instrument} --metadata instrument.target/debug/metadata.bc -- build --manifest-path analysis/tests/misc/Cargo.toml +(cd analysis/tests/misc/instrument.target/debug; INSTRUMENT_BACKEND=debug INSTRUMENT_RUNTIME=bg METADATA_FILE=metadata.bc ./c2rust-analysis-tests-misc) ``` This instruments the binary built from main.rs with dynamic memory tracing, and outputs the necessary metadata to match up instrumentation points to source code -into `analysis_metadata.bc`. We then run the binary, printing output to the +into `metadata.bc`. We then run the binary, printing output to the debug console and using the aformentioned metadata file. \ No newline at end of file