From 440f755a3b886c6cfdca9f523302f1f0938f7fec Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 12 May 2009 19:33:14 -0700 Subject: Move dfwlpp into its own file It's not a terribly clean split, but moving it helps reveals some of the knots that need to be untangled. --- dwarf_wrappers.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dwarf_wrappers.cxx') 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 #include #include +#include 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 : */ -- cgit