dbghelp: Explicitly pass file type to path_find_symbol_file.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-03-25 17:41:26 +01:00 committed by Alexandre Julliard
parent a676c5785e
commit c8b5a3be55
4 changed files with 6 additions and 8 deletions

View File

@ -641,8 +641,6 @@ extern struct module*
extern struct module*
module_get_containee(const struct process* pcs,
const struct module* inner) DECLSPEC_HIDDEN;
extern enum module_type
module_get_type_by_name(const WCHAR* name) DECLSPEC_HIDDEN;
extern void module_reset_debug_info(struct module* module) DECLSPEC_HIDDEN;
extern BOOL module_remove(struct process* pcs,
struct module* module) DECLSPEC_HIDDEN;
@ -665,7 +663,7 @@ extern BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR ip,
/* path.c */
extern BOOL path_find_symbol_file(const struct process* pcs, const struct module* module,
PCSTR full_path, const GUID* guid, DWORD dw1, DWORD dw2,
PCSTR full_path, enum module_type type, const GUID* guid, DWORD dw1, DWORD dw2,
WCHAR *buffer, BOOL* is_unmatched) DECLSPEC_HIDDEN;
extern WCHAR *get_dos_file_name(const WCHAR *filename) DECLSPEC_HIDDEN;
extern BOOL search_dll_path(const WCHAR *name, BOOL (*match)(void*, HANDLE, const WCHAR*), void *param) DECLSPEC_HIDDEN;

View File

@ -2458,11 +2458,11 @@ static HANDLE map_pdb_file(const struct process* pcs,
switch (lookup->kind)
{
case PDB_JG:
ret = path_find_symbol_file(pcs, module, lookup->filename, NULL, lookup->timestamp,
ret = path_find_symbol_file(pcs, module, lookup->filename, DMT_PDB, NULL, lookup->timestamp,
lookup->age, dbg_file_path, &module->module.PdbUnmatched);
break;
case PDB_DS:
ret = path_find_symbol_file(pcs, module, lookup->filename, &lookup->guid, 0,
ret = path_find_symbol_file(pcs, module, lookup->filename, DMT_PDB, &lookup->guid, 0,
lookup->age, dbg_file_path, &module->module.PdbUnmatched);
break;
}

View File

@ -619,7 +619,7 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user)
}
BOOL path_find_symbol_file(const struct process* pcs, const struct module* module,
PCSTR full_path, const GUID* guid, DWORD dw1, DWORD dw2,
PCSTR full_path, enum module_type type, const GUID* guid, DWORD dw1, DWORD dw2,
WCHAR *buffer, BOOL* is_unmatched)
{
struct module_find mf;
@ -638,7 +638,7 @@ BOOL path_find_symbol_file(const struct process* pcs, const struct module* modul
MultiByteToWideChar(CP_ACP, 0, full_path, -1, full_pathW, MAX_PATH);
filename = file_name(full_pathW);
mf.kind = module_get_type_by_name(filename);
mf.kind = type;
*is_unmatched = FALSE;
/* first check full path to file */

View File

@ -548,7 +548,7 @@ static BOOL pe_load_dbg_file(const struct process* pcs, struct module* module,
TRACE("Processing DBG file %s\n", debugstr_a(dbg_name));
if (path_find_symbol_file(pcs, module, dbg_name, NULL, timestamp, 0, tmp, &module->module.DbgUnmatched) &&
if (path_find_symbol_file(pcs, module, dbg_name, DMT_DBG, NULL, timestamp, 0, tmp, &module->module.DbgUnmatched) &&
(hFile = CreateFileW(tmp, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) != INVALID_HANDLE_VALUE &&
((hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) != 0) &&