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

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu May 31 10:24:41 PDT 2018



> On May 31, 2018, at 2:31 AM, Aleksandr Urakov via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> Hello!
> 
> 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 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). 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.

That is what DWARF does as well. A line table can have many sequences where each sequence is a vector of rows whose addresses must always increase or stay the same. The line tables we have in LLDB mimic the DWARF line tables in many ways.


> 
> The link to the patch and related files is: https://drive.google.com/open?id=1ozp06jyqugjLGT-6wuJKS1UhRuXFsixf <https://drive.google.com/open?id=1ozp06jyqugjLGT-6wuJKS1UhRuXFsixf>
> 
> Thanks!
> 
> -- 
> Aleksandr Urakov
> Software Developer
> JetBrains
> http://www.jetbrains.com <http://www.jetbrains.com/>
> The Drive to Develop
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180531/cd316e98/attachment.html>


More information about the lldb-commits mailing list