diff options
| author | dmlunar <root@lunar.sh> | 2026-06-20 19:05:41 +0200 |
|---|---|---|
| committer | dmlunar <root@lunar.sh> | 2026-06-20 19:05:41 +0200 |
| commit | 0b290914492c3eca7a0432be2ea2f0c8f5d71408 (patch) | |
| tree | 46accdf61822e83be9f81284b1b24ddff4f371d5 | |
| parent | 866cf2e673e0dc77071a4e111c47cc9199cfe948 (diff) | |
| download | cdl86-0b290914492c3eca7a0432be2ea2f0c8f5d71408.tar.gz cdl86-0b290914492c3eca7a0432be2ea2f0c8f5d71408.zip | |
cdl86: project updates
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | premake5.lua | 57 | ||||
| -rw-r--r-- | tests/basic_jmp.c | 2 | ||||
| -rw-r--r-- | tests/basic_swbp.c | 2 |
5 files changed, 68 insertions, 2 deletions
@@ -1,2 +1,5 @@ basic_jmp basic_swbp +.vscode +bin/ +build/
\ No newline at end of file @@ -32,6 +32,12 @@ Handles `control flow` to `detour` > Note: This project makes use of an internal `x86` instruction length disassembly engine.
+# Build
+
+Both `Makefile` and `premake5` build targets are supported.
+
+For `premake5` simply run `premake5 vs2022` in the project root directory.
+
# API
```
struct cdl_jmp_patch cdl_jmp_attach(void **target, void *detour);
diff --git a/premake5.lua b/premake5.lua new file mode 100644 index 0000000..982aad2 --- /dev/null +++ b/premake5.lua @@ -0,0 +1,57 @@ +workspace "cdl86" + configurations { "Debug", "Release" } + architecture "x86_64" + location "build" + + symbols "On" + optimize "Off" + + flags { + "NoIncrementalLink", + "NoRuntimeChecks" + } + + filter "configurations:*" + buildoptions { + "/RTC-", + "/Ob0", + "/Oy-" + } + + linkoptions { + "/OPT:NOICF" + } + + filter {} + +project "basic_jmp" + kind "ConsoleApp" + language "C" + + targetdir ("bin/%{cfg.buildcfg}") + + files { + "cdl.c", + "cdl.h", + "tests/basic_jmp.c" + } + + includedirs { + "." + } + +project "basic_swbp" + kind "ConsoleApp" + language "C" + + targetdir ("bin/%{cfg.buildcfg}") + + files { + "cdl.c", + "cdl.h", + "tests/basic_swbp.c" + } + + includedirs { + "." + } diff --git a/tests/basic_jmp.c b/tests/basic_jmp.c index c3bd599..51bd912 100644 --- a/tests/basic_jmp.c +++ b/tests/basic_jmp.c @@ -60,7 +60,7 @@ int main( __in void
)
{
- struct cdl_jmp_patch jmp_patch = {};
+ struct cdl_jmp_patch jmp_patch = {0};
addo = (add_t*)add;
printf("Before attach: \n");
diff --git a/tests/basic_swbp.c b/tests/basic_swbp.c index f379cd6..0a92370 100644 --- a/tests/basic_swbp.c +++ b/tests/basic_swbp.c @@ -60,7 +60,7 @@ int main( __in void
)
{
- struct cdl_swbp_patch swbp_patch = {};
+ struct cdl_swbp_patch swbp_patch = {0};
addo = (add_t*)add;
printf("Before attach: \n");
|
