From 92a20b650400d110bf14378195e1346c7b0635de Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Fri, 14 Jan 2022 15:17:42 -0800 Subject: [PATCH] Fix reading DW_AT_ranges in dwarf 5 Bug: chromium:1285381 Change-Id: I8be6b0920e4d137a5d62283ce622669fa56bc417 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3389983 Reviewed-by: Joshua Peraza --- src/common/dwarf/dwarf2reader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc index aa4ec2b6..bf6758d8 100644 --- a/src/common/dwarf/dwarf2reader.cc +++ b/src/common/dwarf/dwarf2reader.cc @@ -1793,7 +1793,7 @@ bool RangeListReader::ReadRanges(enum DwarfForm form, uint64_t data) { } } else if (form == DW_FORM_rnglistx) { offset_array_ = cu_info_->ranges_base_; - uint64_t index_offset = reader_->AddressSize() * data; + uint64_t index_offset = reader_->OffsetSize() * data; uint64_t range_list_offset = reader_->ReadOffset(cu_info_->buffer_ + offset_array_ + index_offset);