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.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b2773db802b806dd6c6abf9fccac55033e840a0a6a59d5c86deac3784825453 |
|
MD5 | db8d46ed94ed3c736b7cd38909cab892 |
|
BLAKE2b-256 | 5be9e7046b2775a400a2610854a4304eb7ccd26c06264a16f85902def4f844cc |