include: Avoid Windows types in CodeView structure definitions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6f04c33c04
commit
53ab4c5385
|
@ -540,8 +540,8 @@ struct pdb_lookup
|
||||||
{
|
{
|
||||||
const char* filename;
|
const char* filename;
|
||||||
enum pdb_kind kind;
|
enum pdb_kind kind;
|
||||||
DWORD age;
|
unsigned int age;
|
||||||
DWORD timestamp;
|
unsigned int timestamp;
|
||||||
GUID guid;
|
GUID guid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2761,7 +2761,7 @@ static void* pdb_jg_read(const struct PDB_JG_HEADER* pdb, const WORD* block_list
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* pdb_ds_read(const struct PDB_DS_HEADER* pdb, const DWORD* block_list,
|
static void* pdb_ds_read(const struct PDB_DS_HEADER* pdb, const UINT *block_list,
|
||||||
int size)
|
int size)
|
||||||
{
|
{
|
||||||
int i, num_blocks;
|
int i, num_blocks;
|
||||||
|
@ -2797,7 +2797,7 @@ static void* pdb_read_jg_file(const struct PDB_JG_HEADER* pdb,
|
||||||
static void* pdb_read_ds_file(const struct PDB_DS_HEADER* pdb,
|
static void* pdb_read_ds_file(const struct PDB_DS_HEADER* pdb,
|
||||||
const struct PDB_DS_TOC* toc, DWORD file_nr)
|
const struct PDB_DS_TOC* toc, DWORD file_nr)
|
||||||
{
|
{
|
||||||
const DWORD* block_list;
|
const UINT *block_list;
|
||||||
DWORD i;
|
DWORD i;
|
||||||
|
|
||||||
if (!toc || file_nr >= toc->num_files) return NULL;
|
if (!toc || file_nr >= toc->num_files) return NULL;
|
||||||
|
@ -3069,7 +3069,7 @@ static BOOL pdb_init_type_parse(const struct msc_debug_info* msc_dbg,
|
||||||
case 20040203: /* VC 8.0 */
|
case 20040203: /* VC 8.0 */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ERR("-Unknown type info version %ld\n", types.version);
|
ERR("-Unknown type info version %d\n", types.version);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3150,7 +3150,7 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
|
||||||
case 19970604: /* VC 6.0 */
|
case 19970604: /* VC 6.0 */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ERR("-Unknown root block version %ld\n", root->Version);
|
ERR("-Unknown root block version %d\n", root->Version);
|
||||||
}
|
}
|
||||||
if (pdb_lookup->kind != PDB_JG)
|
if (pdb_lookup->kind != PDB_JG)
|
||||||
{
|
{
|
||||||
|
@ -3162,12 +3162,12 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
|
||||||
pdb_file->u.jg.timestamp = root->TimeDateStamp;
|
pdb_file->u.jg.timestamp = root->TimeDateStamp;
|
||||||
pdb_file->age = root->Age;
|
pdb_file->age = root->Age;
|
||||||
if (root->TimeDateStamp == pdb_lookup->timestamp) (*matched)++;
|
if (root->TimeDateStamp == pdb_lookup->timestamp) (*matched)++;
|
||||||
else WARN("Found %s, but wrong signature: %08lx %08lx\n",
|
else WARN("Found %s, but wrong signature: %08x %08x\n",
|
||||||
pdb_lookup->filename, root->TimeDateStamp, pdb_lookup->timestamp);
|
pdb_lookup->filename, root->TimeDateStamp, pdb_lookup->timestamp);
|
||||||
if (root->Age == pdb_lookup->age) (*matched)++;
|
if (root->Age == pdb_lookup->age) (*matched)++;
|
||||||
else WARN("Found %s, but wrong age: %08lx %08lx\n",
|
else WARN("Found %s, but wrong age: %08x %08x\n",
|
||||||
pdb_lookup->filename, root->Age, pdb_lookup->age);
|
pdb_lookup->filename, root->Age, pdb_lookup->age);
|
||||||
TRACE("found JG for %s: age=%lx timestamp=%lx\n",
|
TRACE("found JG for %s: age=%x timestamp=%x\n",
|
||||||
pdb_lookup->filename, root->Age, root->TimeDateStamp);
|
pdb_lookup->filename, root->Age, root->TimeDateStamp);
|
||||||
pdb_load_stream_name_table(pdb_file, &root->names[0], root->cbNames);
|
pdb_load_stream_name_table(pdb_file, &root->names[0], root->cbNames);
|
||||||
|
|
||||||
|
@ -3179,8 +3179,7 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
|
||||||
struct PDB_DS_ROOT* root;
|
struct PDB_DS_ROOT* root;
|
||||||
|
|
||||||
pdb_file->u.ds.toc =
|
pdb_file->u.ds.toc =
|
||||||
pdb_ds_read(pdb,
|
pdb_ds_read(pdb, (const UINT*)((const char*)pdb + pdb->toc_page * pdb->block_size),
|
||||||
(const DWORD*)((const char*)pdb + pdb->toc_page * pdb->block_size),
|
|
||||||
pdb->toc_size);
|
pdb->toc_size);
|
||||||
root = pdb_read_ds_file(pdb, pdb_file->u.ds.toc, 1);
|
root = pdb_read_ds_file(pdb, pdb_file->u.ds.toc, 1);
|
||||||
if (!root)
|
if (!root)
|
||||||
|
@ -3193,7 +3192,7 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
|
||||||
case 20000404:
|
case 20000404:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ERR("-Unknown root block version %ld\n", root->Version);
|
ERR("-Unknown root block version %u\n", root->Version);
|
||||||
}
|
}
|
||||||
pdb_file->kind = PDB_DS;
|
pdb_file->kind = PDB_DS;
|
||||||
pdb_file->u.ds.guid = root->guid;
|
pdb_file->u.ds.guid = root->guid;
|
||||||
|
@ -3203,9 +3202,9 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info*
|
||||||
pdb_lookup->filename, debugstr_guid(&root->guid),
|
pdb_lookup->filename, debugstr_guid(&root->guid),
|
||||||
debugstr_guid(&pdb_lookup->guid));
|
debugstr_guid(&pdb_lookup->guid));
|
||||||
if (root->Age == pdb_lookup->age) (*matched)++;
|
if (root->Age == pdb_lookup->age) (*matched)++;
|
||||||
else WARN("Found %s, but wrong age: %08lx %08lx\n",
|
else WARN("Found %s, but wrong age: %08x %08x\n",
|
||||||
pdb_lookup->filename, root->Age, pdb_lookup->age);
|
pdb_lookup->filename, root->Age, pdb_lookup->age);
|
||||||
TRACE("found DS for %s: age=%lx guid=%s\n",
|
TRACE("found DS for %s: age=%x guid=%s\n",
|
||||||
pdb_lookup->filename, root->Age, debugstr_guid(&root->guid));
|
pdb_lookup->filename, root->Age, debugstr_guid(&root->guid));
|
||||||
pdb_load_stream_name_table(pdb_file, &root->names[0], root->cbNames);
|
pdb_load_stream_name_table(pdb_file, &root->names[0], root->cbNames);
|
||||||
|
|
||||||
|
@ -3284,7 +3283,7 @@ static void pdb_process_symbol_imports(const struct process* pcs,
|
||||||
imp_pdb_lookup.kind = PDB_JG;
|
imp_pdb_lookup.kind = PDB_JG;
|
||||||
imp_pdb_lookup.timestamp = imp->TimeDateStamp;
|
imp_pdb_lookup.timestamp = imp->TimeDateStamp;
|
||||||
imp_pdb_lookup.age = imp->Age;
|
imp_pdb_lookup.age = imp->Age;
|
||||||
TRACE("got for %s: age=%lu ts=%lx\n",
|
TRACE("got for %s: age=%u ts=%x\n",
|
||||||
imp->filename, imp->Age, imp->TimeDateStamp);
|
imp->filename, imp->Age, imp->TimeDateStamp);
|
||||||
pdb_process_internal(pcs, msc_dbg, &imp_pdb_lookup, pdb_module_info, i);
|
pdb_process_internal(pcs, msc_dbg, &imp_pdb_lookup, pdb_module_info, i);
|
||||||
}
|
}
|
||||||
|
@ -3359,7 +3358,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
|
||||||
case 19990903:
|
case 19990903:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ERR("-Unknown symbol info version %ld %08lx\n",
|
ERR("-Unknown symbol info version %u %08x\n",
|
||||||
symbols.version, symbols.version);
|
symbols.version, symbols.version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3377,7 +3376,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
|
||||||
pdb_file->fpoext_stream = psi->FPO_EXT;
|
pdb_file->fpoext_stream = psi->FPO_EXT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FIXME("Unknown PDB_STREAM_INDEXES size (%ld)\n", symbols.stream_index_size);
|
FIXME("Unknown PDB_STREAM_INDEXES size (%u)\n", symbols.stream_index_size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
files_image = pdb_read_strings(pdb_file);
|
files_image = pdb_read_strings(pdb_file);
|
||||||
|
@ -3817,7 +3816,7 @@ BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR ip,
|
||||||
{
|
{
|
||||||
if (fpoext[i].start <= ip && ip < fpoext[i].start + fpoext[i].func_size)
|
if (fpoext[i].start <= ip && ip < fpoext[i].start + fpoext[i].func_size)
|
||||||
{
|
{
|
||||||
TRACE("\t%08lx %08lx %8lx %8lx %4lx %4x %4x %08lx %s\n",
|
TRACE("\t%08x %08x %8x %8x %4x %4x %4x %08x %s\n",
|
||||||
fpoext[i].start, fpoext[i].func_size, fpoext[i].locals_size,
|
fpoext[i].start, fpoext[i].func_size, fpoext[i].locals_size,
|
||||||
fpoext[i].params_size, fpoext[i].maxstack_size, fpoext[i].prolog_size,
|
fpoext[i].params_size, fpoext[i].maxstack_size, fpoext[i].prolog_size,
|
||||||
fpoext[i].savedregs_size, fpoext[i].flags,
|
fpoext[i].savedregs_size, fpoext[i].flags,
|
||||||
|
@ -3951,7 +3950,7 @@ static BOOL codeview_process_info(const struct process* pcs,
|
||||||
{
|
{
|
||||||
const OMFSignatureRSDS* rsds = (const OMFSignatureRSDS*)msc_dbg->root;
|
const OMFSignatureRSDS* rsds = (const OMFSignatureRSDS*)msc_dbg->root;
|
||||||
|
|
||||||
TRACE("Got RSDS type of PDB file: guid=%s age=%08lx name=%s\n",
|
TRACE("Got RSDS type of PDB file: guid=%s age=%08x name=%s\n",
|
||||||
wine_dbgstr_guid(&rsds->guid), rsds->age, rsds->name);
|
wine_dbgstr_guid(&rsds->guid), rsds->age, rsds->name);
|
||||||
pdb_lookup.filename = rsds->name;
|
pdb_lookup.filename = rsds->name;
|
||||||
pdb_lookup.kind = PDB_DS;
|
pdb_lookup.kind = PDB_DS;
|
||||||
|
|
|
@ -2340,236 +2340,236 @@ struct startend
|
||||||
|
|
||||||
struct PDB_FILE
|
struct PDB_FILE
|
||||||
{
|
{
|
||||||
DWORD size;
|
unsigned int size;
|
||||||
DWORD unknown;
|
unsigned int unknown;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PDB_JG_HEADER
|
struct PDB_JG_HEADER
|
||||||
{
|
{
|
||||||
CHAR ident[40];
|
char ident[40];
|
||||||
DWORD signature;
|
unsigned int signature;
|
||||||
DWORD block_size;
|
unsigned int block_size;
|
||||||
WORD free_list;
|
unsigned short free_list;
|
||||||
WORD total_alloc;
|
unsigned short total_alloc;
|
||||||
struct PDB_FILE toc;
|
struct PDB_FILE toc;
|
||||||
WORD toc_block[1];
|
unsigned short toc_block[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PDB_DS_HEADER
|
struct PDB_DS_HEADER
|
||||||
{
|
{
|
||||||
char signature[32];
|
char signature[32];
|
||||||
DWORD block_size;
|
unsigned int block_size;
|
||||||
DWORD unknown1;
|
unsigned int unknown1;
|
||||||
DWORD num_pages;
|
unsigned int num_pages;
|
||||||
DWORD toc_size;
|
unsigned int toc_size;
|
||||||
DWORD unknown2;
|
unsigned int unknown2;
|
||||||
DWORD toc_page;
|
unsigned int toc_page;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PDB_JG_TOC
|
struct PDB_JG_TOC
|
||||||
{
|
{
|
||||||
DWORD num_files;
|
unsigned int num_files;
|
||||||
struct PDB_FILE file[1];
|
struct PDB_FILE file[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PDB_DS_TOC
|
struct PDB_DS_TOC
|
||||||
{
|
{
|
||||||
DWORD num_files;
|
unsigned int num_files;
|
||||||
DWORD file_size[1];
|
unsigned int file_size[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PDB_JG_ROOT
|
struct PDB_JG_ROOT
|
||||||
{
|
{
|
||||||
DWORD Version;
|
unsigned int Version;
|
||||||
DWORD TimeDateStamp;
|
unsigned int TimeDateStamp;
|
||||||
DWORD Age;
|
unsigned int Age;
|
||||||
DWORD cbNames;
|
unsigned int cbNames;
|
||||||
CHAR names[1];
|
char names[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PDB_DS_ROOT
|
struct PDB_DS_ROOT
|
||||||
{
|
{
|
||||||
DWORD Version;
|
unsigned int Version;
|
||||||
DWORD TimeDateStamp;
|
unsigned int TimeDateStamp;
|
||||||
DWORD Age;
|
unsigned int Age;
|
||||||
GUID guid;
|
GUID guid;
|
||||||
DWORD cbNames;
|
unsigned int cbNames;
|
||||||
CHAR names[1];
|
char names[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _PDB_TYPES_OLD
|
typedef struct _PDB_TYPES_OLD
|
||||||
{
|
{
|
||||||
DWORD version;
|
unsigned int version;
|
||||||
WORD first_index;
|
unsigned short first_index;
|
||||||
WORD last_index;
|
unsigned short last_index;
|
||||||
DWORD type_size;
|
unsigned int type_size;
|
||||||
WORD file;
|
unsigned short file;
|
||||||
WORD pad;
|
unsigned short pad;
|
||||||
} PDB_TYPES_OLD, *PPDB_TYPES_OLD;
|
} PDB_TYPES_OLD, *PPDB_TYPES_OLD;
|
||||||
|
|
||||||
typedef struct _PDB_TYPES
|
typedef struct _PDB_TYPES
|
||||||
{
|
{
|
||||||
DWORD version;
|
unsigned int version;
|
||||||
DWORD type_offset;
|
unsigned int type_offset;
|
||||||
DWORD first_index;
|
unsigned int first_index;
|
||||||
DWORD last_index;
|
unsigned int last_index;
|
||||||
DWORD type_size;
|
unsigned int type_size;
|
||||||
WORD file;
|
unsigned short file;
|
||||||
WORD pad;
|
unsigned short pad;
|
||||||
DWORD hash_size;
|
unsigned int hash_size;
|
||||||
DWORD hash_base;
|
unsigned int hash_base;
|
||||||
DWORD hash_offset;
|
unsigned int hash_offset;
|
||||||
DWORD hash_len;
|
unsigned int hash_len;
|
||||||
DWORD search_offset;
|
unsigned int search_offset;
|
||||||
DWORD search_len;
|
unsigned int search_len;
|
||||||
DWORD unknown_offset;
|
unsigned int unknown_offset;
|
||||||
DWORD unknown_len;
|
unsigned int unknown_len;
|
||||||
} PDB_TYPES, *PPDB_TYPES;
|
} PDB_TYPES, *PPDB_TYPES;
|
||||||
|
|
||||||
typedef struct _PDB_SYMBOL_RANGE
|
typedef struct _PDB_SYMBOL_RANGE
|
||||||
{
|
{
|
||||||
WORD segment;
|
unsigned short segment;
|
||||||
WORD pad1;
|
unsigned short pad1;
|
||||||
DWORD offset;
|
unsigned int offset;
|
||||||
DWORD size;
|
unsigned int size;
|
||||||
DWORD characteristics;
|
unsigned int characteristics;
|
||||||
WORD index;
|
unsigned short index;
|
||||||
WORD pad2;
|
unsigned short pad2;
|
||||||
} PDB_SYMBOL_RANGE, *PPDB_SYMBOL_RANGE;
|
} PDB_SYMBOL_RANGE, *PPDB_SYMBOL_RANGE;
|
||||||
|
|
||||||
typedef struct _PDB_SYMBOL_RANGE_EX
|
typedef struct _PDB_SYMBOL_RANGE_EX
|
||||||
{
|
{
|
||||||
WORD segment;
|
unsigned short segment;
|
||||||
WORD pad1;
|
unsigned short pad1;
|
||||||
DWORD offset;
|
unsigned int offset;
|
||||||
DWORD size;
|
unsigned int size;
|
||||||
DWORD characteristics;
|
unsigned int characteristics;
|
||||||
WORD index;
|
unsigned short index;
|
||||||
WORD pad2;
|
unsigned short pad2;
|
||||||
DWORD timestamp;
|
unsigned int timestamp;
|
||||||
DWORD unknown;
|
unsigned int unknown;
|
||||||
} PDB_SYMBOL_RANGE_EX, *PPDB_SYMBOL_RANGE_EX;
|
} PDB_SYMBOL_RANGE_EX, *PPDB_SYMBOL_RANGE_EX;
|
||||||
|
|
||||||
typedef struct _PDB_SYMBOL_FILE
|
typedef struct _PDB_SYMBOL_FILE
|
||||||
{
|
{
|
||||||
DWORD unknown1;
|
unsigned int unknown1;
|
||||||
PDB_SYMBOL_RANGE range;
|
PDB_SYMBOL_RANGE range;
|
||||||
WORD flag;
|
unsigned short flag;
|
||||||
WORD file;
|
unsigned short file;
|
||||||
DWORD symbol_size;
|
unsigned int symbol_size;
|
||||||
DWORD lineno_size;
|
unsigned int lineno_size;
|
||||||
DWORD lineno2_size;
|
unsigned int lineno2_size;
|
||||||
DWORD nSrcFiles;
|
unsigned int nSrcFiles;
|
||||||
DWORD attribute;
|
unsigned int attribute;
|
||||||
CHAR filename[1];
|
char filename[1];
|
||||||
} PDB_SYMBOL_FILE, *PPDB_SYMBOL_FILE;
|
} PDB_SYMBOL_FILE, *PPDB_SYMBOL_FILE;
|
||||||
|
|
||||||
typedef struct _PDB_SYMBOL_FILE_EX
|
typedef struct _PDB_SYMBOL_FILE_EX
|
||||||
{
|
{
|
||||||
DWORD unknown1;
|
unsigned int unknown1;
|
||||||
PDB_SYMBOL_RANGE_EX range;
|
PDB_SYMBOL_RANGE_EX range;
|
||||||
WORD flag;
|
unsigned short flag;
|
||||||
WORD file;
|
unsigned short file;
|
||||||
DWORD symbol_size;
|
unsigned int symbol_size;
|
||||||
DWORD lineno_size;
|
unsigned int lineno_size;
|
||||||
DWORD lineno2_size;
|
unsigned int lineno2_size;
|
||||||
DWORD nSrcFiles;
|
unsigned int nSrcFiles;
|
||||||
DWORD attribute;
|
unsigned int attribute;
|
||||||
DWORD reserved[2];
|
unsigned int reserved[2];
|
||||||
CHAR filename[1];
|
char filename[1];
|
||||||
} PDB_SYMBOL_FILE_EX, *PPDB_SYMBOL_FILE_EX;
|
} PDB_SYMBOL_FILE_EX, *PPDB_SYMBOL_FILE_EX;
|
||||||
|
|
||||||
typedef struct _PDB_SYMBOL_SOURCE
|
typedef struct _PDB_SYMBOL_SOURCE
|
||||||
{
|
{
|
||||||
WORD nModules;
|
unsigned short nModules;
|
||||||
WORD nSrcFiles;
|
unsigned short nSrcFiles;
|
||||||
WORD table[1];
|
unsigned short table[1];
|
||||||
} PDB_SYMBOL_SOURCE, *PPDB_SYMBOL_SOURCE;
|
} PDB_SYMBOL_SOURCE, *PPDB_SYMBOL_SOURCE;
|
||||||
|
|
||||||
typedef struct _PDB_SYMBOL_IMPORT
|
typedef struct _PDB_SYMBOL_IMPORT
|
||||||
{
|
{
|
||||||
DWORD unknown1;
|
unsigned int unknown1;
|
||||||
DWORD unknown2;
|
unsigned int unknown2;
|
||||||
DWORD TimeDateStamp;
|
unsigned int TimeDateStamp;
|
||||||
DWORD Age;
|
unsigned int Age;
|
||||||
CHAR filename[1];
|
char filename[1];
|
||||||
} PDB_SYMBOL_IMPORT, *PPDB_SYMBOL_IMPORT;
|
} PDB_SYMBOL_IMPORT, *PPDB_SYMBOL_IMPORT;
|
||||||
|
|
||||||
typedef struct _PDB_SYMBOLS_OLD
|
typedef struct _PDB_SYMBOLS_OLD
|
||||||
{
|
{
|
||||||
WORD global_file;
|
unsigned short global_file;
|
||||||
WORD public_file;
|
unsigned short public_file;
|
||||||
WORD gsym_file;
|
unsigned short gsym_file;
|
||||||
WORD pad;
|
unsigned short pad;
|
||||||
DWORD module_size;
|
unsigned int module_size;
|
||||||
DWORD offset_size;
|
unsigned int offset_size;
|
||||||
DWORD hash_size;
|
unsigned int hash_size;
|
||||||
DWORD srcmodule_size;
|
unsigned int srcmodule_size;
|
||||||
} PDB_SYMBOLS_OLD, *PPDB_SYMBOLS_OLD;
|
} PDB_SYMBOLS_OLD, *PPDB_SYMBOLS_OLD;
|
||||||
|
|
||||||
typedef struct _PDB_SYMBOLS
|
typedef struct _PDB_SYMBOLS
|
||||||
{
|
{
|
||||||
DWORD signature;
|
unsigned int signature;
|
||||||
DWORD version;
|
unsigned int version;
|
||||||
DWORD age;
|
unsigned int age;
|
||||||
WORD global_file;
|
unsigned short global_file;
|
||||||
WORD flags;
|
unsigned short flags;
|
||||||
WORD public_file;
|
unsigned short public_file;
|
||||||
WORD bldVer;
|
unsigned short bldVer;
|
||||||
WORD gsym_file;
|
unsigned short gsym_file;
|
||||||
WORD rbldVer;
|
unsigned short rbldVer;
|
||||||
DWORD module_size;
|
unsigned int module_size;
|
||||||
DWORD offset_size;
|
unsigned int offset_size;
|
||||||
DWORD hash_size;
|
unsigned int hash_size;
|
||||||
DWORD srcmodule_size;
|
unsigned int srcmodule_size;
|
||||||
DWORD pdbimport_size;
|
unsigned int pdbimport_size;
|
||||||
DWORD resvd0;
|
unsigned int resvd0;
|
||||||
DWORD stream_index_size;
|
unsigned int stream_index_size;
|
||||||
DWORD unknown2_size;
|
unsigned int unknown2_size;
|
||||||
WORD resvd3;
|
unsigned short resvd3;
|
||||||
WORD machine;
|
unsigned short machine;
|
||||||
DWORD resvd4;
|
unsigned int resvd4;
|
||||||
} PDB_SYMBOLS, *PPDB_SYMBOLS;
|
} PDB_SYMBOLS, *PPDB_SYMBOLS;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
WORD FPO;
|
unsigned short FPO;
|
||||||
WORD unk0;
|
unsigned short unk0;
|
||||||
WORD unk1;
|
unsigned short unk1;
|
||||||
WORD unk2;
|
unsigned short unk2;
|
||||||
WORD unk3;
|
unsigned short unk3;
|
||||||
WORD segments;
|
unsigned short segments;
|
||||||
} PDB_STREAM_INDEXES_OLD;
|
} PDB_STREAM_INDEXES_OLD;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
WORD FPO;
|
unsigned short FPO;
|
||||||
WORD unk0;
|
unsigned short unk0;
|
||||||
WORD unk1;
|
unsigned short unk1;
|
||||||
WORD unk2;
|
unsigned short unk2;
|
||||||
WORD unk3;
|
unsigned short unk3;
|
||||||
WORD segments;
|
unsigned short segments;
|
||||||
WORD unk4;
|
unsigned short unk4;
|
||||||
WORD unk5;
|
unsigned short unk5;
|
||||||
WORD unk6;
|
unsigned short unk6;
|
||||||
WORD FPO_EXT;
|
unsigned short FPO_EXT;
|
||||||
WORD unk7;
|
unsigned short unk7;
|
||||||
} PDB_STREAM_INDEXES;
|
} PDB_STREAM_INDEXES;
|
||||||
|
|
||||||
typedef struct _PDB_FPO_DATA
|
typedef struct _PDB_FPO_DATA
|
||||||
{
|
{
|
||||||
DWORD start;
|
unsigned int start;
|
||||||
DWORD func_size;
|
unsigned int func_size;
|
||||||
DWORD locals_size;
|
unsigned int locals_size;
|
||||||
DWORD params_size;
|
unsigned int params_size;
|
||||||
DWORD maxstack_size;
|
unsigned int maxstack_size;
|
||||||
DWORD str_offset;
|
unsigned int str_offset;
|
||||||
WORD prolog_size;
|
unsigned short prolog_size;
|
||||||
WORD savedregs_size;
|
unsigned short savedregs_size;
|
||||||
#define PDB_FPO_DFL_SEH 0x00000001
|
#define PDB_FPO_DFL_SEH 0x00000001
|
||||||
#define PDB_FPO_DFL_EH 0x00000002
|
#define PDB_FPO_DFL_EH 0x00000002
|
||||||
#define PDB_FPO_DFL_IN_BLOCK 0x00000004
|
#define PDB_FPO_DFL_IN_BLOCK 0x00000004
|
||||||
DWORD flags;
|
unsigned int flags;
|
||||||
} PDB_FPO_DATA;
|
} PDB_FPO_DATA;
|
||||||
|
|
||||||
#include "poppack.h"
|
#include "poppack.h"
|
||||||
|
@ -2601,59 +2601,59 @@ typedef struct _PDB_FPO_DATA
|
||||||
typedef struct OMFSignature
|
typedef struct OMFSignature
|
||||||
{
|
{
|
||||||
char Signature[4];
|
char Signature[4];
|
||||||
long filepos;
|
int filepos;
|
||||||
} OMFSignature;
|
} OMFSignature;
|
||||||
|
|
||||||
typedef struct OMFSignatureRSDS
|
typedef struct OMFSignatureRSDS
|
||||||
{
|
{
|
||||||
char Signature[4];
|
char Signature[4];
|
||||||
GUID guid;
|
GUID guid;
|
||||||
DWORD age;
|
unsigned int age;
|
||||||
CHAR name[1];
|
char name[1];
|
||||||
} OMFSignatureRSDS;
|
} OMFSignatureRSDS;
|
||||||
|
|
||||||
typedef struct _CODEVIEW_PDB_DATA
|
typedef struct _CODEVIEW_PDB_DATA
|
||||||
{
|
{
|
||||||
char Signature[4];
|
char Signature[4];
|
||||||
long filepos;
|
int filepos;
|
||||||
DWORD timestamp;
|
unsigned int timestamp;
|
||||||
DWORD age;
|
unsigned int age;
|
||||||
CHAR name[1];
|
char name[1];
|
||||||
} CODEVIEW_PDB_DATA, *PCODEVIEW_PDB_DATA;
|
} CODEVIEW_PDB_DATA, *PCODEVIEW_PDB_DATA;
|
||||||
|
|
||||||
typedef struct OMFDirHeader
|
typedef struct OMFDirHeader
|
||||||
{
|
{
|
||||||
WORD cbDirHeader;
|
unsigned short cbDirHeader;
|
||||||
WORD cbDirEntry;
|
unsigned short cbDirEntry;
|
||||||
DWORD cDir;
|
unsigned int cDir;
|
||||||
DWORD lfoNextDir;
|
unsigned int lfoNextDir;
|
||||||
DWORD flags;
|
unsigned int flags;
|
||||||
} OMFDirHeader;
|
} OMFDirHeader;
|
||||||
|
|
||||||
typedef struct OMFDirEntry
|
typedef struct OMFDirEntry
|
||||||
{
|
{
|
||||||
WORD SubSection;
|
unsigned short SubSection;
|
||||||
WORD iMod;
|
unsigned short iMod;
|
||||||
DWORD lfo;
|
unsigned int lfo;
|
||||||
DWORD cb;
|
unsigned int cb;
|
||||||
} OMFDirEntry;
|
} OMFDirEntry;
|
||||||
|
|
||||||
/* sstModule subsection */
|
/* sstModule subsection */
|
||||||
|
|
||||||
typedef struct OMFSegDesc
|
typedef struct OMFSegDesc
|
||||||
{
|
{
|
||||||
WORD Seg;
|
unsigned short Seg;
|
||||||
WORD pad;
|
unsigned short pad;
|
||||||
DWORD Off;
|
unsigned int Off;
|
||||||
DWORD cbSeg;
|
unsigned int cbSeg;
|
||||||
} OMFSegDesc;
|
} OMFSegDesc;
|
||||||
|
|
||||||
typedef struct OMFModule
|
typedef struct OMFModule
|
||||||
{
|
{
|
||||||
WORD ovlNumber;
|
unsigned short ovlNumber;
|
||||||
WORD iLib;
|
unsigned short iLib;
|
||||||
WORD cSeg;
|
unsigned short cSeg;
|
||||||
char Style[2];
|
char Style[2];
|
||||||
/*
|
/*
|
||||||
OMFSegDesc SegInfo[cSeg];
|
OMFSegDesc SegInfo[cSeg];
|
||||||
p_string Name;
|
p_string Name;
|
||||||
|
@ -2662,10 +2662,10 @@ typedef struct OMFModule
|
||||||
|
|
||||||
typedef struct OMFGlobalTypes
|
typedef struct OMFGlobalTypes
|
||||||
{
|
{
|
||||||
DWORD flags;
|
unsigned int flags;
|
||||||
DWORD cTypes;
|
unsigned int cTypes;
|
||||||
/*
|
/*
|
||||||
DWORD offset[cTypes];
|
unsigned int offset[cTypes];
|
||||||
types_record[];
|
types_record[];
|
||||||
*/
|
*/
|
||||||
} OMFGlobalTypes;
|
} OMFGlobalTypes;
|
||||||
|
@ -2677,9 +2677,9 @@ typedef struct OMFSymHash
|
||||||
{
|
{
|
||||||
unsigned short symhash;
|
unsigned short symhash;
|
||||||
unsigned short addrhash;
|
unsigned short addrhash;
|
||||||
unsigned long cbSymbol;
|
unsigned int cbSymbol;
|
||||||
unsigned long cbHSym;
|
unsigned int cbHSym;
|
||||||
unsigned long cbHAddr;
|
unsigned int cbHAddr;
|
||||||
} OMFSymHash;
|
} OMFSymHash;
|
||||||
|
|
||||||
/* sstSegMap section */
|
/* sstSegMap section */
|
||||||
|
@ -2692,8 +2692,8 @@ typedef struct OMFSegMapDesc
|
||||||
unsigned short frame;
|
unsigned short frame;
|
||||||
unsigned short iSegName;
|
unsigned short iSegName;
|
||||||
unsigned short iClassName;
|
unsigned short iClassName;
|
||||||
unsigned long offset;
|
unsigned int offset;
|
||||||
unsigned long cbSeg;
|
unsigned int cbSeg;
|
||||||
} OMFSegMapDesc;
|
} OMFSegMapDesc;
|
||||||
|
|
||||||
typedef struct OMFSegMap
|
typedef struct OMFSegMap
|
||||||
|
@ -2710,7 +2710,7 @@ typedef struct OMFSourceLine
|
||||||
{
|
{
|
||||||
unsigned short Seg;
|
unsigned short Seg;
|
||||||
unsigned short cLnOff;
|
unsigned short cLnOff;
|
||||||
unsigned long offset[1];
|
unsigned int offset[1];
|
||||||
unsigned short lineNbr[1];
|
unsigned short lineNbr[1];
|
||||||
} OMFSourceLine;
|
} OMFSourceLine;
|
||||||
|
|
||||||
|
@ -2718,7 +2718,7 @@ typedef struct OMFSourceFile
|
||||||
{
|
{
|
||||||
unsigned short cSeg;
|
unsigned short cSeg;
|
||||||
unsigned short reserved;
|
unsigned short reserved;
|
||||||
unsigned long baseSrcLn[1];
|
unsigned int baseSrcLn[1];
|
||||||
unsigned short cFName;
|
unsigned short cFName;
|
||||||
char Name;
|
char Name;
|
||||||
} OMFSourceFile;
|
} OMFSourceFile;
|
||||||
|
@ -2727,5 +2727,5 @@ typedef struct OMFSourceModule
|
||||||
{
|
{
|
||||||
unsigned short cFile;
|
unsigned short cFile;
|
||||||
unsigned short cSeg;
|
unsigned short cSeg;
|
||||||
unsigned long baseSrcFile[1];
|
unsigned int baseSrcFile[1];
|
||||||
} OMFSourceModule;
|
} OMFSourceModule;
|
||||||
|
|
|
@ -211,8 +211,8 @@ static BOOL dump_cv_sst_seg_map(const OMFDirEntry* omfde)
|
||||||
printf(" frame: %u\n", segMapDesc[i].frame);
|
printf(" frame: %u\n", segMapDesc[i].frame);
|
||||||
printf(" iSegName: %u\n", segMapDesc[i].iSegName);
|
printf(" iSegName: %u\n", segMapDesc[i].iSegName);
|
||||||
printf(" iClassName: %u\n", segMapDesc[i].iClassName);
|
printf(" iClassName: %u\n", segMapDesc[i].iClassName);
|
||||||
printf(" offset: %lu\n", segMapDesc[i].offset);
|
printf(" offset: %u\n", segMapDesc[i].offset);
|
||||||
printf(" cbSeg: %lu\n", segMapDesc[i].cbSeg);
|
printf(" cbSeg: %u\n", segMapDesc[i].cbSeg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -244,7 +244,7 @@ static BOOL dump_cv_sst_src_module(const OMFDirEntry* omfde)
|
||||||
sourceModule->cFile, sourceModule->cSeg);
|
sourceModule->cFile, sourceModule->cSeg);
|
||||||
for (i = 0; i < sourceModule->cFile; i++)
|
for (i = 0; i < sourceModule->cFile; i++)
|
||||||
{
|
{
|
||||||
printf (" File #%2d begins at an offset of 0x%lx in this section\n",
|
printf (" File #%2d begins at an offset of 0x%x in this section\n",
|
||||||
i + 1, sourceModule->baseSrcFile[i]);
|
i + 1, sourceModule->baseSrcFile[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ static BOOL dump_cv_sst_src_module(const OMFDirEntry* omfde)
|
||||||
|
|
||||||
for (i = 0; i < sourceFile->cSeg; i++)
|
for (i = 0; i < sourceFile->cSeg; i++)
|
||||||
{
|
{
|
||||||
printf (" Segment #%2d start = 0x%lx, end = 0x%lx, offset = 0x%lx\n",
|
printf (" Segment #%2d start = 0x%lx, end = 0x%lx, offset = 0x%x\n",
|
||||||
i + 1, seg_info_dw[i * 2], seg_info_dw[(i * 2) + 1], sourceFile->baseSrcLn[i]);
|
i + 1, seg_info_dw[i * 2], seg_info_dw[(i * 2) + 1], sourceFile->baseSrcLn[i]);
|
||||||
}
|
}
|
||||||
/* add file name length */
|
/* add file name length */
|
||||||
|
@ -402,7 +402,7 @@ static void dump_codeview_headers(unsigned long base, unsigned long len)
|
||||||
const CODEVIEW_PDB_DATA* pdb_data;
|
const CODEVIEW_PDB_DATA* pdb_data;
|
||||||
pdb_data = cv_base;
|
pdb_data = cv_base;
|
||||||
|
|
||||||
printf(" Filepos: 0x%08lX\n", pdb_data->filepos);
|
printf(" Filepos: 0x%08X\n", pdb_data->filepos);
|
||||||
printf(" TimeStamp: %08X (%s)\n",
|
printf(" TimeStamp: %08X (%s)\n",
|
||||||
pdb_data->timestamp, get_time_str(pdb_data->timestamp));
|
pdb_data->timestamp, get_time_str(pdb_data->timestamp));
|
||||||
printf(" Age: %08X\n", pdb_data->age);
|
printf(" Age: %08X\n", pdb_data->age);
|
||||||
|
@ -428,7 +428,7 @@ static void dump_codeview_headers(unsigned long base, unsigned long len)
|
||||||
|
|
||||||
sig = cv_base;
|
sig = cv_base;
|
||||||
|
|
||||||
printf(" Filepos: 0x%08lX\n", sig->filepos);
|
printf(" Filepos: 0x%08X\n", sig->filepos);
|
||||||
|
|
||||||
dirHeader = PRD(Offset(cv_base) + sig->filepos, sizeof(OMFDirHeader));
|
dirHeader = PRD(Offset(cv_base) + sig->filepos, sizeof(OMFDirHeader));
|
||||||
if (!dirHeader) {printf("Can't get debug header, aborting\n"); return;}
|
if (!dirHeader) {printf("Can't get debug header, aborting\n"); return;}
|
||||||
|
|
Loading…
Reference in New Issue