Files
clang-p2996/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
Felipe de Azevedo Piovezan 70aad4ec90 [lldb][NFCI] Use llvm's libDebugInfo for DebugRanges
In an effort to unify the different dwarf parsers available in the codebase,
this commit removes LLDB's custom parsing for the `.debug_ranges` DWARF section,
instead calling into LLVM's parser.

Subsequent work should look into unifying `llvm::DWARDebugRangeList` (whose
entries are pairs of (start, end) addresses) with `lldb::DWARFRangeList` (whose
entries are pairs of (start, length)). The lists themselves are also different
data structures, but functionally equivalent.

Depends on D150363

Differential Revision: https://reviews.llvm.org/D150366
2023-05-23 11:11:10 -04:00

33 lines
970 B
C++

//===-- DWARFDebugRanges.h --------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGRANGES_H
#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGRANGES_H
#include "lldb/Core/dwarf.h"
#include <map>
class DWARFUnit;
namespace lldb_private {
class DWARFContext;
}
class DWARFDebugRanges {
public:
DWARFDebugRanges();
void Extract(lldb_private::DWARFContext &context);
DWARFRangeList FindRanges(const DWARFUnit *cu,
dw_offset_t debug_ranges_offset) const;
protected:
std::map<dw_offset_t, DWARFRangeList> m_range_map;
};
#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGRANGES_H