dbghelp: Relax failure conditions.
dbghelp tests build PDB files, without hash table in TPI stream, but also no types. Native is able to load these PDB files. So, don't fail when loading a PDB without a TPI hash table and without any types. Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
d05b7c8e19
commit
0e3dba2a7a
1 changed files with 8 additions and 6 deletions
|
@ -3351,13 +3351,15 @@ static BOOL pdb_init_type_parse(const struct msc_debug_info* msc_dbg,
|
||||||
ERR("-Unsupported hash of size %u\n", ctp->header.hash_value_size);
|
ERR("-Unsupported hash of size %u\n", ctp->header.hash_value_size);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
ctp->hash_stream = pdb_read_stream(pdb_file, ctp->header.hash_stream);
|
if (!(ctp->hash_stream = pdb_read_stream(pdb_file, ctp->header.hash_stream)))
|
||||||
/* FIXME always present? if not reconstruct ?*/
|
|
||||||
if (!ctp->hash_stream)
|
|
||||||
{
|
{
|
||||||
ERR("-Missing hash table in PDB file\n");
|
if (ctp->header.last_index > ctp->header.first_index)
|
||||||
|
{
|
||||||
|
/* may be reconstruct hash table ? */
|
||||||
|
FIXME("-No hash table, while types exist\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ctp->module = msc_dbg->module;
|
ctp->module = msc_dbg->module;
|
||||||
/* Reconstruct the types offset table
|
/* Reconstruct the types offset table
|
||||||
|
@ -3388,7 +3390,7 @@ static BOOL pdb_init_type_parse(const struct msc_debug_info* msc_dbg,
|
||||||
/* parse the remap table
|
/* parse the remap table
|
||||||
* => move listed type_id at first position of their hash buckets so that we force remap to them
|
* => move listed type_id at first position of their hash buckets so that we force remap to them
|
||||||
*/
|
*/
|
||||||
if (ctp->header.type_remap_size)
|
if (ctp->hash_stream && ctp->header.type_remap_size)
|
||||||
{
|
{
|
||||||
const unsigned* remap = (const unsigned*)((const BYTE*)ctp->hash_stream + ctp->header.type_remap_offset);
|
const unsigned* remap = (const unsigned*)((const BYTE*)ctp->hash_stream + ctp->header.type_remap_offset);
|
||||||
unsigned i, capa, count_present;
|
unsigned i, capa, count_present;
|
||||||
|
|
Loading…
Add table
Reference in a new issue