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
33 lines
970 B
C++
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
|