dextool 1.2.1

C/C++ tooling for testing and visualisation

To use this package, put the following dependency into your project's dependencies section:


dextool Build Status codecov

deXtool is a framework for writing plugins using libclang. The main focus is tools for testing and analyze.

The plugins in a standard installation of deXtool are:

  • Analyze. Analyze C/C++ code to generate complexity numbers such as McCabe.
  • C TestDouble. Analyze C code to generate a test double implementation.
  • C++ TestDouble. Analyze C++ code to generate a test double implementation.
  • Compilation Database. Tool for manipulating db(s) such as merge, compiler flag filtering, relative->absolute path. Usually called compile_commands.json.
  • Mutate. Mutation testing tool for C/C++.
  • GraphML. Analyze C/C++ code to generate a GraphML representation. Call chains, type usage, classes as groups of methods and members.
  • Intercept. Analyze a C header together with a config to generate interceptor functions.
  • UML. Analyze C/C++ code to generate PlantUML diagrams.

Plugin Status

  • Analyze: production ready.
  • C TestDouble: production ready. The API of the generated code and how it behaves is stable.
  • C++ TestDouble is production ready. The API of the generated code and how it behaves is stable.
  • CompileDB: alpha.
  • Fuzzer: alpha.
  • GraphML: beta.
  • Intercept: alpha.
  • UML: beta.
  • Mutate: production ready.

Getting Started

deXtool depends on the following software packages:

deXtool has been tested with libclang [4.0, 5.0].

For people running Ubuntu two of the dependencies can be installed via apt-get. The version of clang and llvm depend on your ubuntu version.

sudo apt install cmake llvm-4.0 llvm-4.0-dev clang-4.0 libclang-4.0-dev libsqlite3-dev ldc dub

Once the dependencies are installed it is time to download the source code and build the binaries.

git clone
cd dextool
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/where/to/install/dextool/binaries ..
make install -j2

Done! Have fun. Don't be shy to report any issue that you find.

Common Build Errors

Mismatch Clang and LLVM

To build dextool the dev packages are required. Dextool is optimistic and assume that the latest and greatest version of llvm+libclang should be used. But this also requires that the dev packages are installed.

If you get this error:

libclang_interop.hpp:13:10: fatal error: clang/Analysis/CFG.h: No such file or directory
 #include <clang/Analysis/CFG.h>

It means that you need to install llvm-x.y-dev and libclang-x.y-dev for the version that deXtool detected.


See the usage examples in respective plugin directory:


Jacob Carlborg for his excellent DStep. It was used as a huge inspiration for this code base. Without DStep deXTool wouldn't exist.

  • Joakim Brännström
System dependencies: 3.6+
1.2.1 2018-Oct-15
1.2.0 2018-Aug-16
1.1.0 2017-Mar-20
1.0.0 2017-Mar-06
0.8.4 2016-Nov-20
Show all 28 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 39 downloads total

Short URL: