[PATCH] D53364: [llvm-dwarfdump] - Add the support of parsing .debug_loclists.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 11:58:34 PDT 2018


grimar added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:222-226
+    case dwarf::DW_LLE_startx_length:
+      OS << '\n';
+      OS.indent(Indent);
+      OS << "Addr idx " << E.Value0 << " (w/ length " << E.Value1 << "): ";
+      break;
----------------
dblaikie wrote:
> This should lookup Value0 in the address pool, probably? I think I have that implemented for rnglists in my prototype/work-in-progress work there. (nothing I've sent out yet, but should be soon)
Probably. That is also was the original code.


================
Comment at: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:161
+      E.Value0 = Data.getULEB128(Offset);
+      E.Value1 = Data.getU32(Offset);
+      break;
----------------
dblaikie wrote:
> Looks like this should probably be a ULEB128 too, according to DWARF5?
> 
> (2.6.2 Location Lists - DW_LLE_startx_length: "This is a form of bounded location description that has two unsigned ULEB operands. The first value is an address index (into the .debug_addr section) that indicates the beginning of the address range over which the location is valid. The second value is the length of the range. ")
Yes, it was in my to-do list. That is the original code. I had no chance to prepare the test case + patch to fix it yet.


Repository:
  rL LLVM

https://reviews.llvm.org/D53364





More information about the llvm-commits mailing list