Commit 0c3274b5 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp/msc: Better detect whether IPI stream is present.

Old version of PDB files can have a stream #4 which is not an IPI stream Available documentation isn't 100% clear about when IPI has been introduced. So decide that IPI is present when header of stream looks like a type stream header. Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 92fabc64
...@@ -3047,6 +3047,7 @@ static BOOL pdb_init_type_parse(const struct msc_debug_info* msc_dbg, ...@@ -3047,6 +3047,7 @@ static BOOL pdb_init_type_parse(const struct msc_debug_info* msc_dbg,
break; break;
default: default:
ERR("-Unknown type info version %d\n", types.version); ERR("-Unknown type info version %d\n", types.version);
return FALSE;
} }
ctp->module = msc_dbg->module; ctp->module = msc_dbg->module;
...@@ -3324,6 +3325,7 @@ static BOOL pdb_process_internal(const struct process* pcs, ...@@ -3324,6 +3325,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
BYTE* file; BYTE* file;
int header_size = 0; int header_size = 0;
PDB_STREAM_INDEXES* psi; PDB_STREAM_INDEXES* psi;
BOOL ipi_ok;
pdb_convert_symbols_header(&symbols, &header_size, symbols_image); pdb_convert_symbols_header(&symbols, &header_size, symbols_image);
switch (symbols.version) switch (symbols.version)
...@@ -3363,7 +3365,7 @@ static BOOL pdb_process_internal(const struct process* pcs, ...@@ -3363,7 +3365,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
pdb_process_types(msc_dbg, pdb_file); pdb_process_types(msc_dbg, pdb_file);
ipi_image = pdb_read_file(pdb_file, 4); ipi_image = pdb_read_file(pdb_file, 4);
pdb_init_type_parse(msc_dbg, &ipi_ctp, ipi_image); ipi_ok = pdb_init_type_parse(msc_dbg, &ipi_ctp, ipi_image);
/* Read global symbol table */ /* Read global symbol table */
globalimage = pdb_read_file(pdb_file, symbols.gsym_file); globalimage = pdb_read_file(pdb_file, symbols.gsym_file);
...@@ -3387,7 +3389,7 @@ static BOOL pdb_process_internal(const struct process* pcs, ...@@ -3387,7 +3389,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
modimage = pdb_read_file(pdb_file, sfile.file); modimage = pdb_read_file(pdb_file, sfile.file);
if (modimage) if (modimage)
{ {
struct cv_module_snarf cvmod = {&ipi_ctp, (const void*)(modimage + sfile.symbol_size), sfile.lineno2_size, struct cv_module_snarf cvmod = {ipi_ok ? &ipi_ctp : NULL, (const void*)(modimage + sfile.symbol_size), sfile.lineno2_size,
files_image + 12, files_size}; files_image + 12, files_size};
codeview_snarf(msc_dbg, modimage, sizeof(DWORD), sfile.symbol_size, codeview_snarf(msc_dbg, modimage, sizeof(DWORD), sfile.symbol_size,
&cvmod, TRUE); &cvmod, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment