Hi,
I have an example application, which runs with drmemory.exe, and also fuzzes specific functions, with the -fuzz parameters.
So far so good.
my Project dir is very simple:
_build/
CMakeLists.txt ->
cmake_minimum_required(VERSION 2.8)
project(app_project)
add_executable(myapp testmain.cpp)
install(TARGETS myapp DESTINATION bin)
find_package(DynamoRIO)
find_package(DrMemoryFramework)
use_DynamoRIO_extension(myapp drfuzz)
testMain.cpp ->
#include <stdio.h>
#include <iostream>
#include "drmemory_framework.h"
#include "drfuzz.h"
#include "drfuzz_mutator.h"
#include "drsymcache.h"
#include "drsyscall.h"
#include "umbra.h"
extern "C"
void targetFunc(unsigned char *buffer, size_t size){
if(buffer){
std::cout << "data: " << buffer << "\n";
}
else {
std::cout << "Nullpointer\n";
}
}
int main (int argc, char *argv[])
{
//drfuzz_init();
targetFunc(nullptr, 0);
return 0;
}
This command to create the build.
cmake -G"Visual Studio 12" -DDynamoRIO_DIR="C:\Users\kapopand\Desktop\DynamoRIO-Windows-7.0.17658-0\cmake" -DDrMemoryFramework_DIR="C:\Program Files (x86)\Dr. Memory\drmf" ..
At this point I am not sure what to put in
DDynamoRIO_DIR and
DDrMemoryFramework_DIR.
CMake than builds succefully but when I open my project in VS it shows plenty of errors. drfuzz.h (C:\Program Files (x86)\Dr. Memory\drmf\include) for example contains
#include "../framework/drmf.h"
#include "drwrap.h"
which are both missing.
So I've tried a different approach:
To properly build DrMemory and DynamoRIO with Visual Studio. The Build succeeded, so I went back to my project, deleted the old builds and did a new CMake command with the new path:
cmake -G"Visual Studio 12" -DDynamoRIO_DIR="C:\Users\kapopand\Desktop\dynamorio\build\cmake" -DDrMemoryFramework_DIR="C:\Users\kapopand\Desktop\drmemory\drmf" ..
After this i get alot of errors ( attached CMakeOutput.log ).
What am I missing? How should I properly install all dependencies to run my example project?
Using: Windows 7 Enterprise SP 1 64 Bit
Appreciate help :)