1061da546Spatrick //===-- DWARFDebugRanges.h --------------------------------------*- C++ -*-===// 2061da546Spatrick // 3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information. 5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6061da546Spatrick // 7061da546Spatrick //===----------------------------------------------------------------------===// 8061da546Spatrick 9*dda28197Spatrick #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGRANGES_H 10*dda28197Spatrick #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGRANGES_H 11061da546Spatrick 12061da546Spatrick #include "lldb/Core/dwarf.h" 13061da546Spatrick #include <map> 14061da546Spatrick 15061da546Spatrick class DWARFUnit; 16061da546Spatrick namespace lldb_private { 17061da546Spatrick class DWARFContext; 18061da546Spatrick } 19061da546Spatrick 20061da546Spatrick class DWARFDebugRanges { 21061da546Spatrick public: 22061da546Spatrick DWARFDebugRanges(); 23061da546Spatrick 24061da546Spatrick void Extract(lldb_private::DWARFContext &context); 25061da546Spatrick bool FindRanges(const DWARFUnit *cu, dw_offset_t debug_ranges_offset, 26061da546Spatrick DWARFRangeList &range_list) const; 27061da546Spatrick 28061da546Spatrick static void Dump(lldb_private::Stream &s, 29061da546Spatrick const lldb_private::DWARFDataExtractor &debug_ranges_data, 30061da546Spatrick lldb::offset_t *offset_ptr, dw_addr_t cu_base_addr); 31061da546Spatrick 32061da546Spatrick protected: 33061da546Spatrick bool Extract(lldb_private::DWARFContext &context, lldb::offset_t *offset_ptr, 34061da546Spatrick DWARFRangeList &range_list); 35061da546Spatrick 36061da546Spatrick typedef std::map<dw_offset_t, DWARFRangeList> range_map; 37061da546Spatrick typedef range_map::iterator range_map_iterator; 38061da546Spatrick typedef range_map::const_iterator range_map_const_iterator; 39061da546Spatrick range_map m_range_map; 40061da546Spatrick }; 41061da546Spatrick 42*dda28197Spatrick #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGRANGES_H 43