[PATCH 5/6] [DbgHelp]: when matching module names in reg exp, now using Unicode module name

Eric Pouech eric.pouech at orange.fr
Mon Jan 2 14:06:11 CST 2012


(now we can get rid of module_name in module structure)

A+
---

 dlls/dbghelp/dbghelp_private.h |    2 --
 dlls/dbghelp/module.c          |    3 ---
 dlls/dbghelp/symbol.c          |    4 ++--
 3 files changed, 2 insertions(+), 7 deletions(-)


diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index 0e2aae7..a5b9b1e 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -357,8 +357,6 @@ struct module
 {
     struct process*             process;
     IMAGEHLP_MODULEW64          module;
-    /* ANSI copy of module.ModuleName for efficiency */
-    char                        module_name[MAX_PATH];
     struct module*              next;
     enum module_type		type : 16;
     unsigned short              is_virtual : 1;
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 2a1471f..934768e 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -101,9 +101,6 @@ static void module_fill_module(const WCHAR* in, WCHAR* out, size_t size)
 void module_set_module(struct module* module, const WCHAR* name)
 {
     module_fill_module(name, module->module.ModuleName, sizeof(module->module.ModuleName));
-    WideCharToMultiByte(CP_ACP, 0, module->module.ModuleName, -1,
-                        module->module_name, sizeof(module->module_name),
-                        NULL, NULL);
 }
 
 const WCHAR *get_wine_loader_name(void)
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 3346f51..2dfd44e 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -1131,7 +1131,7 @@ static BOOL sym_enum(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR Mask,
         {
             if (pair.requested->type == DMT_PE && module_get_debug(&pair))
             {
-                if (match_regexp(&mod_regex, pair.requested->module_name) &&
+                if (match_regexpW(&mod_regex, pair.requested->module.ModuleName) &&
                     symt_enum_module(&pair, &sym_regex, se))
                     break;
             }
@@ -1146,7 +1146,7 @@ static BOOL sym_enum(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR Mask,
                     !module_get_containee(pair.pcs, pair.requested) &&
                     module_get_debug(&pair))
                 {
-                    if (match_regexp(&mod_regex, pair.requested->module_name) &&
+                    if (match_regexpW(&mod_regex, pair.requested->module.ModuleName) &&
                         symt_enum_module(&pair, &sym_regex, se))
                     break;
                 }




More information about the wine-patches mailing list