dbghelp: Report in module's info when a module's debug information has been mismatched (dbg and pdb only).
This commit is contained in:
parent
b1542f4f00
commit
01e69c71e0
|
@ -476,7 +476,8 @@ extern BOOL pdb_fetch_file_info(struct pdb_lookup* pdb_lookup);
|
|||
|
||||
/* path.c */
|
||||
extern BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_path,
|
||||
const GUID* guid, DWORD dw1, DWORD dw2, PSTR buffer);
|
||||
const GUID* guid, DWORD dw1, DWORD dw2, PSTR buffer,
|
||||
BOOL* is_unmatched);
|
||||
|
||||
/* pe_module.c */
|
||||
extern BOOL pe_load_nt_header(HANDLE hProc, DWORD base, IMAGE_NT_HEADERS* nth);
|
||||
|
|
|
@ -2134,7 +2134,8 @@ static void pdb_convert_symbol_file(const PDB_SYMBOLS* symbols,
|
|||
}
|
||||
|
||||
static HANDLE open_pdb_file(const struct process* pcs,
|
||||
const struct pdb_lookup* lookup)
|
||||
const struct pdb_lookup* lookup,
|
||||
struct module* module)
|
||||
{
|
||||
HANDLE h;
|
||||
char dbg_file_path[MAX_PATH];
|
||||
|
@ -2144,11 +2145,11 @@ static HANDLE open_pdb_file(const struct process* pcs,
|
|||
{
|
||||
case PDB_JG:
|
||||
ret = path_find_symbol_file(pcs, lookup->filename, NULL, lookup->u.jg.timestamp,
|
||||
lookup->age, dbg_file_path);
|
||||
lookup->age, dbg_file_path, &module->module.PdbUnmatched);
|
||||
break;
|
||||
case PDB_DS:
|
||||
ret = path_find_symbol_file(pcs, lookup->filename, &lookup->u.ds.guid, 0,
|
||||
lookup->age, dbg_file_path);
|
||||
lookup->age, dbg_file_path, &module->module.PdbUnmatched);
|
||||
break;
|
||||
}
|
||||
if (!ret)
|
||||
|
@ -2403,7 +2404,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
|
|||
TRACE("Processing PDB file %s\n", pdb_lookup->filename);
|
||||
|
||||
/* Open and map() .PDB file */
|
||||
if ((hFile = open_pdb_file(pcs, pdb_lookup)) == NULL ||
|
||||
if ((hFile = open_pdb_file(pcs, pdb_lookup, msc_dbg->module)) == NULL ||
|
||||
((hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) == NULL) ||
|
||||
((image = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0)) == NULL))
|
||||
{
|
||||
|
|
|
@ -612,7 +612,8 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user)
|
|||
}
|
||||
|
||||
BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_path,
|
||||
const GUID* guid, DWORD dw1, DWORD dw2, PSTR buffer)
|
||||
const GUID* guid, DWORD dw1, DWORD dw2, PSTR buffer,
|
||||
BOOL* is_unmatched)
|
||||
{
|
||||
struct module_find mf;
|
||||
WCHAR full_pathW[MAX_PATH];
|
||||
|
@ -632,6 +633,7 @@ BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_path,
|
|||
MultiByteToWideChar(CP_ACP, 0, full_path, -1, full_pathW, MAX_PATH);
|
||||
filename = file_nameW(full_pathW);
|
||||
mf.kind = module_get_type_by_name(filename);
|
||||
*is_unmatched = FALSE;
|
||||
|
||||
/* first check full path to file */
|
||||
if (module_find_cb(full_pathW, &mf))
|
||||
|
@ -665,6 +667,7 @@ BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_path,
|
|||
if ((dbghelp_options & SYMOPT_LOAD_ANYTHING) && mf.matched)
|
||||
{
|
||||
WideCharToMultiByte(CP_ACP, 0, mf.filename, -1, buffer, MAX_PATH, NULL, NULL);
|
||||
*is_unmatched = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
@ -94,7 +94,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, dbg_name, NULL, timestamp, 0, tmp) &&
|
||||
if (path_find_symbol_file(pcs, dbg_name, NULL, timestamp, 0, tmp, &module->module.DbgUnmatched) &&
|
||||
(hFile = CreateFileA(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) &&
|
||||
|
|
Loading…
Reference in New Issue