[PATCH 5/7] dbghelp: use the correct module name for lookups including module's name
Eric Pouech
eric.pouech at gmail.com
Mon Sep 6 03:40:14 CDT 2021
(modulename is truncated at 64 chars, while module.ModuleName at 32 chars)
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
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;
}
More information about the wine-devel
mailing list