Alexandre Julliard : winedump: Fix printing of module sources in PDB files.

Alexandre Julliard julliard at winehq.org
Tue Jan 11 10:08:30 CST 2011


Module: wine
Branch: master
Commit: 51dd5c2ebbafb0f6c5bce0df5a3b693f533f1014
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=51dd5c2ebbafb0f6c5bce0df5a3b693f533f1014

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jan 11 14:18:35 2011 +0100

winedump: Fix printing of module sources in PDB files.

---

 tools/winedump/pdb.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c
index 89146d5..3cc8882 100644
--- a/tools/winedump/pdb.c
+++ b/tools/winedump/pdb.c
@@ -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");
             }




More information about the wine-cvs mailing list