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

Alexey Samsonov vonosmas at gmail.com
Thu May 21 16:59:55 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/DebugInfo/DWARF/DWARFDebugLine.cpp:608
@@ -607,3 +607,3 @@
       RowIter row_pos = std::upper_bound(first_row, last_row, row,
-                                         DWARFDebugLine::Row::orderByAddress);
+                                         DWARFDebugLine::Row::orderByAddressLeq);
       // The 'row_pos' iterator references the first row that is greater than
----------------
I don't understand this part. Looks like row_pos should be the first row that contains "address". It means that the lookup here should be similar to the one done in `lookupAddress` function (of course, I'd prefer this code to be shared).

================
Comment at: lib/DebugInfo/DWARF/DWARFDebugLine.cpp:628
@@ -629,2 +627,3 @@
+      // looking up.
       last_row_index = cur_seq.FirstRowIndex + (row_pos - first_row) - 1;
     } else
----------------
Can you simply find the number of row that describes the address "end_addr - 1"?

http://reviews.llvm.org/D9925

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






More information about the llvm-commits mailing list