From daddc92b4a5b3d9a30255615908e643365f64f53 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Fri, 7 Feb 2020 21:48:44 +0100 Subject: -l fix (first iteration) --- libAflDyninst.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libAflDyninst.cpp') diff --git a/libAflDyninst.cpp b/libAflDyninst.cpp index e7c2a0f..af2d9f4 100644 --- a/libAflDyninst.cpp +++ b/libAflDyninst.cpp @@ -1,4 +1,5 @@ #include "config.h" +#include "dyninstversion.h" // if this include errors, compile and install https://github.com/dyninst/dyninst #include #include #include @@ -23,8 +24,10 @@ static unsigned short int prev_id = 0; static bool forkserver_installed = false; #if (__amd64__ || __x86_64__) static long saved_di; +#if (DYNINST_MAJOR_VERSION < 10) register long rdi asm("di"); // the warning is fine - we need the warning because of a bug in dyninst9 #endif +#endif #define PRINT_ERROR(string) (void)(write(2, string, strlen(string)) + 1) // the (...+1) weirdness is so we do not get an ignoring return value warning @@ -91,17 +94,21 @@ void bbCallback(unsigned short id) { void forceCleanExit() { exit(0); } +#if (DYNINST_MAJOR_VERSION < 10) void save_rdi() { #if __amd64__ || __x86_64__ saved_di = rdi; #endif } +#endif +#if (DYNINST_MAJOR_VERSION < 10) void restore_rdi() { #if __amd64__ || __x86_64__ rdi = saved_di; #endif } +#endif void initOnlyAflForkServer() { if (forkserver_installed == true) -- cgit 1.4.1