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 <jperaza@chromium.org>
This commit is contained in:
Zequan Wu 2022-01-14 15:17:42 -08:00 committed by Joshua Peraza
parent 862dc68dbc
commit 92a20b6504

View File

@ -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);