11#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h"
19 llvm::DWARFDataExtractor extractor =
21 llvm::DWARFDebugRangeList extracted_list;
22 uint64_t current_offset = 0;
23 auto extract_next_list = [&] {
24 if (
auto error = extracted_list.extract(extractor, ¤t_offset)) {
25 consumeError(std::move(
error));
31 uint64_t previous_offset = current_offset;
32 while (extractor.isValidOffset(current_offset) && extract_next_list()) {
34 lldb_range_list.
Reserve(extracted_list.getEntries().size());
35 for (
auto &range : extracted_list.getEntries())
36 lldb_range_list.
Append(range.StartAddress,
37 range.EndAddress - range.StartAddress);
38 lldb_range_list.
Sort();
39 previous_offset = current_offset;
static llvm::raw_ostream & error(Stream &strm)
void Slide(BaseType slide)
void Append(const Entry &entry)
void Reserve(typename Collection::size_type size)
const DWARFDataExtractor & getOrLoadRangesData()
DWARFRangeList FindRanges(const DWARFUnit *cu, dw_offset_t debug_ranges_offset) const
std::map< dw_offset_t, DWARFRangeList > m_range_map
void Extract(DWARFContext &context)
dw_addr_t GetBaseAddress() const
dw_addr_t GetRangesBase() const
lldb_private::RangeVector< dw_addr_t, dw_addr_t, 2 > DWARFRangeList
A class that represents a running process on the host machine.