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 <mark@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Sterling Augustine
2020-06-23 12:42:27 -07:00
parent feb2dca989
commit 72c118f4a6
6 changed files with 66 additions and 10 deletions

View File

@@ -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_;
}