To answer your question, PE/COFF executable symbol tables are basically empty On Mon, Oct 22, 2018 at 10:44 AM Greg Clayton via Phabricator < revi...@reviews.llvm.org> wrote:
> clayborg requested changes to this revision. > clayborg added a comment. > This revision now requires changes to proceed. > > 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. > > So I would: > > - Add "virtual void SymbolVendor::AddSymbols(Symtab *symtab);" to > SymbolVendor that just calls through to its SymbolFile to do the work > - Add "virtual void SymbolFile::AddSymbols(Symtab *symtab)" to SymbolFile > with default implementation that does nothing > - Override SymbolFile::AddSymbols() for SymbolFilePDB and add symbols to > the provided symbol table > - 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 > - Remove all "FindPublicSymbols()" code from patch > - Revert all symbol searching code to just use the Symtab class now that > it contains all needed symbols > > > Repository: > rLLDB LLDB > > https://reviews.llvm.org/D53368 > > > >
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits