[WINESYNC] 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>

wine commit id c8b5a3be55963fcda51b8e13c10bcd45ecc4bc97 by Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
winesync 2020-09-11 18:27:43 +02:00 committed by Jérôme Gardou
parent 87c943516f
commit 065f0d9772
5 changed files with 7 additions and 9 deletions

View File

@ -672,8 +672,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;
@ -698,7 +696,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

@ -577,7 +577,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) &&

View File

@ -4,4 +4,4 @@ files:
include/dbghelp.h: sdk/include/psdk/dbghelp.h
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
tags:
wine: a676c5785ea56fede37370cd6d5e4508e9d8c62a
wine: c8b5a3be55963fcda51b8e13c10bcd45ecc4bc97