[Lldb-commits] [PATCH] D53368: [Symbol] Search symbols with name and type in a symbol file

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 22 12:39:55 PDT 2018


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 <
reviews at 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181022/5beb66ec/attachment-0001.html>


More information about the lldb-commits mailing list