[lldb][COFF] Rewrite ParseSymtab to list both export and symbol tables
This reimplements `ObjectFilePECOFF::ParseSymtab` to replace the manual data extraction with what `COFFObjectFile` already provides. Also use `SymTab::AddSymbol` instead of resizing the SymTab then assigning each elements afterwards. Previously, ParseSymTab loads symbols from both the COFF symbol table and the export table, but if there are any entries in the export table, it overwrites all the symbols already loaded from the COFF symbol table. Due to the change to use AddSymbols, this no longer happens, and so the SymTab now contains all symbols from both tables as expected. The export symbols are now ordered by ordinal, instead of by the name table order. In its current state, it is possible for symbols in the COFF symbol table to be duplicated by those in the export table. This behaviour will be modified in a separate change. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D134196
Loading
Please sign in to comment