+2015-03-13 Mark Wielaard <mjw@redhat.com>
+
+ * configure.ac (ac_cv_c99): Add explicit return.
+ (ac_cv_tls): Add stdlib.h include.
+
2014-12-18 Mark Wielaard <mjw@redhat.com>
* configure.ac: Set version to 0.161.
dnl Process this file with autoconf to produce a configure script.
dnl Configure input file for elfutils. -*-autoconf-*-
dnl
-dnl Copyright (C) 1996-2014 Red Hat, Inc.
+dnl Copyright (C) 1996-2015 Red Hat, Inc.
dnl
dnl This file is part of elfutils.
dnl
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -std=gnu99"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl
-int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; }])],
+int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s;}])],
ac_cv_c99=yes, ac_cv_c99=no)
CFLAGS="$old_CFLAGS"])
AS_IF([test "x$ac_cv_c99" != xyes],
CFLAGS="-fpic $CFLAGS"
LDFLAGS="-shared -Wl,-z,defs,-z,relro $LDFLAGS"
AC_LINK_IFELSE([dnl
-AC_LANG_PROGRAM([[#undef __thread
+AC_LANG_PROGRAM([[#include <stdlib.h>
+#undef __thread
static __thread int a; int foo (int b) { return a + b; }]],
[[exit (foo (0));]])],
ac_cv_tls=yes, ac_cv_tls=no)
+2015-03-13 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace-dwarf.c: Add explicit includes.
+ (cleanup_13_abort): Remove unused static declaration.
+ (thread_callback): Add explicit return.
+
2015-03-13 H.J. Lu <hjl.tools@gmail.com>
* backtrace.c (prepare_thread): Use PTRACE_GETREGS/PTRACE_SETREGS
/* Test program for unwinding of complicated DWARF expressions.
- Copyright (C) 2013 Red Hat, Inc.
+ Copyright (C) 2013, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
#include <stdio_ext.h>
#include <locale.h>
#include <errno.h>
+#include <error.h>
+#include <unistd.h>
#include <sys/ptrace.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include ELFUTILS_HEADER(dwfl)
#ifndef __linux__
#else /* __linux__ */
-static void cleanup_13_abort (void);
#define main cleanup_13_main
#include "cleanup-13.c"
#undef main
thread_callback (Dwfl_Thread *thread, void *thread_arg)
{
dwfl_thread_getframes (thread, frame_callback, NULL);
+ /* frame_callback shall exit (0) on success. */
error (1, 0, "dwfl_thread_getframes: %s", dwfl_errmsg (-1));
+ return DWARF_CB_ABORT;
}
int