[Lldb-commits] [PATCH] D47708: PDB support of function-level linking and splitted functions
Aleksandr Urakov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 4 05:26:01 PDT 2018
aleksandr.urakov created this revision.
aleksandr.urakov added reviewers: asmith, zturner.
Herald added a subscriber: mgorny.
The patch adds support of splitted functions (when MSVC is used with PGO) and function-level linking feature.
SymbolFilePDB::ParseCompileUnitLineTable function relies on fact that ranges of compiled source files in the binary are continuous and don't intersect each other. The function creates LineSequence for each file and inserts it into LineTable, and implementation of last one relies on continuity of the sequence. But it's not always true when function-level linking enabled, e.g. in added input test file test-pdb-function-level-linking.exe there is xstring's std__basic_string_char_std__char_traits_char__std__allocator_char_____max_size (.00454820) between test-pdb-function-level-linking.cpp's foo (.00454770) and main (.004548F0).
To fix the problem this patch renews the sequence on each address gap.
https://reviews.llvm.org/D47708
Files:
source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
unittests/SymbolFile/PDB/CMakeLists.txt
unittests/SymbolFile/PDB/Inputs/test-pdb-function-level-linking.cpp
unittests/SymbolFile/PDB/Inputs/test-pdb-function-level-linking.exe
unittests/SymbolFile/PDB/Inputs/test-pdb-function-level-linking.pdb
unittests/SymbolFile/PDB/Inputs/test-pdb-splitted-function.cpp
unittests/SymbolFile/PDB/Inputs/test-pdb-splitted-function.exe
unittests/SymbolFile/PDB/Inputs/test-pdb-splitted-function.pdb
unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47708.149727.patch
Type: text/x-patch
Size: 5252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180604/8b51c3fc/attachment.bin>
More information about the lldb-commits
mailing list