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

winedump: Pass start offset when dumping symbols.

parent f1e0753c
......@@ -135,7 +135,7 @@ static BOOL dump_cv_sst_global_pub(const OMFDirEntry* omfde)
symbols = PRD(fileoffset + sizeof(OMFSymHash), header->cbSymbol);
if (!symbols) {printf("Can't OMF-SymHash details, aborting\n"); return FALSE;}
codeview_dump_symbols(symbols, header->cbSymbol);
codeview_dump_symbols(symbols, 0, header->cbSymbol);
return TRUE;
}
......@@ -320,7 +320,7 @@ static BOOL dump_cv_sst_align_sym(const OMFDirEntry* omfde)
if (!rawdata) {printf("Can't get srcAlignSym subsection details, aborting\n");return FALSE;}
if (omfde->cb < sizeof(DWORD)) return TRUE;
codeview_dump_symbols(rawdata + sizeof(DWORD), omfde->cb - sizeof(DWORD));
codeview_dump_symbols(rawdata, sizeof(DWORD), omfde->cb);
return TRUE;
}
......
......@@ -97,7 +97,7 @@ static void dump_long_import(const void *base, const IMAGE_SECTION_HEADER *ish,
{
const char *imp_debugS = (const char *)base + ish[i].PointerToRawData;
codeview_dump_symbols(imp_debugS, ish[i].SizeOfRawData);
codeview_dump_symbols(imp_debugS, 0, ish[i].SizeOfRawData);
printf("\n");
}
}
......
......@@ -1303,7 +1303,7 @@ static void dump_binannot(const unsigned char* ba, const char* last, const char*
}
}
BOOL codeview_dump_symbols(const void* root, unsigned long size)
BOOL codeview_dump_symbols(const void* root, unsigned long start, unsigned long size)
{
unsigned int i;
int length;
......@@ -1313,12 +1313,12 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
* Loop over the different types of records and whenever we
* find something we are interested in, record it and move on.
*/
for (i = 0; i < size; i += length)
for (i = start; i < size; i += length)
{
const union codeview_symbol* sym = (const union codeview_symbol*)((const char*)root + i);
length = sym->generic.len + 2;
if (!sym->generic.id || length < 4) break;
printf("\t%04x => ", i + 4); /* ref is made after id and len */
printf("\t%04x => ", i);
switch (sym->generic.id)
{
......
......@@ -473,7 +473,7 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
if (modimage)
{
printf("\t------------globals-------------\n");
codeview_dump_symbols(modimage, pdb_get_file_size(reader, symbols->gsym_file));
codeview_dump_symbols(modimage, 0, pdb_get_file_size(reader, symbols->gsym_file));
free(modimage);
}
......@@ -588,7 +588,7 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
int total_size = pdb_get_file_size(reader, file_nr);
if (symbol_size)
codeview_dump_symbols((const char*)modimage + sizeof(DWORD), symbol_size);
codeview_dump_symbols((const char*)modimage, sizeof(DWORD), symbol_size);
/* line number info */
if (lineno_size)
......
......@@ -259,7 +259,7 @@ void tlb_dump(void);
enum FileSig get_kind_nls(void);
void nls_dump(void);
BOOL codeview_dump_symbols(const void* root, unsigned long size);
BOOL codeview_dump_symbols(const void* root, unsigned long start, unsigned long size);
BOOL codeview_dump_types_from_offsets(const void* table, const DWORD* offsets, unsigned num_types);
BOOL codeview_dump_types_from_block(const void* table, unsigned long len);
void codeview_dump_linetab(const char* linetab, BOOL pascal_str, const char* pfx);
......
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