Module: wine Branch: master Commit: b882ab2b254d065f5a00e3d3af19fbd73fb8457b URL: https://source.winehq.org/git/wine.git/?a=commit;h=b882ab2b254d065f5a00e3d3a...
Author: Eric Pouech eric.pouech@gmail.com Date: Mon Sep 6 10:40:14 2021 +0200
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
---
dlls/dbghelp/elf_module.c | 3 +-- dlls/dbghelp/module.c | 2 +- dlls/dbghelp/symbol.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index cc3fbcdb7ba..e23de1a8c63 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -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)) diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index df341284d6a..01803b027d8 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -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; diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 7e79950906a..09407e04fc0 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -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; }