[PATCH] D44811: DWARF] DWARF v5: .debug_rnglists: adding support for DW_RLE_offset_pair and DW_RLE_base_address

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 22 16:41:40 PDT 2018


dblaikie added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp:134
+                           *OffsetPtr - 1);
+      uint64_t Base = Data.getAddress(OffsetPtr);
+      CurrentRanges.push_back(RangeListEntry{EntryOffset, Encoding, Base, 0});
----------------
Some of our range dumping can now print which section an address refers to - should we do that for this range dumping? If so, we'd need to extract the section info here, I think?


================
Comment at: lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp:213-233
   case dwarf::DW_RLE_start_length:
+  case dwarf::DW_RLE_offset_pair: {
     if (DumpOpts.Verbose) {
       // Make the address range display its contents in raw form rather than
       // as an interval (i.e. without brackets).
       DumpOpts.DisplayRawContents = true;
       DWARFAddressRange(Entry.Value0, Entry.Value1)
----------------
Rather than grouping these under the same switch, then using a conditional - might it be worth having separate cases? The common verbose part could be factored into a local lambda, maybe?


https://reviews.llvm.org/D44811





More information about the llvm-commits mailing list