aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cu_to_module.h
diff options
context:
space:
mode:
authorSterling Augustine <saugustine@google.com>2020-10-02 07:44:24 -0700
committerSterling Augustine <saugustine@google.com>2020-10-02 17:55:10 +0000
commitf6669d6df42686aea832762f701359a3f9bdc762 (patch)
tree83c626021a72d4838ce3d570963cad0864f30f77 /src/common/dwarf_cu_to_module.h
parentRefactor rangelist handling to prepare for dwarf5 .debug_rngslist (diff)
downloadbreakpad-master.tar.xz
Revert "Refactor rangelist handling to prepare for dwarf5 .debug_rngslist"HEADmaster
This reverts commit 2b936b06c12657b684f6c7276d6ae5a24cb48ab5. After getting deep into the dwarf5 range reader, I realized that this should be done a somewhat different way. So reverting in favor or a better design, coming in a few minutes. Change-Id: Ie0b2846e70b3df1e637831e96ea69fe093f4e712 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2446011 Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/dwarf_cu_to_module.h')
-rw-r--r--src/common/dwarf_cu_to_module.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/common/dwarf_cu_to_module.h b/src/common/dwarf_cu_to_module.h
index e71c3e77..3e15b667 100644
--- a/src/common/dwarf_cu_to_module.h
+++ b/src/common/dwarf_cu_to_module.h
@@ -89,11 +89,6 @@ class DwarfCUToModule: public dwarf2reader::RootDIEHandler {
const uint8_t* contents,
uint64_t length);
- void SetDebugRangeInfo(const uint8_t* contents, uint64_t size,
- dwarf2reader::ByteReader* reader) {
- range_list_reader_ = dwarf2reader::RangeListReader(contents, size, reader);
- }
-
// Clear the section map for testing.
void ClearSectionMapForTest();
@@ -124,9 +119,6 @@ class DwarfCUToModule: public dwarf2reader::RootDIEHandler {
// True if we are handling references between compilation units.
const bool handle_inter_cu_refs_;
- // Reader for .debug_ranges section, which is global to the file.
- dwarf2reader::RangeListReader range_list_reader_;
-
// Inter-compilation unit data used internally by the handlers.
scoped_ptr<FilePrivate> file_private_;
};
@@ -135,23 +127,16 @@ class DwarfCUToModule: public dwarf2reader::RootDIEHandler {
// DwarfCUToModule.
class RangesHandler {
public:
- RangesHandler() : reader_(nullptr) { }
+ RangesHandler() { }
virtual ~RangesHandler() { }
// Called when finishing a function to populate the function's ranges.
- // base_address holds the base PC the range list values are offsets
- // off. Return false if the rangelist falls out of the relevant section.
+ // The ranges' entries are read starting from offset in the .debug_ranges
+ // section, base_address holds the base PC the range list values are
+ // offsets off. Return false if the rangelist falls out of the
+ // .debug_ranges section.
virtual bool ReadRanges(uint64_t offset, Module::Address base_address,
vector<Module::Range>* ranges) = 0;
-
- // Read ranges from this buffer and interpret them according to attr. Called
- // upon seeing a DW_AT_ranges or DW_AT_rngslist attribute.
- void SetRangesReader(dwarf2reader::RangeListReader* reader) {
- reader_ = reader;
- }
-
- protected:
- dwarf2reader::RangeListReader* reader_;
};
// An abstract base class for handlers that handle DWARF line data