Commit b8ae9dcc authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winedump: Fix a couple of issues with types table walking.

Align types to DWORD boundaries. Split types dumping functions into two versions (one without offsets table, the second one with offset table).
parent f2ef7cf4
......@@ -190,7 +190,12 @@ static int dump_cv_sst_global_types(const OMFDirEntry* omfde)
data = PRD(fileoffset + sizeof(OMFGlobalTypes) + sizeof(DWORD) * types->cTypes, sz);
if (!data) {printf("Can't OMF-SymHash details, aborting\n"); return FALSE;}
codeview_dump_types(data, sz);
/* doc says:
* - for NB07 & NB08 (that we don't support yet), offsets are from types
* - for NB09, offsets are from data
* For now, we only support the later
*/
codeview_dump_types_from_offsets(data, (const DWORD*)(types + 1), types->cTypes);
return TRUE;
}
......
......@@ -458,7 +458,7 @@ static void pdb_dump_types(struct pdb_reader* reader)
types->search_len,
types->unknown_offset,
types->unknown_len);
codeview_dump_types((const char*)types + types->type_offset, types->type_size);
codeview_dump_types_from_block((const char*)types + types->type_offset, types->type_size);
free((char*)types);
}
......
......@@ -259,7 +259,8 @@ void emf_dump( void );
enum FileSig get_kind_pdb(void);
void pdb_dump(void);
int codeview_dump_symbols(const void* root, unsigned long size);
int codeview_dump_types(const void* table, unsigned long len);
int codeview_dump_types_from_offsets(const void* table, const DWORD* offsets, unsigned num_types);
int codeview_dump_types_from_block(const void* table, unsigned long len);
void dump_stabs(const void* pv_stabs, unsigned szstabs, const char* stabstr, unsigned szstr);
void dump_codeview(unsigned long ptr, unsigned long len);
......
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