diff options
author | Josh Stone <jistone@redhat.com> | 2009-08-19 17:27:18 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-08-19 17:27:18 -0700 |
commit | 3d1ad34033e6f77368287927049e112d9ee3677e (patch) | |
tree | 6ddc1b1ae665ed6be9a01b81d142f048c2b063d8 /dwarf_wrappers.cxx | |
parent | de9a66e3bbc3f287229cad892108e46ac44b2bdf (diff) | |
download | systemtap-steved-3d1ad34033e6f77368287927049e112d9ee3677e.tar.gz systemtap-steved-3d1ad34033e6f77368287927049e112d9ee3677e.tar.xz systemtap-steved-3d1ad34033e6f77368287927049e112d9ee3677e.zip |
Create a dwarf_attr_die idiom
We commonly do a dwarf_attr_integrate followed by dwarf_formref_die,
with no care for the Dwarf_Attribute, so I captured that idiom in an
inline function.
* dwarf_wrappers.h (dwarf_attr_die): New.
* dwarf_wrappers.cxx (dwarf_type_name): Call dwarf_attr_die.
* dwflpp.cxx (dwflpp::print_members): Ditto.
(dwflpp::find_struct_member): Ditto.
* tapsets.cxx (dwarf_derived_probe::saveargs): Ditto.
(uprobe_derived_probe::saveargs): Ditto.
(resolve_tracepoint_arg_type): Ditto.
(tracepoint_derived_probe::build_args): Ditto.
Diffstat (limited to 'dwarf_wrappers.cxx')
-rw-r--r-- | dwarf_wrappers.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/dwarf_wrappers.cxx b/dwarf_wrappers.cxx index fe8ead07..7b64aac5 100644 --- a/dwarf_wrappers.cxx +++ b/dwarf_wrappers.cxx @@ -125,10 +125,8 @@ dwarf_type_name(Dwarf_Die *type_die, ostringstream& o) // recurse into the referent type // if it can't be named, just call it "void" - Dwarf_Attribute subtype_attr; Dwarf_Die subtype_die; - if (!dwarf_attr_integrate(type_die, DW_AT_type, &subtype_attr) - || !dwarf_formref_die(&subtype_attr, &subtype_die) + if (!dwarf_attr_die(type_die, DW_AT_type, &subtype_die) || !dwarf_type_name(&subtype_die, o)) o.str("void"), o.seekp(4); |