Home | History | Annotate | Download | only in DWARF
      1 //===-- DWARFDebugRanges.h --------------------------------------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 #ifndef SymbolFileDWARF_DWARFDebugRanges_h_
     11 #define SymbolFileDWARF_DWARFDebugRanges_h_
     12 
     13 #include "SymbolFileDWARF.h"
     14 
     15 #include <map>
     16 #include <vector>
     17 
     18 #include "lldb/Core/RangeMap.h"
     19 
     20 class DWARFDebugRanges
     21 {
     22 public:
     23     typedef lldb_private::RangeArray<dw_addr_t, dw_addr_t, 2> RangeList;
     24     typedef RangeList::Entry Range;
     25 
     26     DWARFDebugRanges();
     27     ~DWARFDebugRanges();
     28     void Extract(SymbolFileDWARF* dwarf2Data);
     29     static void Dump(lldb_private::Stream &s, const lldb_private::DataExtractor& debug_ranges_data, lldb::offset_t *offset_ptr, dw_addr_t cu_base_addr);
     30     bool FindRanges(dw_offset_t debug_ranges_offset, DWARFDebugRanges::RangeList& range_list) const;
     31 
     32 protected:
     33 
     34     bool
     35     Extract (SymbolFileDWARF* dwarf2Data,
     36              lldb::offset_t *offset_ptr,
     37              RangeList &range_list);
     38 
     39     typedef std::map<dw_offset_t, RangeList>    range_map;
     40     typedef range_map::iterator                 range_map_iterator;
     41     typedef range_map::const_iterator           range_map_const_iterator;
     42     range_map m_range_map;
     43 };
     44 
     45 
     46 #endif  // SymbolFileDWARF_DWARFDebugRanges_h_
     47