From a2880a72cbf8800c1643ef41b4df134a7b20f2ef Mon Sep 17 00:00:00 2001 From: Gabriel-Andrew Pollo Guilbert Date: Tue, 7 Jul 2020 20:06:59 -0400 Subject: [PATCH] Fix typo when referencing DW_FORM_ref_addr (#321) --- elftools/dwarf/die.py | 2 +- elftools/dwarf/dwarfinfo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elftools/dwarf/die.py b/elftools/dwarf/die.py index 455a2e3..dd9d592 100755 --- a/elftools/dwarf/die.py +++ b/elftools/dwarf/die.py @@ -110,7 +110,7 @@ class DIE(object): 'DW_FORM_ref8', 'DW_FORM_ref'): refaddr = self.cu.cu_offset + attr.raw_value return self.cu.get_DIE_from_refaddr(refaddr) - elif attr.form in ('DW_FORM_refaddr'): + elif attr.form in ('DW_FORM_ref_addr'): return self.cu.dwarfinfo.get_DIE_from_refaddr(attr.raw_value) elif attr.form in ('DW_FORM_ref_sig8'): # Implement search type units for matching signature diff --git a/elftools/dwarf/dwarfinfo.py b/elftools/dwarf/dwarfinfo.py index 896c292..103fc49 100644 --- a/elftools/dwarf/dwarfinfo.py +++ b/elftools/dwarf/dwarfinfo.py @@ -147,7 +147,7 @@ class DWARFInfo(object): .debug_info section. refaddr: - Either a refaddr of a DIE (possibly from a DW_FORM_refaddr + Either a refaddr of a DIE (possibly from a DW_FORM_ref_addr attribute) or the section offset of a CU (possibly from an aranges table). -- 2.30.2