summaryrefslogtreecommitdiffstats
path: root/dwarf_wrappers.h
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-08-10 14:48:39 -0700
committerJosh Stone <jistone@redhat.com>2009-08-10 14:48:39 -0700
commit7f17af5c9ace193eef48246bcadf42ae9650de67 (patch)
tree327acfe235e67925e3f21b54b5f5f3f798419fb4 /dwarf_wrappers.h
parent6a38401c78a02b9bd14e50966ecdd54a003597b7 (diff)
downloadsystemtap-steved-7f17af5c9ace193eef48246bcadf42ae9650de67.tar.gz
systemtap-steved-7f17af5c9ace193eef48246bcadf42ae9650de67.tar.xz
systemtap-steved-7f17af5c9ace193eef48246bcadf42ae9650de67.zip
PR10499: Integrate attributes in dwarf_decl_file/line
Elfutils prior to 0.143 didn't use attr_integrate when looking up the decl_file or decl_line, so the attributes would sometimes be missed. For those old versions, we define custom implementations to do the integration. * dwarf_wrappers.cxx (dwarf_decl_file_integrate): New. (dwarf_decl_line_integrate): New. * dwarf_wrappers.h: Add macros to redirect calls to the above functions. * dwflpp.cxx (dwflpp::iterate_over_labels): Replace a manual attribute lookup that is the same as dwarf_decl_line.
Diffstat (limited to 'dwarf_wrappers.h')
-rw-r--r--dwarf_wrappers.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/dwarf_wrappers.h b/dwarf_wrappers.h
index 9233fc1d..54ab8fd4 100644
--- a/dwarf_wrappers.h
+++ b/dwarf_wrappers.h
@@ -103,6 +103,21 @@ public:
};
+#if !_ELFUTILS_PREREQ(0, 143)
+// Elfutils prior to 0.143 didn't use attr_integrate when looking up the
+// decl_file or decl_line, so the attributes would sometimes be missed. For
+// those old versions, we define custom implementations to do the integration.
+
+const char *dwarf_decl_file_integrate (Dwarf_Die *die);
+#define dwarf_decl_file dwarf_decl_file_integrate
+
+int dwarf_decl_line_integrate (Dwarf_Die *die, int *linep)
+ __nonnull_attribute__ (2);
+#define dwarf_decl_line dwarf_decl_line_integrate
+
+#endif // !_ELFUTILS_PREREQ(0, 143)
+
+
#endif
/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */