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

winedump: Dump PDB public symbols' stream.

Add relevant structures to include/mscvpdb.h. Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
parent 805ffc8a
......@@ -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"
/* ===================================================
......
......@@ -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)
......
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