Treat high_pc as an address for DW_FORM_GNU_addr_index

The high_pc is an address and has already been read from .debug_addr
before being passed into FuncHandler::ProcessAttributeUnsigned.

Bug:870908
Change-Id: I950098e360b5193f26bf767b8fa0a5f9d59e66ce
Reviewed-on: https://chromium-review.googlesource.com/1178760
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Joshua Peraza 2018-08-16 13:42:04 -07:00
parent acf983292a
commit 6ee298a346

View File

@ -573,7 +573,8 @@ void DwarfCUToModule::FuncHandler::Finish() {
if (!ranges_) {
// Make high_pc_ an address, if it isn't already.
if (high_pc_form_ != dwarf2reader::DW_FORM_addr) {
if (high_pc_form_ != dwarf2reader::DW_FORM_addr &&
high_pc_form_ != dwarf2reader::DW_FORM_GNU_addr_index) {
high_pc_ += low_pc_;
}