[PATCH] [DWARF] Fix a bug in line info handling

Alexey Samsonov vonosmas at gmail.com
Fri May 22 15:48:53 PDT 2015


I don't know about the data needed for llvm-rtdyld, so can't comment about the changes to `test/DebugInfo/debuglineinfo.test`. Otherwise, the patch now looks fine to me (modulo comments below).


REPOSITORY
  rL LLVM

================
Comment at: include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:208
@@ +207,3 @@
+  private:
+    const uint32_t UnknownRowIndex = UINT32_MAX;
+    uint32_t findRowInSeq(const DWARFDebugLine::Sequence &seq, uint64_t address) const;
----------------
Fix a comment about `lookupAddress` return value to mention this. Also, `lookupAddress` should probably be private, the public interface is `getFileLineInfoForAddress`. Looks like `LineTable` is now a class, not a struct.

================
Comment at: lib/DebugInfo/DWARF/DWARFDebugLine.cpp:538
@@ +537,3 @@
+  LineTable::RowIter row_pos = std::lower_bound(first_row, last_row, row,
+    DWARFDebugLine::Row::orderByAddress);
+  if (row_pos == last_row) {
----------------
Run patch through clang-format

================
Comment at: lib/DebugInfo/DWARF/DWARFDebugLine.cpp:601
@@ -595,2 +600,3 @@
   while (seq_pos != last_seq && seq_pos->LowPC < end_addr) {
     DWARFDebugLine::Sequence cur_seq = *seq_pos;
+    // For the first sequence, we need to find which row in the sequence is the
----------------
Hm, should this be a const reference instead?

http://reviews.llvm.org/D9925

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list