1254721Semaste//===-- DWARFDebugRanges.h --------------------------------------*- C++ -*-===//
2254721Semaste//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6254721Semaste//
7254721Semaste//===----------------------------------------------------------------------===//
8254721Semaste
9254721Semaste#ifndef SymbolFileDWARF_DWARFDebugRanges_h_
10254721Semaste#define SymbolFileDWARF_DWARFDebugRanges_h_
11254721Semaste
12353358Sdim#include "lldb/Core/dwarf.h"
13254721Semaste#include <map>
14254721Semaste
15353358Sdimclass DWARFUnit;
16353358Sdimnamespace lldb_private {
17353358Sdimclass DWARFContext;
18353358Sdim}
19353358Sdim
20360784Sdimclass DWARFDebugRanges {
21254721Semastepublic:
22314564Sdim  DWARFDebugRanges();
23344779Sdim
24360784Sdim  void Extract(lldb_private::DWARFContext &context);
25344779Sdim  bool FindRanges(const DWARFUnit *cu, dw_offset_t debug_ranges_offset,
26360784Sdim                  DWARFRangeList &range_list) const;
27344779Sdim
28314564Sdim  static void Dump(lldb_private::Stream &s,
29314564Sdim                   const lldb_private::DWARFDataExtractor &debug_ranges_data,
30314564Sdim                   lldb::offset_t *offset_ptr, dw_addr_t cu_base_addr);
31254721Semaste
32254721Semasteprotected:
33353358Sdim  bool Extract(lldb_private::DWARFContext &context, lldb::offset_t *offset_ptr,
34314564Sdim               DWARFRangeList &range_list);
35254721Semaste
36314564Sdim  typedef std::map<dw_offset_t, DWARFRangeList> range_map;
37314564Sdim  typedef range_map::iterator range_map_iterator;
38314564Sdim  typedef range_map::const_iterator range_map_const_iterator;
39314564Sdim  range_map m_range_map;
40254721Semaste};
41254721Semaste
42314564Sdim#endif // SymbolFileDWARF_DWARFDebugRanges_h_
43