summaryrefslogtreecommitdiffstats
path: root/dwarf_wrappers.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-05-19 11:42:20 -0400
committerDave Brolley <brolley@redhat.com>2009-05-19 11:42:20 -0400
commit88a931144b278916dd157e0f69636e87f8fdc949 (patch)
tree4cdd8928f2a0e4e506005e6d864fde0d07ddfedb /dwarf_wrappers.cxx
parente9cb523875a37b2d809afbbe0fffae980d8080a1 (diff)
parentc897e941ca645ab1e2aa325e5feaae30cc43060e (diff)
downloadsystemtap-steved-88a931144b278916dd157e0f69636e87f8fdc949.tar.gz
systemtap-steved-88a931144b278916dd157e0f69636e87f8fdc949.tar.xz
systemtap-steved-88a931144b278916dd157e0f69636e87f8fdc949.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'dwarf_wrappers.cxx')
-rw-r--r--dwarf_wrappers.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/dwarf_wrappers.cxx b/dwarf_wrappers.cxx
index 3627b989..d7183dc3 100644
--- a/dwarf_wrappers.cxx
+++ b/dwarf_wrappers.cxx
@@ -12,6 +12,7 @@
#include <cstring>
#include <string>
#include <elfutils/libdwfl.h>
+#include <dwarf.h>
using std::string;
@@ -45,4 +46,16 @@ void dwfl_assert(const std::string& desc, bool condition)
dwfl_assert(desc, -1);
}
+
+// Helper for dealing with selected portions of libdwfl in a more readable
+// fashion, and with specific cleanup / checking / logging options.
+
+const char *
+dwarf_diename_integrate (Dwarf_Die *die)
+{
+ Dwarf_Attribute attr_mem;
+ return dwarf_formstring (dwarf_attr_integrate (die, DW_AT_name, &attr_mem));
+}
+
+
/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */