summaryrefslogtreecommitdiffstats
path: root/libdwarf/libdwarf_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwarf/libdwarf_attr.c')
-rw-r--r--libdwarf/libdwarf_attr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libdwarf/libdwarf_attr.c b/libdwarf/libdwarf_attr.c
index a7fb71c..dfbbc48 100644
--- a/libdwarf/libdwarf_attr.c
+++ b/libdwarf/libdwarf_attr.c
@@ -27,7 +27,7 @@
#include "_libdwarf.h"
-ELFTC_VCSID("$Id: libdwarf_attr.c 2966 2013-09-21 14:40:14Z kaiwang27 $");
+ELFTC_VCSID("$Id: libdwarf_attr.c 3064 2014-06-06 19:35:55Z kaiwang27 $");
int
_dwarf_attr_alloc(Dwarf_Die die, Dwarf_Attribute *atp, Dwarf_Error *error)
@@ -106,6 +106,7 @@ _dwarf_attr_init(Dwarf_Debug dbg, Dwarf_Section *ds, uint64_t *offsetp,
ret = DW_DLE_NONE;
memset(&atref, 0, sizeof(atref));
atref.at_die = die;
+ atref.at_offset = *offsetp;
atref.at_attrib = ad->ad_attrib;
atref.at_form = indirect ? form : ad->ad_form;
atref.at_indirect = indirect;
@@ -162,7 +163,7 @@ _dwarf_attr_init(Dwarf_Debug dbg, Dwarf_Section *ds, uint64_t *offsetp,
if (cu->cu_version == 2)
atref.u[0].u64 = dbg->read(ds->ds_data, offsetp,
cu->cu_pointer_size);
- else if (cu->cu_version == 3)
+ else
atref.u[0].u64 = dbg->read(ds->ds_data, offsetp,
dwarf_size);
break;
OpenPOWER on IntegriCloud