To answer your question, PE/COFF executable symbol tables are basically empty<br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 22, 2018 at 10:44 AM Greg Clayton via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">clayborg requested changes to this revision.<br>
clayborg added a comment.<br>
This revision now requires changes to proceed.<br>
<br>
All symbol tables are currently extracted from the object files via ObjectFile::GetSymtab(). Are symbols only in the PDB file? If so I would vote to add a "virtual void SymbolVendor::AddSymbols(Symtab *symtab)" and a "virtual void SymbolFile::AddSymbols(Symtab *symtab)" where we take the symbol table that comes from the object file and we can add symbols to it if the symbol file has symbols it wants to add to the object file's symbol table. All symbol queries go through the lldb_private::Symtab class anyway. Care must be taken to watch out for symbols that might already exist from an ObjectFile's symbol table to ensure don't have duplicates.<br>
<br>
So I would:<br>
<br>
- Add "virtual void SymbolVendor::AddSymbols(Symtab *symtab);" to SymbolVendor that just calls through to its SymbolFile to do the work<br>
- Add "virtual void SymbolFile::AddSymbols(Symtab *symtab)" to SymbolFile with default implementation that does nothing<br>
- Override SymbolFile::AddSymbols() for SymbolFilePDB and add symbols to the provided symbol table<br>
- Modify *SymbolVendor::GetSymtab()" to get the object file symbol table, then pass that along to any symbol file instances it owns to allow each symbol file to augment the symbol table<br>
- Remove all "FindPublicSymbols()" code from patch<br>
- Revert all symbol searching code to just use the Symtab class now that it contains all needed symbols<br>
<br>
<br>
Repository:<br>
rLLDB LLDB<br>
<br>
<a href="https://reviews.llvm.org/D53368" rel="noreferrer" target="_blank">https://reviews.llvm.org/D53368</a><br>
<br>
<br>
<br>
</blockquote></div>