This patch adds a PDB::module_info function to get the module info stream
for a specific module, a new ModuleInfo struct to hold that stream's data,
and a ModuleInfo::symbols function to get a SymbolIter to iterate over
the module's private symbols.
It was also necessary to change SymbolIter::next to accept symbols that are
exactly 2 bytes in length, since there are symbols like that in the in-tree
test PDB (S_END, among others).
The pdb_symbols example was also changed to iterate over and print module
private symbols, although that's less useful than one might think because
Symbol::parse doesn't support the full set of symbol records that show
up there.
The module information stream also contains line info, so adding support for
that on top of this change should be straightforward.
I tried to add useful doc comments and examples, hopefully I followed the project conventions well enough!
This patch adds a
PDB::module_info
function to get the module info stream for a specific module, a newModuleInfo
struct to hold that stream's data, and aModuleInfo::symbols
function to get aSymbolIter
to iterate over the module's private symbols.It was also necessary to change
SymbolIter::next
to accept symbols that are exactly 2 bytes in length, since there are symbols like that in the in-tree test PDB (S_END, among others).The pdb_symbols example was also changed to iterate over and print module private symbols, although that's less useful than one might think because
Symbol::parse
doesn't support the full set of symbol records that show up there.The module information stream also contains line info, so adding support for that on top of this change should be straightforward.
I tried to add useful doc comments and examples, hopefully I followed the project conventions well enough!