Skip to main content

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:str) -> None will instrument filename.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dead_instrumenter-0.0.1.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

dead_instrumenter-0.0.1-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page