[PATCH] dbghelp: Use the internal modulename when comparing Module names.
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Sun Sep 5 17:43:10 CDT 2021
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/dbghelp/elf_module.c | 4 ++--
dlls/dbghelp/module.c | 2 +-
dlls/dbghelp/symbol.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 7be7e8efce6..7f9f336d6b4 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1068,8 +1068,8 @@ 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 3bc2a9e143a..66e9177c722 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 (!wcsnicmp(name, module->modulename, ARRAYSIZE(module->modulename))) return module;
}
SetLastError(ERROR_INVALID_NAME);
return NULL;
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 9863a736299..31cd7771ad2 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;
}
--
2.33.0
More information about the wine-devel
mailing list