Commit 68cc7d58 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Beef up SymRefreshModuleList.

parent 50a8b2a6
...@@ -455,6 +455,15 @@ enum module_type module_get_type_by_name(const WCHAR* name) ...@@ -455,6 +455,15 @@ enum module_type module_get_type_by_name(const WCHAR* name)
return DMT_PE; return DMT_PE;
} }
/******************************************************************
* refresh_module_list
*/
static BOOL refresh_module_list(struct process* pcs)
{
/* force transparent ELF and Mach-O loading / unloading */
return elf_synchronize_module_list(pcs) || macho_synchronize_module_list(pcs);
}
/*********************************************************************** /***********************************************************************
* SymLoadModule (DBGHELP.@) * SymLoadModule (DBGHELP.@)
*/ */
...@@ -536,9 +545,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam ...@@ -536,9 +545,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
if (Flags & ~(SLMFLAG_VIRTUAL)) if (Flags & ~(SLMFLAG_VIRTUAL))
FIXME("Unsupported Flags %08x for %s\n", Flags, debugstr_w(wImageName)); FIXME("Unsupported Flags %08x for %s\n", Flags, debugstr_w(wImageName));
/* force transparent ELF and Mach-O loading / unloading */ refresh_module_list(pcs);
elf_synchronize_module_list(pcs);
macho_synchronize_module_list(pcs);
/* this is a Wine extension to the API just to redo the synchronisation */ /* this is a Wine extension to the API just to redo the synchronisation */
if (!wImageName && !hFile) return 0; if (!wImageName && !hFile) return 0;
...@@ -1058,6 +1065,11 @@ void module_reset_debug_info(struct module* module) ...@@ -1058,6 +1065,11 @@ void module_reset_debug_info(struct module* module)
*/ */
BOOL WINAPI SymRefreshModuleList(HANDLE hProcess) BOOL WINAPI SymRefreshModuleList(HANDLE hProcess)
{ {
FIXME("(%p) stub\n", hProcess); struct process* pcs;
return FALSE;
TRACE("(%p)\n", hProcess);
if (!(pcs = process_find_by_handle(hProcess))) return FALSE;
return refresh_module_list(pcs);
} }
...@@ -1461,6 +1461,7 @@ BOOL WINAPI SymGetSymPrevW(HANDLE, PIMAGEHLP_SYMBOLW); ...@@ -1461,6 +1461,7 @@ BOOL WINAPI SymGetSymPrevW(HANDLE, PIMAGEHLP_SYMBOLW);
DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD); DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID); BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID);
BOOL WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID); BOOL WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID);
BOOL WINAPI SymRefreshModuleList(HANDLE);
BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD); BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD);
BOOL WINAPI SymUnloadModule(HANDLE, DWORD); BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment