dbghelp: Fix module on which GetTypeFromName is done.

This commit is contained in:
Eric Pouech 2009-12-14 22:05:40 +01:00 committed by Alexandre Julliard
parent f96bdda0f3
commit 07c1a1ca51

View file

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