diff options
Diffstat (limited to 'source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp')
| -rw-r--r-- | source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | 20 | 
1 files changed, 8 insertions, 12 deletions
| diff --git a/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp index 2f55b7d40ed9..8c0fbeb4b717 100644 --- a/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ b/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -192,7 +192,7 @@ bool DWARFDebugInfoEntry::Extract(const DWARFDataExtractor &data,      *offset_ptr = offset;      return true;    } else { -    m_tag = 0; +    m_tag = llvm::dwarf::DW_TAG_null;      m_has_children = false;      return true; // NULL debug tag entry    } @@ -340,18 +340,14 @@ bool DWARFDebugInfoEntry::GetDIENamesAndRanges(                uint32_t block_offset =                    form_value.BlockData() - data.GetDataStart();                uint32_t block_length = form_value.Unsigned(); -              *frame_base = DWARFExpression(module, data, cu, -                                            block_offset, block_length); +              *frame_base = DWARFExpression( +                  module, DataExtractor(data, block_offset, block_length), cu);              } else { -              const DWARFDataExtractor &debug_loc_data = dwarf.DebugLocData(); -              const dw_offset_t debug_loc_offset = form_value.Unsigned(); - -              size_t loc_list_length = DWARFExpression::LocationListSize( -                  cu, debug_loc_data, debug_loc_offset); -              if (loc_list_length > 0) { -                *frame_base = -                    DWARFExpression(module, debug_loc_data, cu, -                                    debug_loc_offset, loc_list_length); +              DataExtractor data = dwarf.DebugLocData(); +              const dw_offset_t offset = form_value.Unsigned(); +              if (data.ValidOffset(offset)) { +                data = DataExtractor(data, offset, data.GetByteSize() - offset); +                *frame_base = DWARFExpression(module, data, cu);                  if (lo_pc != LLDB_INVALID_ADDRESS) {                    assert(lo_pc >= cu->GetBaseAddress());                    frame_base->SetLocationListSlide(lo_pc - | 
