From cc4b68c0d4af6d6f46388ca23a9c2fd8a5566df8 Mon Sep 17 00:00:00 2001 From: rdbo Date: Wed, 10 Apr 2024 17:08:19 -0300 Subject: [PATCH] flush stdout on windows logs --- src/win/symbol.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/win/symbol.c b/src/win/symbol.c index d6701937..a8f8b896 100644 --- a/src/win/symbol.c +++ b/src/win/symbol.c @@ -45,31 +45,38 @@ LM_EnumSymbols(const lm_module_t *module, lm_symbol_t symbol; printf("ENUM SYMBOLS CALLED\n"); + fflush(stdout); if (!module || !callback) return result; printf("ARGUMENTS CHECKED\n"); + fflush(stdout); if (!utf8towcs(module->path, wpath, LM_PATH_MAX)) return result; printf("UTF8 CONVERTED TO WCS\n"); + fflush(stdout); /* Attempt to get the module handle without loading the library */ hmod = GetModuleHandleW(wpath); printf("ATTEMPTED TO GET HMODULE: %p\n", (void *)hmod); + fflush(stdout); if (!hmod) { printf("HMODULE NOT FOUND, ATTEMPING TO LOAD LIBRARY\n"); + fflush(stdout); /* Load library purely for getting resources, and not executing */ hmod = LoadLibraryExW(wpath, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE); printf("LIBRARY LOADED: %p\n", (void *)hmod); + fflush(stdout); if (!hmod) return result; is_loaded = TRUE; } printf("STARTED SYMBOL ENUMERATION\n"); + fflush(stdout); /* * From: https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-moduleinfo