[PATCH] Add forgotten files to EXTRA_DIST
by Petr Machata
Signed-off-by: Petr Machata <pmachata(a)redhat.com>
---
tests/ChangeLog | 5 +++++
tests/Makefile.am | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index ae2262b..223fab4 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,10 @@
2015-03-18 Petr Machata <pmachata(a)redhat.com>
+ * Makefile.am (EXTRA_DIST): Add run-dwarf-ranges.sh,
+ debug-ranges-no-lowpc.o.bz2.
+
+2015-03-18 Petr Machata <pmachata(a)redhat.com>
+
* test-iterators.cc, run-test-iterators.sh: New files.
* Makefile.am (check_PROGRAMS) [HAVE_CXX]: Add test-iterators.
(TESTS) [HAVE_CXX]: Add run-test-iterators.sh.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index da17cca..dc2a946 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -169,7 +169,9 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
run-find-prologues.sh run-allregs.sh run-native-test.sh \
run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
run-dwfl-addr-sect.sh run-early-offscn.sh \
- run-dwarf-getmacros.sh run-test-flag-nobits.sh \
+ run-dwarf-getmacros.sh \
+ run-dwarf-ranges.sh debug-ranges-no-lowpc.o.bz2 \
+ run-test-flag-nobits.sh \
run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \
testfile15.bz2 testfile15.debug.bz2 \
testfile16.bz2 testfile16.debug.bz2 \
--
2.1.0
9 years, 1 month
[COMMITTED] Fix -Wimplicit warnings.
by Mark Wielaard
---
ChangeLog | 5 +++++
configure.ac | 7 ++++---
tests/ChangeLog | 6 ++++++
tests/backtrace-dwarf.c | 9 +++++++--
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f81b302..5c8e1c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-13 Mark Wielaard <mjw(a)redhat.com>
+
+ * configure.ac (ac_cv_c99): Add explicit return.
+ (ac_cv_tls): Add stdlib.h include.
+
2014-12-18 Mark Wielaard <mjw(a)redhat.com>
* configure.ac: Set version to 0.161.
diff --git a/configure.ac b/configure.ac
index 0e67a79..c4b818d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
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
@@ -83,7 +83,7 @@ AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [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],
@@ -97,7 +97,8 @@ save_LDFLAGS="$LDFLAGS"
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)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 0162b85..82c30e0 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-13 Mark Wielaard <mjw(a)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(a)gmail.com>
* backtrace.c (prepare_thread): Use PTRACE_GETREGS/PTRACE_SETREGS
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
index 87d088a..fbcb22e 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -1,5 +1,5 @@
/* 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
@@ -22,7 +22,11 @@
#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__
@@ -37,7 +41,6 @@ main (int argc __attribute__ ((unused)), char **argv)
#else /* __linux__ */
-static void cleanup_13_abort (void);
#define main cleanup_13_main
#include "cleanup-13.c"
#undef main
@@ -115,7 +118,9 @@ static int
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
--
1.8.3.1
9 years, 1 month
RFC: Add compressed debug section support to elfutils
by H.J. Lu
I am working on fixing:
https://bugzilla.redhat.com/show_bug.cgi?id=807053
There are a couple issues with compressed debug section support
in elfutils:
1.libdw doesn't handle compressed debug sections with relocations.
check_section tries to handle compressed debug sections. But
It is too late since relocations have been applied already.
2. Dwarf debug section name handling is duplicated in both libdw
and libebl. ebl_debugscn_p is used to check for debug section.
But it doesn't handle compressed debug section wgile libdw does.
libelf doesn't handle DWARF debug sections and I am not if it
should handle them directly. However, there is convert_data in
libelf, which seems to be an ideal place to handle compressed
debug sections. We just need to add a hook to libelf to allow
libdw to decompress debug sections. I propose to add
Elf *
__libelf_elf_begin (int fildes, Elf_Cmd cmd, Elf *ref,
char *(*convert_debug_data) (Elf_Scn *,
char *,
size_t *))
to libelf. It will be a private function for libdw. The full patch is at
https://bugzilla.redhat.com/attachment.cgi?id=1001009
Any comments?
I am not on this mailing list. Please CC me on this topic.
Thanks.
--
H.J.
9 years, 1 month
known-dwarf.h
by Petr Machata
Hi there,
known-dwarf.h is an extremely handy header file. I regularly find
myself replicating it in my ELF/DWARF-related projects. In dwgrep
I simply copy over known-dwarf.awk as such and generate the header
myself.
Obviously that's not ideal. Could known-dwarf.h be shipped? In
dwlocstat I really only use it to convert constants to strings
representing their names, but in dwgrep I actually need known-dwarf.h,
as I do some more intricate per-constant processing.
Opinions?
Thanks,
Petr
9 years, 1 month