summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorQuentin LADEVIE <qladevie@wanadev.fr>2025-04-29 23:28:52 +0200
committerQuentin LADEVIE <qladevie@wanadev.fr>2025-04-29 23:28:52 +0200
commitf8c92cfa9eeb82a608d409cac70d9d2533ab79d8 (patch)
treeb948402c24dc47a3e33f9f11b1caf7100d4ed115 /src/main.c
parent4ff029903b3d12905f171b98da9066ce7d6a5632 (diff)
Compile files one by one
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/src/main.c b/src/main.c
index e71b1b7..a747cb6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4,29 +4,18 @@
#include "types.h"
-#include "utils.c"
+#include "utils.h"
+#include "events.h"
+#include "parser.h"
-static HANDLE h_input = NULL;
-static HANDLE h_output = NULL;
-static u8 is_open = TRUE;
-static u8 process_commands = TRUE;
-static u8 expect_single_step = FALSE;
-static DWORD continue_status = DBG_EXCEPTION_NOT_HANDLED;
-static DEBUG_EVENT dbg_event;
-static PROCESS_INFORMATION proc_info = { 0 };
+u8 is_open = TRUE;
+u8 process_commands = TRUE;
-/* Read debugged process memory at address */
-u8 read_memory(const void* addr, void* buffer, size_t size) {
- size_t b_read = 0U;
- HRESULT hr = ReadProcessMemory(proc_info.hProcess, addr, buffer, size, &b_read);
-
- return hr > 0 && b_read == size;
-}
-
-#include "module.c"
-#include "parser.c"
-#include "pdb.c"
-#include "events.c"
+HANDLE h_input = NULL;
+HANDLE h_output = NULL;
+DEBUG_EVENT dbg_event;
+PROCESS_INFORMATION proc_info = { 0 };
+DWORD continue_status = DBG_EXCEPTION_NOT_HANDLED;
void dbg_loop() {
while(is_open) {