[PATCH 4/9] [DbgHelp]: fix module on which GetTypeFromName is done

Eric Pouech eric.pouech at orange.fr
Mon Dec 14 15:05:40 CST 2009


(didn't use the module's container if any)

A+
---

 dlls/dbghelp/type.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c
index 3955815..b9f4a22 100644
--- a/dlls/dbghelp/type.c
+++ b/dlls/dbghelp/type.c
@@ -878,13 +878,13 @@ BOOL WINAPI SymGetTypeFromName(HANDLE hProcess, ULONG64 BaseOfDll,
                                PCSTR Name, PSYMBOL_INFO Symbol)
 {
     struct process*     pcs = process_find_by_handle(hProcess);
-    struct module*      module;
+    struct module_pair  pair;
     struct symt*        type;
 
     if (!pcs) return FALSE;
-    module = module_find_by_addr(pcs, BaseOfDll, DMT_UNKNOWN);
-    if (!module) return FALSE;
-    type = symt_find_type_by_name(module, SymTagNull, Name);
+    pair.requested = module_find_by_addr(pcs, BaseOfDll, DMT_UNKNOWN);
+    if (!module_get_debug(&pair)) return FALSE;
+    type = symt_find_type_by_name(pair.effective, SymTagNull, Name);
     if (!type) return FALSE;
     Symbol->TypeIndex = (DWORD)type;
 






More information about the wine-patches mailing list