[Lldb-commits] Support of MSVC function-level linking

Aleksandr Urakov via lldb-commits lldb-commits at lists.llvm.org
Thu May 31 02:31:07 PDT 2018


I'm Aleksandr from JetBrains. We are working on improving support of
MSVC-compiled binaries in lldb. We have made several fixes and would like
to upstream them.

The first patch adds support of function-level linking feature. The
SymbolFilePDB::ParseCompileUnitLineTable function relies on the fact that
ranges of compiled source files in the binary are continuous and don't
intersect with each other. ParseCompileUnitLineTable creates LineSequence
for each file and inserts it into LineTable, and the implementation of
LineTable relies on continuity of the sequence. But it's not always true
when function-level linking is enabled, e.g. in the attached input test
file test-pdb-function-level-linking.exe there is xstring's
(.00454820) between test-pdb-function-level-linking.cpp's foo (.00454770)
and main (.004548F0). The source is compiled with Microsoft C/C++ compiler
version 19.14.26429.4 for x86.

To fix the problem we propose to renew the sequence on each address gap.

The link to the patch and related files is:


Aleksandr Urakov
Software Developer
The Drive to Develop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180531/3b5da912/attachment.html>

More information about the lldb-commits mailing list