Revert "Refactor rangelist handling to prepare for dwarf5 .debug_rngslist"

This reverts commit 2b936b06c1.

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>
This commit is contained in:
Sterling Augustine 2020-10-02 07:44:24 -07:00
parent 2b936b06c1
commit f6669d6df4
6 changed files with 48 additions and 59 deletions

View file

@ -134,7 +134,6 @@ DwarfCUToModule::FileContext::FileContext(const string& filename,
: filename_(filename),
module_(module),
handle_inter_cu_refs_(handle_inter_cu_refs),
range_list_reader_(nullptr, 0, nullptr),
file_private_(new FilePrivate()) {
}
@ -194,7 +193,7 @@ struct DwarfCUToModule::CUContext {
// For printing error messages.
WarningReporter* reporter;
// For handling ranges, however they may be specified.
// For reading ranges from the .debug_ranges section
RangesHandler* ranges_handler;
// The source language of this compilation unit.
@ -207,9 +206,6 @@ struct DwarfCUToModule::CUContext {
uint64_t high_pc;
uint64_t ranges;
// For reading dwarf4 ranges.
scoped_ptr<dwarf2reader::RangeListReader> range_list_reader_;
// The functions defined in this compilation unit. We accumulate
// them here during parsing. Then, in DwarfCUToModule::Finish, we
// assign them lines and add them to file_context->module.
@ -516,15 +512,6 @@ void DwarfCUToModule::FuncHandler::ProcessAttributeUnsigned(
break;
case dwarf2reader::DW_AT_ranges:
ranges_ = data;
if (cu_context_->ranges_handler) {
cu_context_->ranges_handler->SetRangesReader(
&cu_context_->file_context->range_list_reader_);
} else {
cu_context_->reporter->MissingRanges();
// The rest of the code will fall back to low-pc, which is better than
// nothing.
ranges_ = 0;
}
break;
default: