<div dir="ltr"><div><div><div>Hello!</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>To fix the problem we propose to renew the sequence on each address gap. The patch and related files are attached.</div><div><br></div><div>Thanks!</div></div></div><div><br></div>-- <br><div class="gmail-m_-8394111604550008890m_712221766518661704m_-7139292742569272666gmail_signature"><div dir="ltr"><div>Aleksandr Urakov</div><div><span>Software Developer</span></div><div><span>JetBrains</span></div><div><span><a href="http://www.jetbrains.com" target="_blank">http://www.jetbrains.com</a></span></div><div><span>The Drive to Develop</span></div></div></div>
</div>