<div dir="ltr">Ping</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 19, 2019 at 9:40 AM David Blaikie via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">dblaikie added inline comments.<br>
<br>
<br>
================<br>
Comment at: llvm/trunk/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp:141-148<br>
+  uint32_t TuListSize = (AddressAreaOffset - TuListOffset) / 24;<br>
   TuList.resize(TuListSize);<br>
   for (uint32_t I = 0; I < TuListSize; ++I) {<br>
     uint64_t CuOffset = Data.getU64(&Offset);<br>
     uint64_t TypeOffset = Data.getU64(&Offset);<br>
     uint64_t Signature = Data.getU64(&Offset);<br>
     TuList[I] = {CuOffset, TypeOffset, Signature};<br>
----------------<br>
Is this loop still untested (since all the test cases have TuListSize of zero - so the body of this loop could be incorrect & no test would diagnose it? (eg: if you put "assert(false)" in the loop, does it fire?)<br>
<br>
For test cases of this feature, you could either construct one by hand writing assembly - or it's possible (& probably better to check the format agrees with gdb) by using gdb to generate the index: <a href="https://www-zeuthen.desy.de/unix/unixguide/infohtml/gdb/Index-Files.html" rel="noreferrer" target="_blank">https://www-zeuthen.desy.de/unix/unixguide/infohtml/gdb/Index-Files.html</a> <br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D63537/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D63537/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D63537" rel="noreferrer" target="_blank">https://reviews.llvm.org/D63537</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>