summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-02-21 19:39:32 +0000
committerPedro Alves <palves@redhat.com>2012-02-21 19:39:32 +0000
commitb54a8fd70210fd1fc7b4f41c4679737066951033 (patch)
tree759bfff66926faf35b830ce2bde4d7722762c7f0
parent82c2def5ff08bb3f5a8c554d78d9a0ddc65dafe0 (diff)
downloadppe42-binutils-b54a8fd70210fd1fc7b4f41c4679737066951033.tar.gz
ppe42-binutils-b54a8fd70210fd1fc7b4f41c4679737066951033.zip
2012-02-21 Tristan Gingold <gingold@adacore.com>
Pedro Alves <palves@redhat.com> * ia64-tdep.c: Do not include libunwind-ia64.h. * libunwind-frame.h: Remove #ifdef HAVE_LIBUNWIND_H guard. Include libunwind-ia64.h instead of libunwind.h. * configure.ac (--with-libunwind, $enable_libunwind): Don't check for libunwind.h existence. * configure, config.in: Regenerate.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure22
-rw-r--r--gdb/configure.ac6
-rw-r--r--gdb/ia64-tdep.c1
-rw-r--r--gdb/libunwind-frame.c8
-rw-r--r--gdb/libunwind-frame.h12
7 files changed, 37 insertions, 25 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0b29febbfc..0018193a56 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2012-02-21 Tristan Gingold <gingold@adacore.com>
+ Pedro Alves <palves@redhat.com>
+
+ * ia64-tdep.c: Do not include libunwind-ia64.h.
+ * libunwind-frame.h: Remove #ifdef HAVE_LIBUNWIND_H guard.
+ Include libunwind-ia64.h instead of libunwind.h.
+ * configure.ac (--with-libunwind, $enable_libunwind): Don't check
+ for libunwind.h existence.
+ * configure, config.in: Regenerate.
+
2012-02-21 Anton Gorenkov <xgsa@yandex.ru>
* c-valprint.c (c_value_print): Use value_rtti_indirect_type
diff --git a/gdb/config.in b/gdb/config.in
index bae17635a3..194cc7d26e 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -242,9 +242,6 @@
/* Define if libunwind library is being used. */
#undef HAVE_LIBUNWIND
-/* Define to 1 if you have the <libunwind.h> header file. */
-#undef HAVE_LIBUNWIND_H
-
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H
diff --git a/gdb/configure b/gdb/configure
index 2566410c10..9cb3742e8c 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8252,21 +8252,19 @@ if test "${with_libunwind+set}" = set; then :
esac
else
- for ac_header in libunwind.h libunwind-ia64.h
+ for ac_header in libunwind-ia64.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
+if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_LIBUNWIND_IA64_H 1
_ACEOF
fi
done
- if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
+ if test x"$ac_cv_header_libunwind_ia64_h" = xyes; then
enable_libunwind=yes;
fi
@@ -8274,14 +8272,12 @@ fi
if test x"$enable_libunwind" = xyes; then
- for ac_header in libunwind.h libunwind-ia64.h
+ for ac_header in libunwind-ia64.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
+if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_LIBUNWIND_IA64_H 1
_ACEOF
fi
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 1b11adb066..c4c84a0807 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -348,14 +348,14 @@ AS_HELP_STRING([--with-libunwind], [use libunwind frame unwinding support]),
no) enable_libunwind=no ;;
*) AC_MSG_ERROR(bad value ${withval} for GDB with-libunwind option) ;;
esac],[
- AC_CHECK_HEADERS(libunwind.h libunwind-ia64.h)
- if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
+ AC_CHECK_HEADERS(libunwind-ia64.h)
+ if test x"$ac_cv_header_libunwind_ia64_h" = xyes; then
enable_libunwind=yes;
fi
])
if test x"$enable_libunwind" = xyes; then
- AC_CHECK_HEADERS(libunwind.h libunwind-ia64.h)
+ AC_CHECK_HEADERS(libunwind-ia64.h)
AC_DEFINE(HAVE_LIBUNWIND, 1, [Define if libunwind library is being used.])
CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index a297eccf39..a36dc223af 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -43,7 +43,6 @@
#ifdef HAVE_LIBUNWIND_IA64_H
#include "elf/ia64.h" /* for PT_IA_64_UNWIND value */
#include "libunwind-frame.h"
-#include "libunwind-ia64.h"
/* Note: KERNEL_START is supposed to be an address which is not going
to ever contain any valid unwind info. For ia64 linux, the choice
diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c
index 893fe1ee02..f8f5289fe9 100644
--- a/gdb/libunwind-frame.c
+++ b/gdb/libunwind-frame.c
@@ -40,6 +40,14 @@
#include "complaints.h"
+/* IA-64 is the only target that currently uses libunwind-frame. Note
+ how UNW_TARGET, UNW_OBJ, etc. are compile time constants below.
+ Those come from libunwind's headers, and are target dependent.
+ Also, some of libunwind's typedefs are target dependent, as e.g.,
+ unw_word_t. If some other target wants to use this, we will need
+ to do some abstracting in order to make it possible to select which
+ libunwind we're talking to at runtime (and have one per arch). */
+
/* The following two macros are normally defined in <endian.h>.
But systems such as ia64-hpux do not provide such header, so
we just define them here if not already defined. */
diff --git a/gdb/libunwind-frame.h b/gdb/libunwind-frame.h
index 0251819058..ef98177008 100644
--- a/gdb/libunwind-frame.h
+++ b/gdb/libunwind-frame.h
@@ -19,8 +19,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_LIBUNWIND_H
-
struct frame_info;
struct frame_id;
struct regcache;
@@ -29,7 +27,13 @@ struct gdbarch;
#ifndef LIBUNWIND_FRAME_H
#define LIBUNWIND_FRAME_H 1
-#include "libunwind.h"
+/* IA-64 is the only target that currently uses libunwind. If some
+ other target wants to use it, we will need to do some abstracting
+ in order to make it possible to have more than one libunwind-frame
+ instance. Including "libunwind.h" is wrong as that ends up
+ including the libunwind-$(arch).h for the host gdb is running
+ on. */
+#include "libunwind-ia64.h"
struct libunwind_descr
{
@@ -72,5 +76,3 @@ int libunwind_get_reg_special (struct gdbarch *gdbarch,
int regnum, void *buf);
#endif /* libunwind-frame.h */
-
-#endif /* HAVE_LIBUNWIND_H */
OpenPOWER on IntegriCloud