A C/C++ code instrumenter used in DEAD
Project description
dead-instrument
is the instrumenter used in DEAD.
Build
Prerequisites: cmake
, make
, clang/llvm
13.
mkdir build
cd build
cmake ..
cmake --build . [--parallel]
cmake --install . --prefix=/where/to/install/
Usage
cat test.c
int foo(int a) {
if (a == 0)
return 1;
else {
a = 5;
}
return a;
}
dead-instrument test.c --
cat test.c
void DCEMarker0_(void);
void DCEMarker1_(void);
void DCEMarker2_(void);
int foo(int a) {
if (a == 0) {
DCEMarker0_();
return 1;
} else {
DCEMarker1_();
a = 5;
}
DCEMarker2_();
return a;
}
Python wrapper
pip install dead-instrumenter
To use the instrumenter in python import from dead_instrumenter.instrumenter import instrument_program
.
Calling instrument_program(filename: Path) -> str
will instrument filename
at the file-level and return the prefix for the markers (default: DCEMarker
).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for dead_instrumenter-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73d847b3c218a054d95e24979c768148fd177a41d79df00327828d8ad2d1d9e |
|
MD5 | 02edae4f7aeb1d3de93192976415eff0 |
|
BLAKE2b-256 | d021f1b253a852a3ebbfed0424bf5ce44a3ee3f9de7dd0cb18ab3ac032f93246 |