Date: Wed, 3 Jul 2019 20:55:08 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349710 - stable/12/contrib/elftoolchain/libdwarf Message-ID: <201907032055.x63Kt8Ng013436@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Jul 3 20:55:08 2019 New Revision: 349710 URL: https://svnweb.freebsd.org/changeset/base/349710 Log: MFC r349424: libdwarf: Use the cached strtab pointer when reading string attributes. Modified: stable/12/contrib/elftoolchain/libdwarf/libdwarf_attr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libdwarf/libdwarf_attr.c ============================================================================== --- stable/12/contrib/elftoolchain/libdwarf/libdwarf_attr.c Wed Jul 3 20:54:52 2019 (r349709) +++ stable/12/contrib/elftoolchain/libdwarf/libdwarf_attr.c Wed Jul 3 20:55:08 2019 (r349710) @@ -100,7 +100,6 @@ _dwarf_attr_init(Dwarf_Debug dbg, Dwarf_Section *ds, u 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, u 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907032055.x63Kt8Ng013436>