Skip to content

How To Build

Maksim Shudrak edited this page Dec 13, 2017 · 14 revisions

Introduction

Drltrace was originally created and distributed as an additional module for [DrMemory] (https://github.com/DynamoRIO/drmemory). Now, we use truncated version of DrMemory's CMake file to build drltrace. However, you can also build & use old (but working) version of drltrace as a part of DrMemory using the following guide.

Windows Build Requirements

To build drltrace you will need:

  1. Microsoft Visual Studio 2013 (the older shouldn't work and we didn't tested yet newer versions).
  2. Drltrace (as DrMemory) needs redistributable copies of dbghelp.dll and symsrv.dll. These are available in a Visual Studio or SDK installation that has the Remote Debugger installed, in the Windows 8 SDK, and in the WDK or DDK.
  3. CMake for Windows (not for Cygwin!) at least 2.8.10.1.

Windows Build Workflow

Step 1. Preparing Environment

From the command line, set up the path and environment variables for Visual Studio by running vcvars batch file (it is usually located in C:\Program Files (x86)\Microsoft Visual Studio XX.0\VC\bin, either manually in a cmd shell or by running the Visual Studio Command Prompt which has a Start Menu entry under Visual Studio Tools.

Step 2. Downloading sources

git clone https://github.com/mxmssh/drltrace.git
mkdir build
cd build

Step 3. Building

Debug Version

cmake -G"Visual Studio 12" -DCMAKE_BUILD_TYPE=Debug ..\drltrace\drltrace_src\
cmake --build .

Release Version

cmake -G"Visual Studio 12" -DCMAKE_BUILD_TYPE=Debug ..\drltrace\drltrace_src\
cmake --build .

Linux Build Requirements

  1. gcc
  2. binutils
  3. cmake (at least version 2.8.10.1, but not version 3.x)
  4. perl

Linux Build Workflow

Step 1. Downloading sources

git clone https://github.com/mxmssh/drltrace.git
mkdir build
cd build

Step 2. Building

cmake -DCMAKE_BUILD_TYPE=Debug ../drltrace/drltrace_src/
make

Clone this wiki locally