clayborg added inline comments.

================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:425
   const DWARFDebugInfoEntry *die = GetUnitDIEPtrOnly();
 
   const dw_offset_t cu_offset = GetOffset();
----------------
Following from inline comment below, you can abort if this CU is empty:

```
// If this DWARF unit has no children, we have no address ranges to add. If
// something is built with line tables only, there will still be function DIEs 
with
// address ranges as children.
if (!die->HasChildren())
  return;
```


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:439
+        die->GetAttributeAddressRanges(dwarf, this, ranges, check_hi_lo_pc);
+
     if (num_ranges > 0) {
----------------
Empty CUs won't have any children. Easy to skip by getting the CU die and doing:
```
if (!die->HasChildren())
```



================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:488-489
         }
-      } else
-        debug_map_sym_file->AddOSOARanges(dwarf, debug_aranges);
+      } //else
+        //debug_map_sym_file->AddOSOARanges(dwarf, debug_aranges);
     }
----------------
revert if the "if (!die->hasChildren())" trick works.


https://reviews.llvm.org/D52375



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to