From: Eric Pouech eric.pouech@gmail.com
Adding relevant structures to include/mscvpdb.h
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- include/wine/mscvpdb.h | 15 +++++++++++++++ tools/winedump/pdb.c | 23 ++++++++++++++++------- 2 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 96511b759b1..90adc3ee465 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -2649,6 +2649,21 @@ typedef struct #define DBI_MAX_HASH 4096 #define DBI_BITMAP_HASH_SIZE ((DBI_MAX_HASH / (8 * sizeof(unsigned)) + 1) * sizeof(unsigned))
+/* Header for public stream (from DBI / SYMBOLS stream) + * Followed by a hash table (cf DBI_HASH_HEADER and the following bits) + */ +typedef struct +{ + unsigned hash_size; + unsigned address_map_size; + unsigned num_thunks; + unsigned size_thunk; + unsigned short section_thunk_table; + unsigned short _pad0; + unsigned offset_thunk_table; + unsigned num_sects; +} DBI_PUBLIC_HEADER; + #include "poppack.h"
/* =================================================== diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c index efedda2d6d4..ab844fd8555 100644 --- a/tools/winedump/pdb.c +++ b/tools/winedump/pdb.c @@ -306,17 +306,26 @@ static void dump_global_symbol(struct pdb_reader* reader, unsigned file)
static void dump_public_symbol(struct pdb_reader* reader, unsigned file) { - void* public = NULL; - DWORD size; + unsigned size; + DBI_PUBLIC_HEADER* hdr;
- public = reader->read_file(reader, file); - if (!public) return; + hdr = reader->read_file(reader, file); + if (!hdr) return;
size = pdb_get_file_size(reader, file);
- printf("Public symbols table:\n"); - dump_data(public, size, "\t"); - free(public); + printf("Public symbols table: (%u)\n", size); + + printf("\tHash size: %u\n", hdr->hash_size); + printf("\tAddress map size: %u\n", hdr->address_map_size); + printf("\tNumber of thunks: %u\n", hdr->num_thunks); + printf("\tSize of thunk: %u\n", hdr->size_thunk); + printf("\tSection of thunk table: %u\n", hdr->section_thunk_table); + printf("\tOffset of thunk table: %u\n", hdr->offset_thunk_table); + printf("\tNumber of sections: %u\n", hdr->num_sects); + + dump_dbi_hash_table((const BYTE*)(hdr + 1), hdr->hash_size, "Public", "\t"); + free(hdr); }
static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx)