From 65b3c69b4be9f826d71cffe3d333397adee5d4fd Mon Sep 17 00:00:00 2001 From: Quentin LADEVIE Date: Wed, 20 Nov 2024 08:46:32 +0100 Subject: Store loaded modules info Add command to list loaded modules Add command to print callstack Load modules of pdb files --- src/main.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 5ff1e42..b08c378 100644 --- a/src/main.c +++ b/src/main.c @@ -3,6 +3,7 @@ #include #include "types.h" +#include "module.h" #include "utils.c" @@ -15,28 +16,6 @@ static DWORD continue_status = DBG_EXCEPTION_NOT_HANDLED; static DEBUG_EVENT dbg_event; static PROCESS_INFORMATION proc_info = { 0 }; -struct module { - u8 fix_compilation; -}; - -static struct module mods[64U] = { 0U }; -static u64 mods_list = 0U; - -u8 add_mod() { - u64 free_mods = ~mods_list; - assert(!free_mods); - u8 mod_index = (u8)(free_mods >> (_lzcnt_u64(free_mods) + 1U)); - // struct module* mod = &mods[mod_index]; - - - - return mod_index; -}; - -void remove_mod(u8 mod_index) { - mods_list ^= (u64)(0x1 << (((i8)mod_index) - 1U)); -} - /* Read debugged process memory at address */ u8 read_memory(const void* addr, void* buffer, size_t size) { size_t b_read = 0U; -- cgit v1.3