winedump: Fix printing of module sources in PDB files.

This commit is contained in:
Alexandre Julliard 2011-01-11 14:18:35 +01:00
parent 3658b84509
commit 51dd5c2ebb
1 changed files with 5 additions and 5 deletions

View File

@ -273,13 +273,13 @@ static void pdb_dump_symbols(struct pdb_reader* reader)
for (i = cfile = 0; i < src->nModules; i++)
{
printf("\t\tModule[%2d]:\n", i);
for (j = 0; j < indx[i]; j++, cfile++)
cfile = src->table[i];
for (j = cfile; j < src->nSrcFiles && j < cfile + indx[i]; j++)
{
/* FIXME: in some cases, it's a p_string but WHEN ? */
if (src->table[cfile] < src->nSrcFiles &&
cstr + offset[src->table[cfile]] >= (const char*)start_cstr /* wrap around */ &&
cstr + offset[src->table[cfile]] < (const char*)src + symbols->srcmodule_size)
printf("\t\t\tSource file: %s\n", cstr + offset[src->table[cfile]]);
if (cstr + offset[j] >= (const char*)start_cstr /* wrap around */ &&
cstr + offset[j] < (const char*)src + symbols->srcmodule_size)
printf("\t\t\tSource file: %s\n", cstr + offset[j]);
else
printf("\t\t\tSource file: <<out of bounds>>\n");
}