summaryrefslogtreecommitdiffstats
path: root/dwarf_wrappers.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-05-18 12:02:44 +0200
committerMark Wielaard <mjw@redhat.com>2009-05-18 12:02:44 +0200
commit45dea7c321fb550a4b4d418615775a97668cd52b (patch)
tree59407d319736c1a20b86419561f0502d855d2fa0 /dwarf_wrappers.cxx
parent7b479e045e3ed49ed58cd02df4d805a94cdc5f13 (diff)
parent4627ed58020162dc8c0798dcfa24d3756eee5ccf (diff)
downloadsystemtap-steved-45dea7c321fb550a4b4d418615775a97668cd52b.tar.gz
systemtap-steved-45dea7c321fb550a4b4d418615775a97668cd52b.tar.xz
systemtap-steved-45dea7c321fb550a4b4d418615775a97668cd52b.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 : */