Most of the code changed here dates back to 2010, when LLDB was first introduced upstream, as such it benefits from a slight cleanup. The method "dump" is not used anywhere nor is it tested, so this commit removes it. The "findRanges" method returns a boolean which is never checked and indicates whether the method found anything/assigned a range map to the out parameter. This commit folds the out parameter into the return type of the method. A handful of typedefs were also never used and therefore removed. Differential Revision: https://reviews.llvm.org/D150363
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
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:
|
|
bool Extract(lldb_private::DWARFContext &context, lldb::offset_t *offset_ptr,
|
|
DWARFRangeList &range_list);
|
|
|
|
std::map<dw_offset_t, DWARFRangeList> m_range_map;
|
|
};
|
|
|
|
#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGRANGES_H
|