QBDI
QBDI copied to clipboard
Winpreload
Add support for Windows QBDIPreload x86-64 in 2 modes:
- process creation mode (QBDIPreload aims to be used on a process once it is started)
- attach mode (QBDIPreload is injected in an already running process)
Just added support for 32 bits windows (with attach mode too) in same branch
I have had to make the following change to make it work on my end:
diff --git a/tools/QBDIPreload/CMakeLists.txt b/tools/QBDIPreload/CMakeLists.txt
index 5f24c33..a6c1f6f 100644
--- a/tools/QBDIPreload/CMakeLists.txt
+++ b/tools/QBDIPreload/CMakeLists.txt
@@ -2,11 +2,11 @@ set(SOURCES "")
if((${OS} STREQUAL "linux") OR (${OS} STREQUAL "android"))
set(SOURCES ${SOURCES} "src/linux_preload.c")
-elseif(WIN32)
+elseif(${OS} STREQUAL "win")
if(${ARCH} STREQUAL "X86")
set(SOURCES ${SOURCES} "src/win_preload.c" "src/trampoline_x86.asm")
set_source_files_properties("src/trampoline_x86.asm" PROPERTIES COMPILE_FLAGS "/safeseh")
- elseif(${ARCH} STREQUAL "X86-64")
+ elseif(${ARCH} STREQUAL "X86_64")
set(SOURCES ${SOURCES} "src/win_preload.c" "src/trampoline_x64.asm")
endif()
elseif(${OS} STREQUAL "macOS")
Otherwise, I was getting the following error:
CMake Error at tools/QBDIPreload/CMakeLists.txt:20 (add_library):
No SOURCES given to target: QBDIPreload
move to #227