From f8c92cfa9eeb82a608d409cac70d9d2533ab79d8 Mon Sep 17 00:00:00 2001 From: Quentin LADEVIE Date: Tue, 29 Apr 2025 23:28:52 +0200 Subject: Compile files one by one --- src/main.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) (limited to 'src/main.c') 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" - -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 }; - -/* 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" +#include "utils.h" +#include "events.h" +#include "parser.h" + +u8 is_open = TRUE; +u8 process_commands = TRUE; + +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) { -- cgit v1.3