dbghelp: Use the correct module name for lookups including module's name.

(modulename is truncated at 64 chars, while module.ModuleName at 32 chars)

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2021-09-06 10:40:14 +02:00 committed by Alexandre Julliard
parent b9ebb3fb62
commit b882ab2b25
3 changed files with 4 additions and 5 deletions

View file

@ -1068,8 +1068,7 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
lret = dwarf2_parse(module, module->reloc_delta, thunks, fmap);
ret = ret || lret;
}
if (wcsstr(module->module.ModuleName, S_ElfW) ||
!wcscmp(module->module.ModuleName, S_WineLoaderW))
if (wcsstr(module->modulename, S_ElfW) || !wcscmp(module->modulename, S_WineLoaderW))
{
/* add the thunks for native libraries */
if (!(dbghelp_options & SYMOPT_PUBLICS_ONLY))

View file

@ -271,7 +271,7 @@ struct module* module_find_by_nameW(const struct process* pcs, const WCHAR* name
for (module = pcs->lmodules; module; module = module->next)
{
if (!wcsicmp(name, module->module.ModuleName)) return module;
if (!wcsicmp(name, module->modulename)) return module;
}
SetLastError(ERROR_INVALID_NAME);
return NULL;

View file

@ -1089,7 +1089,7 @@ static BOOL sym_enum(HANDLE hProcess, ULONG64 BaseOfDll, PCWSTR Mask,
{
if (pair.requested->type == DMT_PE && module_get_debug(&pair))
{
if (SymMatchStringW(pair.requested->module.ModuleName, mod, FALSE) &&
if (SymMatchStringW(pair.requested->modulename, mod, FALSE) &&
symt_enum_module(&pair, bang + 1, se))
break;
}
@ -1104,7 +1104,7 @@ static BOOL sym_enum(HANDLE hProcess, ULONG64 BaseOfDll, PCWSTR Mask,
!module_get_containee(pair.pcs, pair.requested) &&
module_get_debug(&pair))
{
if (SymMatchStringW(pair.requested->module.ModuleName, mod, FALSE) &&
if (SymMatchStringW(pair.requested->modulename, mod, FALSE) &&
symt_enum_module(&pair, bang + 1, se))
break;
}