libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 29/35] Nuke HAVE_BACKTRACE


From: Tommi Rantala
Subject: [Libunwind-devel] [PATCH 29/35] Nuke HAVE_BACKTRACE
Date: Tue, 18 Sep 2012 16:31:38 +0300

We do not really need to care if the system provides `backtrace()',
since we will want to test the one provided in libunwind, not the one
that is provided by the system. The `backtrace()' calls should already
be aliased to `unw_backtrace()', but if that is not working for whatever
reason, we can call `unw_backtrace()' explicitly.
---
 configure.ac        |    1 -
 tests/Gperf-trace.c |    3 +--
 tests/Makefile.am   |    2 --
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0176c24..0312b24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -310,7 +310,6 @@ PKG_MAINTAINER=pkg_maintainer
 old_LIBS="$LIBS"
 LIBS=""
 AC_SEARCH_LIBS(backtrace, execinfo)
-AM_CONDITIONAL(HAVE_BACKTRACE, test "x$ac_cv_search_backtrace" != xno)
 LIBS="$old_LIBS"
 
 AC_SUBST(build_arch)
diff --git a/tests/Gperf-trace.c b/tests/Gperf-trace.c
index 87dd5b2..7baf466 100644
--- a/tests/Gperf-trace.c
+++ b/tests/Gperf-trace.c
@@ -21,7 +21,6 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 
AN ACTION
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
 
-#include <execinfo.h>
 #include <memory.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -62,7 +61,7 @@ measure_unwind (int maxlevel, double *step)
   void *buffer[128];
 
   start = gettime ();
-  level = backtrace(buffer, 128);
+  level = unw_backtrace(buffer, 128);
   stop = gettime ();
 
   if (level <= maxlevel)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4bbba40..a367eed 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -50,9 +50,7 @@ endif #!ARCH_IA64
  noinst_PROGRAMS_cdep = forker crasher mapper test-ptrace-misc          \
                        Gperf-simple Lperf-simple
 
-if HAVE_BACKTRACE
  noinst_PROGRAMS_cdep += Gperf-trace Lperf-trace
-endif
 
 if SUPPORT_CXX_EXCEPTIONS
  check_PROGRAMS_cdep += Ltest-cxx-exceptions
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]