From 6a38401c78a02b9bd14e50966ecdd54a003597b7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 10 Aug 2009 13:01:30 -0700 Subject: Simplify _ELFUTILS_PREREQ checking We were jumping through a few hoops to deal with elfutils < 0.138 that did not have the _ELFUTILS_PREREQ macro. I've added an always-false dummy macro to take its place when it doesn't exit. All of the other "#ifdef _ELFUTILS_PREREQ" ugliness can now go away. --- dwflpp.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'dwflpp.cxx') diff --git a/dwflpp.cxx b/dwflpp.cxx index 9d0f3f4d..e436a9ca 100644 --- a/dwflpp.cxx +++ b/dwflpp.cxx @@ -41,9 +41,6 @@ extern "C" { #include #include #include -#ifdef HAVE_ELFUTILS_VERSION_H -#include -#endif #include #include #include @@ -2593,9 +2590,8 @@ dwflpp::get_cfa_ops (Dwarf_Addr pc) clog << "get_cfa_ops @0x" << hex << pc << dec << ", module_start @0x" << hex << module_start << dec << endl; -#ifdef _ELFUTILS_PREREQ #if _ELFUTILS_PREREQ(0,142) - // Try debug_frame first, then fall back on eh_frame. + // Try debug_frame first, then fall back on eh_frame. size_t cfa_nops; Dwarf_Addr bias; Dwarf_CFI *cfi = dwfl_module_dwarf_cfi (module, &bias); @@ -2629,7 +2625,6 @@ dwflpp::get_cfa_ops (Dwarf_Addr pc) clog << "dwfl_module_eh_cfi failed: " << dwfl_errmsg(-1) << endl; } -#endif #endif if (sess.verbose > 2) -- cgit