summaryrefslogtreecommitdiff
path: root/libdwarf/libdwarf_attr.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2019-06-29 15:27:18 +0000
committerEd Maste <emaste@FreeBSD.org>2019-06-29 15:27:18 +0000
commita5b08c1484eac2c6a65e726f550b3189ff84c6c8 (patch)
tree01cd9d6d76e2c378b391422460c6f233ead08179 /libdwarf/libdwarf_attr.c
parent2b92b30119ed91ed88f102ba9ecc40cd1c046a65 (diff)
Notes
Diffstat (limited to 'libdwarf/libdwarf_attr.c')
-rw-r--r--libdwarf/libdwarf_attr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libdwarf/libdwarf_attr.c b/libdwarf/libdwarf_attr.c
index dfbbc484c352..a25deedaa5b1 100644
--- a/libdwarf/libdwarf_attr.c
+++ b/libdwarf/libdwarf_attr.c
@@ -27,7 +27,7 @@
#include "_libdwarf.h"
-ELFTC_VCSID("$Id: libdwarf_attr.c 3064 2014-06-06 19:35:55Z kaiwang27 $");
+ELFTC_VCSID("$Id: libdwarf_attr.c 3748 2019-06-28 01:11:13Z emaste $");
int
_dwarf_attr_alloc(Dwarf_Die die, Dwarf_Attribute *atp, Dwarf_Error *error)
@@ -100,7 +100,6 @@ _dwarf_attr_init(Dwarf_Debug dbg, Dwarf_Section *ds, uint64_t *offsetp,
uint64_t form, int indirect, Dwarf_Error *error)
{
struct _Dwarf_Attribute atref;
- Dwarf_Section *str;
int ret;
ret = DW_DLE_NONE;
@@ -183,9 +182,7 @@ _dwarf_attr_init(Dwarf_Debug dbg, Dwarf_Section *ds, uint64_t *offsetp,
break;
case DW_FORM_strp:
atref.u[0].u64 = dbg->read(ds->ds_data, offsetp, dwarf_size);
- str = _dwarf_find_section(dbg, ".debug_str");
- assert(str != NULL);
- atref.u[1].s = (char *) str->ds_data + atref.u[0].u64;
+ atref.u[1].s = _dwarf_strtab_get_table(dbg) + atref.u[0].u64;
break;
case DW_FORM_ref_sig8:
atref.u[0].u64 = 8;