From 72c118f4a6dfb954a80d2f2b9a1794e13b0a8ebd Mon Sep 17 00:00:00 2001 From: Sterling Augustine Date: Tue, 23 Jun 2020 12:42:27 -0700 Subject: Add and handle various dwarf5 addrx forms. Given the almost nonexistent direct dwarfreader tests, I think the best way to test these dwarf5 additions will be to add a full dwarf5 compilation unit similar to the ones used incidentally in the other tests. But I can't do that until enough dwarf5 is correctly implemented. Change-Id: I3418bda7212ae85c4b67232a2ab8fea9b9ca5d42 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2258838 Reviewed-by: Mark Mentovai Reviewed-by: Mike Frysinger --- src/common/dwarf_cu_to_module.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/common/dwarf_cu_to_module.cc') diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index d6e79769..24bbf83b 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -593,7 +593,12 @@ void DwarfCUToModule::FuncHandler::Finish() { if (!ranges_) { // Make high_pc_ an address, if it isn't already. if (high_pc_form_ != dwarf2reader::DW_FORM_addr && - high_pc_form_ != dwarf2reader::DW_FORM_GNU_addr_index) { + high_pc_form_ != dwarf2reader::DW_FORM_GNU_addr_index && + high_pc_form_ != dwarf2reader::DW_FORM_addrx && + high_pc_form_ != dwarf2reader::DW_FORM_addrx1 && + high_pc_form_ != dwarf2reader::DW_FORM_addrx2 && + high_pc_form_ != dwarf2reader::DW_FORM_addrx3 && + high_pc_form_ != dwarf2reader::DW_FORM_addrx4) { high_pc_ += low_pc_; } -- cgit v1.2.1