[Lldb-commits] [PATCH] D53929: [LLDB] - Add support for DW_FORM_rnglistx and relative DW_RLE_* entries.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 31 12:57:23 PDT 2018


clayborg added a comment.

Just one question about extracting the value for DW_AT_ranges. It would be nice if we just took care of extracting the value so the form value was more useful



================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:1072-1079
+  if (at_ranges_val != DW_INVALID_OFFSET) {
+    if (DWARFDebugRangesBase *debug_ranges = dwarf2Data->DebugRanges()) {
+
+      dw_offset_t debug_ranges_offset;
+      if (form_value.Form() == DW_FORM_rnglistx)
+        debug_ranges_offset = debug_ranges->GetOffset(at_ranges_val);
+      else
----------------
Can/should we do all this work when we extract the form value so that "form_value.Unsigned()" just returns the right thing? If not, every place that gets DW_AT_ranges attribute would need to do this.


https://reviews.llvm.org/D53929





More information about the lldb-commits mailing list