diff --git a/dlls/dbghelp/dbghelp.spec b/dlls/dbghelp/dbghelp.spec index b15aae773a1..ca688ee61a0 100644 --- a/dlls/dbghelp/dbghelp.spec +++ b/dlls/dbghelp/dbghelp.spec @@ -45,7 +45,7 @@ @ stdcall SymEnumTypes(ptr double ptr ptr) @ stub SymEnumTypesW @ stdcall SymEnumerateModules(long ptr ptr) -@ stub SymEnumerateModules64 +@ stdcall SymEnumerateModules64(long ptr ptr) @ stub SymEnumerateModulesW64 @ stdcall SymEnumerateSymbols(long long ptr ptr) @ stub SymEnumerateSymbols64 diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index c1c5dedef24..a08cf125f14 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -607,6 +607,30 @@ BOOL WINAPI SymEnumerateModules(HANDLE hProcess, return TRUE; } +/****************************************************************** + * SymEnumerateModules64 (DBGHELP.@) + * + */ +BOOL WINAPI SymEnumerateModules64(HANDLE hProcess, + PSYM_ENUMMODULES_CALLBACK64 EnumModulesCallback, + PVOID UserContext) +{ + struct process* pcs = process_find_by_handle(hProcess); + struct module* module; + + if (!pcs) return FALSE; + + for (module = pcs->lmodules; module; module = module->next) + { + if (!(dbghelp_options & SYMOPT_WINE_WITH_ELF_MODULES) && module->type == DMT_ELF) + continue; + if (!EnumModulesCallback(module->module.ModuleName, + module->module.BaseOfImage, UserContext)) + break; + } + return TRUE; +} + /****************************************************************** * EnumerateLoadedModules (DBGHELP.@) *