From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5700 invoked by alias); 13 Feb 2012 08:41:09 -0000 Received: (qmail 5685 invoked by uid 22791); 13 Feb 2012 08:41:07 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Feb 2012 08:40:53 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 4095429003F; Mon, 13 Feb 2012 09:40:52 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JjLtHclUBd76; Mon, 13 Feb 2012 09:40:52 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 2DF7D290027; Mon, 13 Feb 2012 09:40:51 +0100 (CET) Subject: Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <20120211140919.GA24043@host2.jankratochvil.net> Date: Mon, 13 Feb 2012 08:41:00 -0000 Cc: Pedro Alves , "gdb-patches@sourceware.org ml" Content-Transfer-Encoding: quoted-printable Message-Id: References: <5D1CD28F-F628-475C-B6D8-5FCBF5290C63@adacore.com> <20120210182705.GA32459@host2.jankratochvil.net> <4F3562FE.7050106@redhat.com> <20120211140919.GA24043@host2.jankratochvil.net> To: Jan Kratochvil X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00234.txt.bz2 On Feb 11, 2012, at 3:09 PM, Jan Kratochvil wrote: > On Fri, 10 Feb 2012 19:33:34 +0100, Pedro Alves wrote: >> What about --enable-targets=3Dall, or --target=3Dx86_64-foo --enable-tar= get=3Dia64-xxx ? >=20 > Fixed. Looks good to me. [Although I wouldn't have cared about non-ia64 targets, as libunwind is use= d only by ia64] Tristan. >=20 >=20 > Thanks, > Jan >=20 >=20 > 2012-02-11 Jan Kratochvil > Tristan Gingold >=20 > * configure.ac (gdb_target_cpu_has_ia64): New variable. Set it for > --target and --enable-targets parameters. > (--with-libunwind=3Dauto): Set enable_libunwind for either of > libunwind.h or libunwind-ia64.h with $gdb_target_cpu_has_ia64. > * configure: Regenerate. > * libunwind-frame.h: Conditionalize the file for HAVE_LIBUNWIND and > not HAVE_LIBUNWIND_H. Include libunwind-ia64.h instead of libunwind.h > if possible. >=20 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -184,6 +184,13 @@ fi > TARGET_OBS=3D > all_targets=3D >=20 > +# Set to true if any of the supported targets uses ia64 CPU. > +# libunwind libraries can be installed for multiple architecture targets= but > +# GDB libunwind-frame.c can support only architecture. If there are mul= tiple > +# target architectures supported by libunwind prefer ia64 - while GDB can > +# unwind other architectures on its own GDB can unwind ia64 only with li= bunwind. > +gdb_target_cpu_has_ia64=3Dfalse > + > for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` > do > if test "$targ_alias" =3D "all"; then > @@ -216,6 +223,12 @@ do > if test x${want64} =3D xfalse; then > . ${srcdir}/../bfd/config.bfd > fi > + > + case "$targ" in > + ia64*) > + gdb_target_cpu_has_ia64=3Dtrue > + ;; > + esac > fi > done >=20 > @@ -241,6 +254,7 @@ if test x${all_targets} =3D xtrue; then > else > TARGET_OBS=3D'$(ALL_TARGET_OBS)' > fi > + gdb_target_cpu_has_ia64=3Dtrue > fi >=20 > AC_SUBST(TARGET_OBS) > @@ -349,8 +363,10 @@ AS_HELP_STRING([--with-libunwind], [use libunwind fr= ame unwinding support]), > *) 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" =3D xyes -a x"$ac_cv_header_libun= wind_ia64_h" =3D xyes; then > - enable_libunwind=3Dyes; > + if $gdb_target_cpu_has_ia64 && test x"$ac_cv_header_libunwind_ia64_h" = =3D xyes; then > + enable_libunwind=3Dyes > + elif test x"$ac_cv_header_libunwind_h" =3D xyes; then > + enable_libunwind=3Dyes > fi > ]) >=20 > --- a/gdb/libunwind-frame.h > +++ b/gdb/libunwind-frame.h > @@ -19,7 +19,7 @@ > You should have received a copy of the GNU General Public License > along with this program. If not, see . = */ >=20 > -#ifdef HAVE_LIBUNWIND_H > +#ifdef HAVE_LIBUNWIND >=20 > struct frame_info; > struct frame_id; > @@ -29,7 +29,13 @@ struct gdbarch; > #ifndef LIBUNWIND_FRAME_H > #define LIBUNWIND_FRAME_H 1 >=20 > -#include "libunwind.h" > +#if defined HAVE_LIBUNWIND_IA64_H > +# include "libunwind-ia64.h" > +#elif defined HAVE_LIBUNWIND_H > +# include "libunwind.h" > +#else > +# error "HAVE_LIBUNWIND && !HAVE_LIBUNWIND_IA64_H && !HAVE_LIBUNWIND_H" > +#endif >=20 > struct libunwind_descr > { > @@ -73,4 +79,4 @@ int libunwind_get_reg_special (struct gdbarch *gdbarch, >=20 > #endif /* libunwind-frame.h */ >=20 > -#endif /* HAVE_LIBUNWIND_H */ > +#endif /* HAVE_LIBUNWIND */