mirror of
https://github.com/intel/llvm.git
synced 2026-02-04 03:26:06 +08:00
This PR implements `SymbolFileNativePDB::AddSymbols` which adds public
symbols to the symbol table.
These symbols are found in the publics stream. It contains mangled names
coupled with addresses. Addresses are a pair of (segment, offset).
If I understood correctly, then the segment is the section ID from the
COFF header. Sections are already
[constructed](c48ec7fb60/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (L1048))
using this 1-based index ([MS
docs](https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-table-section-headers)).
This allows us to use `section_list->FindSectionByID`.