Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: Try to include libunwind-ia64.h in libunwind-frame.h
@ 2012-02-02 16:32 Tristan Gingold
  2012-02-10 12:31 ` Jan Kratochvil
  2012-02-10 18:27 ` Jan Kratochvil
  0 siblings, 2 replies; 38+ messages in thread
From: Tristan Gingold @ 2012-02-02 16:32 UTC (permalink / raw)
  To: gdb-patches@sourceware.org ml

Hi,

building a cross debugger for ia64 isn't as easy as for most other platforms.
Part of the issue is libunwind.h, which is not well designed for cross operation:

[…]

#ifndef UNW_REMOTE_ONLY

#if defined __arm__
# include "libunwind-arm.h"
#elif defined __hppa__
# include "libunwind-hppa.h"
#elif defined __ia64__
# include "libunwind-ia64.h"
#elif defined __mips__
# include "libunwind-mips.h"
#elif defined __powerpc__ && !defined __powerpc64__
# include "libunwind-ppc32.h"
#elif defined __powerpc64__
# include "libunwind-ppc64.h"
#elif defined __i386__
# include "libunwind-x86.h"
#elif defined __x86_64__
# include "libunwind-x86_64.h"
#else
# error "Unsupported arch"
#endif

[…]

Note that gdb doesn't define UNW_REMOTE_ONLY.  So clearly in my case a wrong header will be used.

I propose to fix this issue with the following patch: it includes libunwind-ia64.h if HAVE_LIBUNWIND_IA64_H is defined.
This is not perfect as libunwind-ia64.h may be detected even if not used, but will work in practice because only ia64 use libunwind.
So maybe it is a little bit over-engineered, and we could simply include libunwind-ia64.h.

(Also, the include of libunwind-ia64.h in ia64-tdep.c isn't necessary.  The reviewer will tell if s/he prefer to keep or remove this include).

Manually tested.

Ok for trunk ?

Tristan.

2012-02-02  Tristan Gingold  <gingold@adacore.com>

	* ia64-tdep.c: Do not include libunwind-ia64.h
	* libunwind-frame.h: Include libunwind-ia64.h instead of
	libunwind.h if possible.

diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index a297ecc..a36dc22 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.h b/gdb/libunwind-frame.h
index 0251819..932439b 100644
--- a/gdb/libunwind-frame.h
+++ b/gdb/libunwind-frame.h
@@ -29,7 +29,11 @@ struct gdbarch;
 #ifndef LIBUNWIND_FRAME_H
 #define LIBUNWIND_FRAME_H 1
 
+#ifdef HAVE_LIBUNWIND_IA64_H
+#include "libunwind-ia64.h"
+#else
 #include "libunwind.h"
+#endif
 
 struct libunwind_descr
 {


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-02 16:32 RFA: Try to include libunwind-ia64.h in libunwind-frame.h Tristan Gingold
@ 2012-02-10 12:31 ` Jan Kratochvil
  2012-02-10 13:15   ` Tristan Gingold
  2012-02-10 14:04   ` Tristan Gingold
  2012-02-10 18:27 ` Jan Kratochvil
  1 sibling, 2 replies; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-10 12:31 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: gdb-patches@sourceware.org ml

On Thu, 02 Feb 2012 17:32:39 +0100, Tristan Gingold wrote:
> building a cross debugger for ia64 isn't as easy as for most other platforms.
> Part of the issue is libunwind.h, which is not well designed for cross operation:

Which libunwind do you test GDB against?  I cannot build libunwind HEAD as
cross:
./configure --target=ia64-linux
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... ia64-unknown-linux-gnu

In file included from ../include/tdep-x86_64/libunwind_i.h:39:0,
                 from ../include/tdep/libunwind_i.h:19,
                 from ../include/libunwind_i.h:312,
                 from ia64/mk_Gcursor_i.c:30:
../include/dwarf.h:41:26: fatal error: dwarf-config.h: No such file or directory

I do not see any pending fixes for it at <libunwind-devel@nongnu.org>.

I did not check much the GDB patch, IMO libunwind should be fixed first
instead, shouldn't it?


Thanks,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 12:31 ` Jan Kratochvil
@ 2012-02-10 13:15   ` Tristan Gingold
  2012-02-10 13:21     ` Jan Kratochvil
  2012-02-10 13:27     ` Joel Brobecker
  2012-02-10 14:04   ` Tristan Gingold
  1 sibling, 2 replies; 38+ messages in thread
From: Tristan Gingold @ 2012-02-10 13:15 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches@sourceware.org ml, Joel Brobecker


On Feb 10, 2012, at 1:30 PM, Jan Kratochvil wrote:

> On Thu, 02 Feb 2012 17:32:39 +0100, Tristan Gingold wrote:
>> building a cross debugger for ia64 isn't as easy as for most other platforms.
>> Part of the issue is libunwind.h, which is not well designed for cross operation:
> 
> Which libunwind do you test GDB against?  I cannot build libunwind HEAD as
> cross:
> ./configure --target=ia64-linux
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... ia64-unknown-linux-gnu
> 
> In file included from ../include/tdep-x86_64/libunwind_i.h:39:0,
>                 from ../include/tdep/libunwind_i.h:19,
>                 from ../include/libunwind_i.h:312,
>                 from ia64/mk_Gcursor_i.c:30:
> ../include/dwarf.h:41:26: fatal error: dwarf-config.h: No such file or directory

Sorry, but I don't have this particular issue when building on Darwin.  YMMV :-)

> I do not see any pending fixes for it at <libunwind-devel@nongnu.org>.
> 
> I did not check much the GDB patch, IMO libunwind should be fixed first
> instead, shouldn't it?

Wouldn't be easier to get rid of libunwind, and starting from e.g. unwind-ia64.c (although they certainly share some amount of code) ?
Joel in CC:, as it wrote the HP/UX port.

Tristan.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 13:15   ` Tristan Gingold
@ 2012-02-10 13:21     ` Jan Kratochvil
  2012-02-10 13:27     ` Joel Brobecker
  1 sibling, 0 replies; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-10 13:21 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: gdb-patches@sourceware.org ml, Joel Brobecker

On Fri, 10 Feb 2012 14:15:38 +0100, Tristan Gingold wrote:
> Sorry, but I don't have this particular issue when building on Darwin.

Interesting Darwin is not affected.

Still your GDB patch seems to be a workaround of a libunwind bug.


> Wouldn't be easier to get rid of libunwind, and starting from e.g.
> unwind-ia64.c (although they certainly share some amount of code) ?

libunwind development is surprisingly active/maintained, it should not require
much contributions from GDBers.


Thanks,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 13:15   ` Tristan Gingold
  2012-02-10 13:21     ` Jan Kratochvil
@ 2012-02-10 13:27     ` Joel Brobecker
  2012-02-10 13:45       ` Tristan Gingold
  1 sibling, 1 reply; 38+ messages in thread
From: Joel Brobecker @ 2012-02-10 13:27 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: Jan Kratochvil, gdb-patches@sourceware.org ml

> Sorry, but I don't have this particular issue when building on Darwin.  YMMV :-)

I haven't been able to build the ia64 libunwind either, IIRC. I did
send some patches at the time that fixed some of the problems (that
got checked in), but there was one problem I didn't know how to fix
(it involved writing the implementation of a hook, or something like
that).

Just for the record, we use 0.98.5 for our production builds at AdaCore.
Not sure which version Tristan used, however.

> Wouldn't be easier to get rid of libunwind, and starting from e.g.
> unwind-ia64.c (although they certainly share some amount of code) ?
> Joel in CC:, as it wrote the HP/UX port.

Honestly, I do not know. I relied on code that was already written,
and I just plugged libunwind instead of using the system-provided
libunwind library.

If you can make it work, and it makes things simpler, why not (Jan
is the maintainer, so his decision, though). I think it might have
a nice side-effect, because we'd embed the code in GDB, rather than
require a libunwind library to be available on the host system.

-- 
Joel


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 13:27     ` Joel Brobecker
@ 2012-02-10 13:45       ` Tristan Gingold
  0 siblings, 0 replies; 38+ messages in thread
From: Tristan Gingold @ 2012-02-10 13:45 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Jan Kratochvil, gdb-patches@sourceware.org ml


On Feb 10, 2012, at 2:27 PM, Joel Brobecker wrote:

>> Sorry, but I don't have this particular issue when building on Darwin.  YMMV :-)
> 
> I haven't been able to build the ia64 libunwind either, IIRC. I did
> send some patches at the time that fixed some of the problems (that
> got checked in), but there was one problem I didn't know how to fix
> (it involved writing the implementation of a hook, or something like
> that).
> 
> Just for the record, we use 0.98.5 for our production builds at AdaCore.
> Not sure which version Tristan used, however.

The head.

> 
>> Wouldn't be easier to get rid of libunwind, and starting from e.g.
>> unwind-ia64.c (although they certainly share some amount of code) ?
>> Joel in CC:, as it wrote the HP/UX port.
> 
> Honestly, I do not know. I relied on code that was already written,
> and I just plugged libunwind instead of using the system-provided
> libunwind library.
> 
> If you can make it work, and it makes things simpler, why not (Jan
> is the maintainer, so his decision, though). I think it might have
> a nice side-effect, because we'd embed the code in GDB, rather than
> require a libunwind library to be available on the host system.

Ok.

Tristan.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 12:31 ` Jan Kratochvil
  2012-02-10 13:15   ` Tristan Gingold
@ 2012-02-10 14:04   ` Tristan Gingold
  2012-02-10 14:09     ` Jan Kratochvil
  1 sibling, 1 reply; 38+ messages in thread
From: Tristan Gingold @ 2012-02-10 14:04 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches@sourceware.org ml


On Feb 10, 2012, at 1:30 PM, Jan Kratochvil wrote:

> On Thu, 02 Feb 2012 17:32:39 +0100, Tristan Gingold wrote:
>> building a cross debugger for ia64 isn't as easy as for most other platforms.
>> Part of the issue is libunwind.h, which is not well designed for cross operation:
> 
> Which libunwind do you test GDB against?  I cannot build libunwind HEAD as
> cross:
> ./configure --target=ia64-linux
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... ia64-unknown-linux-gnu
> 
> In file included from ../include/tdep-x86_64/libunwind_i.h:39:0,
>                 from ../include/tdep/libunwind_i.h:19,
>                 from ../include/libunwind_i.h:312,
>                 from ia64/mk_Gcursor_i.c:30:
> ../include/dwarf.h:41:26: fatal error: dwarf-config.h: No such file or directory

Jan,

I cannot reproduce this on our x86-64 GNU Linux system.  See below the log.

Tristan.

$ uname -a
Linux saumur 2.6.16.21-0.8-smp #1 SMP Mon Jul 3 18:25:39 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/SuSE-release 
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10

$ git log
commit 59328832f7ee48682fcd0fd1ca0cb9cfdb32ec4a
Author: Konstantin Belousov <kib@freebsd.org>
Date:   Sun Feb 5 11:47:47 2012 +0200

    Provide the FreeBSD implementation for _UI_siglongjmp_cont on x86.
    On FreeBSD, _NSIG is at least 128, so just pass a pointer to the
    signal mask in the register.
    Add my copyright.

commit 1774384098bc52588eccf454c0d076857ad182eb
Author: Konstantin Belousov <kib@freebsd.org>
Date:   Sun Feb 5 11:42:02 2012 +0200

    FreeBSD also supports PT_GNU_STACK.

commit 29dae2171e764b885553aa6c3b9a18448790fd12
Author: Konstantin Belousov <kib@freebsd.org>
Date:   Sun Feb 5 11:40:17 2012 +0200

    Style.

commit 29b32cf142e5e1ad5f6cfa7145c774513d8f2534
Author: Konstantin Belousov <kib@freebsd.org>


$ git status
# On branch master
nothing to commit (working directory clean)

$ ./configure --target=ia64-linux
checking build system type... x86_64-suse-linux
checking host system type... x86_64-suse-linux
checking target system type... ia64-unknown-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/*.conf: No such file or directory
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/*.conf: No such file or directory
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/*.conf: No such file or directory
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether gcc and cc understand -c and -o together... yes
checking for __uc_get_grs in -luca... no
checking for library containing dlopen... -ldl
checking atomic_ops.h usability... no
checking atomic_ops.h presence... no
checking for atomic_ops.h... no
checking for ANSI C header files... (cached) yes
checking asm/ptrace_offsets.h usability... no
checking asm/ptrace_offsets.h presence... no
checking for asm/ptrace_offsets.h... no
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking ia64intrin.h usability... no
checking ia64intrin.h presence... no
checking for ia64intrin.h... no
checking sys/uc_access.h usability... no
checking sys/uc_access.h presence... no
checking for sys/uc_access.h... no
checking for unistd.h... (cached) yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for sys/types.h... (cached) yes
checking sys/procfs.h usability... yes
checking sys/procfs.h presence... yes
checking for sys/procfs.h... yes
checking sys/ptrace.h usability... yes
checking sys/ptrace.h presence... yes
checking for sys/ptrace.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking return type of signal handlers... void
checking for size_t... yes
checking for struct dl_phdr_info.dlpi_subs... yes
checking for sighandler_t... yes
checking whether PTRACE_POKEUSER is declared... yes
checking whether PTRACE_POKEDATA is declared... yes
checking whether PTRACE_TRACEME is declared... yes
checking whether PTRACE_CONT is declared... yes
checking whether PTRACE_SINGLESTEP is declared... yes
checking whether PTRACE_SYSCALL is declared... yes
checking whether PT_IO is declared... no
checking whether PT_GETREGS is declared... yes
checking whether PT_GETFPREGS is declared... yes
checking whether PT_CONTINUE is declared... yes
checking whether PT_TRACE_ME is declared... yes
checking whether PT_STEP is declared... yes
checking whether PT_SYSCALL is declared... yes
checking for working memcmp... yes
checking return type of signal handlers... (cached) void
checking for dl_iterate_phdr... yes
checking for dl_phdr_removals_counter... no
checking for dlmodinfo... no
checking for getunwind... no
checking for ttrace... no
checking for mincore... yes
checking if building with AltiVec... no
checking for build architecture... x86_64
checking for host architecture... x86_64
checking for target architecture... ia64
checking for target operating system... linux
checking for ELF helper width... 64
checking whether to include DWARF support... no
checking whether to restrict build to remote support... yes
checking whether to enable debug support... no
checking whether to enable C++ exception support... yes
checking whether to load .debug_frame sections... no
checking whether to block signals during mutex ops... yes
checking whether to validate memory addresses before use... yes
checking whether to enable msabi support... no
checking for __thread... yes
checking for Intel compiler... no
checking for library containing backtrace... none required
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating tests/check-namespace.sh
config.status: creating doc/Makefile
config.status: creating doc/common.tex
config.status: creating include/libunwind-common.h
config.status: creating include/libunwind.h
config.status: creating include/tdep/libunwind_i.h
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: executing depfiles commands

$ make
Making all in src
make[1]: Entering directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git/src'
depbase=`echo ia64/mk_Gcursor_i.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/mk_Gcursor_i.o -MD -MP -MF "$depbase.Tpo" -c -o ia64/mk_Gcursor_i.o ia64/mk_Gcursor_i.c; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2 -fexceptions -Wall -Wsign-compare   -o ia64/mk_Gcursor_i  ia64/mk_Gcursor_i.o  
gcc -g -O2 -fexceptions -Wall -Wsign-compare -o ia64/mk_Gcursor_i ia64/mk_Gcursor_i.o 
ia64/mk_Gcursor_i > Gcursor_i.h
depbase=`echo ia64/mk_Lcursor_i.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/mk_Lcursor_i.o -MD -MP -MF "$depbase.Tpo" -c -o ia64/mk_Lcursor_i.o ia64/mk_Lcursor_i.c; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2 -fexceptions -Wall -Wsign-compare   -o ia64/mk_Lcursor_i  ia64/mk_Lcursor_i.o  
gcc -g -O2 -fexceptions -Wall -Wsign-compare -o ia64/mk_Lcursor_i ia64/mk_Lcursor_i.o 
ia64/mk_Lcursor_i > Lcursor_i.h
make  all-am
make[2]: Entering directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git/src'
depbase=`echo os-linux.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT os-linux.lo -MD -MP -MF "$depbase.Tpo" -c -o os-linux.lo os-linux.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT os-linux.lo -MD -MP -MF .deps/os-linux.Tpo -c os-linux.c  -fPIC -DPIC -o .libs/os-linux.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT os-linux.lo -MD -MP -MF .deps/os-linux.Tpo -c os-linux.c -o os-linux.o >/dev/null 2>&1
depbase=`echo mi/init.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/init.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/init.lo mi/init.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/init.lo -MD -MP -MF mi/.deps/init.Tpo -c mi/init.c  -fPIC -DPIC -o mi/.libs/init.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/init.lo -MD -MP -MF mi/.deps/init.Tpo -c mi/init.c -o mi/init.o >/dev/null 2>&1
depbase=`echo mi/flush_cache.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/flush_cache.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/flush_cache.lo mi/flush_cache.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/flush_cache.lo -MD -MP -MF mi/.deps/flush_cache.Tpo -c mi/flush_cache.c  -fPIC -DPIC -o mi/.libs/flush_cache.o
mi/flush_cache.c:56:3: warning: #warning unw_flush_cache(): need a way to atomically increment an integer.
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/flush_cache.lo -MD -MP -MF mi/.deps/flush_cache.Tpo -c mi/flush_cache.c -o mi/flush_cache.o >/dev/null 2>&1
depbase=`echo mi/mempool.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/mempool.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/mempool.lo mi/mempool.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/mempool.lo -MD -MP -MF mi/.deps/mempool.Tpo -c mi/mempool.c  -fPIC -DPIC -o mi/.libs/mempool.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/mempool.lo -MD -MP -MF mi/.deps/mempool.Tpo -c mi/mempool.c -o mi/mempool.o >/dev/null 2>&1
depbase=`echo mi/strerror.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/strerror.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/strerror.lo mi/strerror.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/strerror.lo -MD -MP -MF mi/.deps/strerror.Tpo -c mi/strerror.c  -fPIC -DPIC -o mi/.libs/strerror.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/strerror.lo -MD -MP -MF mi/.deps/strerror.Tpo -c mi/strerror.c -o mi/strerror.o >/dev/null 2>&1
depbase=`echo ia64/regname.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/regname.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/regname.lo ia64/regname.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/regname.lo -MD -MP -MF ia64/.deps/regname.Tpo -c ia64/regname.c  -fPIC -DPIC -o ia64/.libs/regname.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/regname.lo -MD -MP -MF ia64/.deps/regname.Tpo -c ia64/regname.c -o ia64/regname.o >/dev/null 2>&1
depbase=`echo mi/Gdyn-extract.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdyn-extract.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gdyn-extract.lo mi/Gdyn-extract.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdyn-extract.lo -MD -MP -MF mi/.deps/Gdyn-extract.Tpo -c mi/Gdyn-extract.c  -fPIC -DPIC -o mi/.libs/Gdyn-extract.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdyn-extract.lo -MD -MP -MF mi/.deps/Gdyn-extract.Tpo -c mi/Gdyn-extract.c -o mi/Gdyn-extract.o >/dev/null 2>&1
depbase=`echo mi/Gdyn-remote.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdyn-remote.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gdyn-remote.lo mi/Gdyn-remote.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdyn-remote.lo -MD -MP -MF mi/.deps/Gdyn-remote.Tpo -c mi/Gdyn-remote.c  -fPIC -DPIC -o mi/.libs/Gdyn-remote.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdyn-remote.lo -MD -MP -MF mi/.deps/Gdyn-remote.Tpo -c mi/Gdyn-remote.c -o mi/Gdyn-remote.o >/dev/null 2>&1
depbase=`echo mi/Gfind_dynamic_proc_info.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gfind_dynamic_proc_info.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gfind_dynamic_proc_info.lo mi/Gfind_dynamic_proc_info.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gfind_dynamic_proc_info.lo -MD -MP -MF mi/.deps/Gfind_dynamic_proc_info.Tpo -c mi/Gfind_dynamic_proc_info.c  -fPIC -DPIC -o mi/.libs/Gfind_dynamic_proc_info.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gfind_dynamic_proc_info.lo -MD -MP -MF mi/.deps/Gfind_dynamic_proc_info.Tpo -c mi/Gfind_dynamic_proc_info.c -o mi/Gfind_dynamic_proc_info.o >/dev/null 2>&1
depbase=`echo mi/Gget_accessors.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_accessors.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gget_accessors.lo mi/Gget_accessors.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_accessors.lo -MD -MP -MF mi/.deps/Gget_accessors.Tpo -c mi/Gget_accessors.c  -fPIC -DPIC -o mi/.libs/Gget_accessors.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_accessors.lo -MD -MP -MF mi/.deps/Gget_accessors.Tpo -c mi/Gget_accessors.c -o mi/Gget_accessors.o >/dev/null 2>&1
depbase=`echo mi/Gget_proc_info_by_ip.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_proc_info_by_ip.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gget_proc_info_by_ip.lo mi/Gget_proc_info_by_ip.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_proc_info_by_ip.lo -MD -MP -MF mi/.deps/Gget_proc_info_by_ip.Tpo -c mi/Gget_proc_info_by_ip.c  -fPIC -DPIC -o mi/.libs/Gget_proc_info_by_ip.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_proc_info_by_ip.lo -MD -MP -MF mi/.deps/Gget_proc_info_by_ip.Tpo -c mi/Gget_proc_info_by_ip.c -o mi/Gget_proc_info_by_ip.o >/dev/null 2>&1
depbase=`echo mi/Gget_proc_name.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_proc_name.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gget_proc_name.lo mi/Gget_proc_name.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_proc_name.lo -MD -MP -MF mi/.deps/Gget_proc_name.Tpo -c mi/Gget_proc_name.c  -fPIC -DPIC -o mi/.libs/Gget_proc_name.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_proc_name.lo -MD -MP -MF mi/.deps/Gget_proc_name.Tpo -c mi/Gget_proc_name.c -o mi/Gget_proc_name.o >/dev/null 2>&1
depbase=`echo mi/Gput_dynamic_unwind_info.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gput_dynamic_unwind_info.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gput_dynamic_unwind_info.lo mi/Gput_dynamic_unwind_info.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gput_dynamic_unwind_info.lo -MD -MP -MF mi/.deps/Gput_dynamic_unwind_info.Tpo -c mi/Gput_dynamic_unwind_info.c  -fPIC -DPIC -o mi/.libs/Gput_dynamic_unwind_info.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gput_dynamic_unwind_info.lo -MD -MP -MF mi/.deps/Gput_dynamic_unwind_info.Tpo -c mi/Gput_dynamic_unwind_info.c -o mi/Gput_dynamic_unwind_info.o >/dev/null 2>&1
depbase=`echo mi/Gdestroy_addr_space.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdestroy_addr_space.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gdestroy_addr_space.lo mi/Gdestroy_addr_space.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdestroy_addr_space.lo -MD -MP -MF mi/.deps/Gdestroy_addr_space.Tpo -c mi/Gdestroy_addr_space.c  -fPIC -DPIC -o mi/.libs/Gdestroy_addr_space.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gdestroy_addr_space.lo -MD -MP -MF mi/.deps/Gdestroy_addr_space.Tpo -c mi/Gdestroy_addr_space.c -o mi/Gdestroy_addr_space.o >/dev/null 2>&1
depbase=`echo mi/Gget_reg.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_reg.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gget_reg.lo mi/Gget_reg.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_reg.lo -MD -MP -MF mi/.deps/Gget_reg.Tpo -c mi/Gget_reg.c  -fPIC -DPIC -o mi/.libs/Gget_reg.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_reg.lo -MD -MP -MF mi/.deps/Gget_reg.Tpo -c mi/Gget_reg.c -o mi/Gget_reg.o >/dev/null 2>&1
depbase=`echo mi/Gset_reg.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_reg.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gset_reg.lo mi/Gset_reg.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_reg.lo -MD -MP -MF mi/.deps/Gset_reg.Tpo -c mi/Gset_reg.c  -fPIC -DPIC -o mi/.libs/Gset_reg.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_reg.lo -MD -MP -MF mi/.deps/Gset_reg.Tpo -c mi/Gset_reg.c -o mi/Gset_reg.o >/dev/null 2>&1
depbase=`echo mi/Gget_fpreg.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_fpreg.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gget_fpreg.lo mi/Gget_fpreg.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_fpreg.lo -MD -MP -MF mi/.deps/Gget_fpreg.Tpo -c mi/Gget_fpreg.c  -fPIC -DPIC -o mi/.libs/Gget_fpreg.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gget_fpreg.lo -MD -MP -MF mi/.deps/Gget_fpreg.Tpo -c mi/Gget_fpreg.c -o mi/Gget_fpreg.o >/dev/null 2>&1
depbase=`echo mi/Gset_fpreg.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_fpreg.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gset_fpreg.lo mi/Gset_fpreg.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_fpreg.lo -MD -MP -MF mi/.deps/Gset_fpreg.Tpo -c mi/Gset_fpreg.c  -fPIC -DPIC -o mi/.libs/Gset_fpreg.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_fpreg.lo -MD -MP -MF mi/.deps/Gset_fpreg.Tpo -c mi/Gset_fpreg.c -o mi/Gset_fpreg.o >/dev/null 2>&1
depbase=`echo mi/Gset_caching_policy.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_caching_policy.lo -MD -MP -MF "$depbase.Tpo" -c -o mi/Gset_caching_policy.lo mi/Gset_caching_policy.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_caching_policy.lo -MD -MP -MF mi/.deps/Gset_caching_policy.Tpo -c mi/Gset_caching_policy.c  -fPIC -DPIC -o mi/.libs/Gset_caching_policy.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT mi/Gset_caching_policy.lo -MD -MP -MF mi/.deps/Gset_caching_policy.Tpo -c mi/Gset_caching_policy.c -o mi/Gset_caching_policy.o >/dev/null 2>&1
depbase=`echo ia64/Gcreate_addr_space.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gcreate_addr_space.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gcreate_addr_space.lo ia64/Gcreate_addr_space.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gcreate_addr_space.lo -MD -MP -MF ia64/.deps/Gcreate_addr_space.Tpo -c ia64/Gcreate_addr_space.c  -fPIC -DPIC -o ia64/.libs/Gcreate_addr_space.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gcreate_addr_space.lo -MD -MP -MF ia64/.deps/Gcreate_addr_space.Tpo -c ia64/Gcreate_addr_space.c -o ia64/Gcreate_addr_space.o >/dev/null 2>&1
depbase=`echo ia64/Gget_proc_info.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gget_proc_info.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gget_proc_info.lo ia64/Gget_proc_info.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gget_proc_info.lo -MD -MP -MF ia64/.deps/Gget_proc_info.Tpo -c ia64/Gget_proc_info.c  -fPIC -DPIC -o ia64/.libs/Gget_proc_info.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gget_proc_info.lo -MD -MP -MF ia64/.deps/Gget_proc_info.Tpo -c ia64/Gget_proc_info.c -o ia64/Gget_proc_info.o >/dev/null 2>&1
depbase=`echo ia64/Gget_save_loc.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gget_save_loc.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gget_save_loc.lo ia64/Gget_save_loc.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gget_save_loc.lo -MD -MP -MF ia64/.deps/Gget_save_loc.Tpo -c ia64/Gget_save_loc.c  -fPIC -DPIC -o ia64/.libs/Gget_save_loc.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gget_save_loc.lo -MD -MP -MF ia64/.deps/Gget_save_loc.Tpo -c ia64/Gget_save_loc.c -o ia64/Gget_save_loc.o >/dev/null 2>&1
depbase=`echo ia64/Gglobal.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gglobal.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gglobal.lo ia64/Gglobal.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gglobal.lo -MD -MP -MF ia64/.deps/Gglobal.Tpo -c ia64/Gglobal.c  -fPIC -DPIC -o ia64/.libs/Gglobal.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gglobal.lo -MD -MP -MF ia64/.deps/Gglobal.Tpo -c ia64/Gglobal.c -o ia64/Gglobal.o >/dev/null 2>&1
depbase=`echo ia64/Ginit.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Ginit.lo ia64/Ginit.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit.lo -MD -MP -MF ia64/.deps/Ginit.Tpo -c ia64/Ginit.c  -fPIC -DPIC -o ia64/.libs/Ginit.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit.lo -MD -MP -MF ia64/.deps/Ginit.Tpo -c ia64/Ginit.c -o ia64/Ginit.o >/dev/null 2>&1
depbase=`echo ia64/Ginit_local.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit_local.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Ginit_local.lo ia64/Ginit_local.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit_local.lo -MD -MP -MF ia64/.deps/Ginit_local.Tpo -c ia64/Ginit_local.c  -fPIC -DPIC -o ia64/.libs/Ginit_local.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit_local.lo -MD -MP -MF ia64/.deps/Ginit_local.Tpo -c ia64/Ginit_local.c -o ia64/Ginit_local.o >/dev/null 2>&1
depbase=`echo ia64/Ginit_remote.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit_remote.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Ginit_remote.lo ia64/Ginit_remote.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit_remote.lo -MD -MP -MF ia64/.deps/Ginit_remote.Tpo -c ia64/Ginit_remote.c  -fPIC -DPIC -o ia64/.libs/Ginit_remote.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Ginit_remote.lo -MD -MP -MF ia64/.deps/Ginit_remote.Tpo -c ia64/Ginit_remote.c -o ia64/Ginit_remote.o >/dev/null 2>&1
depbase=`echo ia64/Gis_signal_frame.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gis_signal_frame.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gis_signal_frame.lo ia64/Gis_signal_frame.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gis_signal_frame.lo -MD -MP -MF ia64/.deps/Gis_signal_frame.Tpo -c ia64/Gis_signal_frame.c  -fPIC -DPIC -o ia64/.libs/Gis_signal_frame.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gis_signal_frame.lo -MD -MP -MF ia64/.deps/Gis_signal_frame.Tpo -c ia64/Gis_signal_frame.c -o ia64/Gis_signal_frame.o >/dev/null 2>&1
depbase=`echo ia64/Gparser.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gparser.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gparser.lo ia64/Gparser.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gparser.lo -MD -MP -MF ia64/.deps/Gparser.Tpo -c ia64/Gparser.c  -fPIC -DPIC -o ia64/.libs/Gparser.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gparser.lo -MD -MP -MF ia64/.deps/Gparser.Tpo -c ia64/Gparser.c -o ia64/Gparser.o >/dev/null 2>&1
depbase=`echo ia64/Grbs.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Grbs.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Grbs.lo ia64/Grbs.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Grbs.lo -MD -MP -MF ia64/.deps/Grbs.Tpo -c ia64/Grbs.c  -fPIC -DPIC -o ia64/.libs/Grbs.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Grbs.lo -MD -MP -MF ia64/.deps/Grbs.Tpo -c ia64/Grbs.c -o ia64/Grbs.o >/dev/null 2>&1
depbase=`echo ia64/Gregs.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gregs.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gregs.lo ia64/Gregs.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gregs.lo -MD -MP -MF ia64/.deps/Gregs.Tpo -c ia64/Gregs.c  -fPIC -DPIC -o ia64/.libs/Gregs.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gregs.lo -MD -MP -MF ia64/.deps/Gregs.Tpo -c ia64/Gregs.c -o ia64/Gregs.o >/dev/null 2>&1
depbase=`echo ia64/Gresume.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gresume.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gresume.lo ia64/Gresume.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gresume.lo -MD -MP -MF ia64/.deps/Gresume.Tpo -c ia64/Gresume.c  -fPIC -DPIC -o ia64/.libs/Gresume.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gresume.lo -MD -MP -MF ia64/.deps/Gresume.Tpo -c ia64/Gresume.c -o ia64/Gresume.o >/dev/null 2>&1
depbase=`echo ia64/Gscript.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gscript.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gscript.lo ia64/Gscript.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gscript.lo -MD -MP -MF ia64/.deps/Gscript.Tpo -c ia64/Gscript.c  -fPIC -DPIC -o ia64/.libs/Gscript.o
ia64/Gscript.c: In function 'uncached_find_save_locs':
ia64/Gscript.c:260: warning: 'insn.dst' is used uninitialized in this function
ia64/Gscript.c: In function '_Uia64_find_save_locs':
ia64/Gscript.c:260: warning: 'insn.dst' is used uninitialized in this function
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gscript.lo -MD -MP -MF ia64/.deps/Gscript.Tpo -c ia64/Gscript.c -o ia64/Gscript.o >/dev/null 2>&1
depbase=`echo ia64/Gstep.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gstep.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gstep.lo ia64/Gstep.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gstep.lo -MD -MP -MF ia64/.deps/Gstep.Tpo -c ia64/Gstep.c  -fPIC -DPIC -o ia64/.libs/Gstep.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gstep.lo -MD -MP -MF ia64/.deps/Gstep.Tpo -c ia64/Gstep.c -o ia64/Gstep.o >/dev/null 2>&1
depbase=`echo ia64/Gtables.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include  -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG  -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gtables.lo -MD -MP -MF "$depbase.Tpo" -c -o ia64/Gtables.lo ia64/Gtables.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gtables.lo -MD -MP -MF ia64/.deps/Gtables.Tpo -c ia64/Gtables.c  -fPIC -DPIC -o ia64/.libs/Gtables.o
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-ia64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT ia64/Gtables.lo -MD -MP -MF ia64/.deps/Gtables.Tpo -c ia64/Gtables.c -o ia64/Gtables.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2 -fexceptions -Wall -Wsign-compare   -o libunwind-ia64.la -rpath /usr/local/lib -XCClinker -nostartfiles -version-info 8:0:0		 os-linux.lo mi/init.lo mi/flush_cache.lo mi/mempool.lo mi/strerror.lo ia64/regname.lo mi/Gdyn-extract.lo mi/Gdyn-remote.lo mi/Gfind_dynamic_proc_info.lo mi/Gget_accessors.lo mi/Gget_proc_info_by_ip.lo mi/Gget_proc_name.lo mi/Gput_dynamic_unwind_info.lo mi/Gdestroy_addr_space.lo mi/Gget_reg.lo mi/Gset_reg.lo mi/Gget_fpreg.lo mi/Gset_fpreg.lo mi/Gset_caching_policy.lo ia64/Gcreate_addr_space.lo ia64/Gget_proc_info.lo ia64/Gget_save_loc.lo ia64/Gglobal.lo ia64/Ginit.lo ia64/Ginit_local.lo ia64/Ginit_remote.lo ia64/Ginstall_cursor.lo ia64/Gis_signal_frame.lo ia64/Gparser.lo ia64/Grbs.lo ia64/Gregs.lo ia64/Gresume.lo ia64/Gscript.lo ia64/Gstep.lo ia64/Gtables.lo libunwind-elf64.la  
rm -fr  .libs/libunwind-ia64.a .libs/libunwind-ia64.la .libs/libunwind-ia64.lai .libs/libunwind-ia64.so .libs/libunwind-ia64.so.8 .libs/libunwind-ia64.so.8.0.0
gcc -shared  .libs/os-linux.o mi/.libs/init.o mi/.libs/flush_cache.o mi/.libs/mempool.o mi/.libs/strerror.o ia64/.libs/regname.o mi/.libs/Gdyn-extract.o mi/.libs/Gdyn-remote.o mi/.libs/Gfind_dynamic_proc_info.o mi/.libs/Gget_accessors.o mi/.libs/Gget_proc_info_by_ip.o mi/.libs/Gget_proc_name.o mi/.libs/Gput_dynamic_unwind_info.o mi/.libs/Gdestroy_addr_space.o mi/.libs/Gget_reg.o mi/.libs/Gset_reg.o mi/.libs/Gget_fpreg.o mi/.libs/Gset_fpreg.o mi/.libs/Gset_caching_policy.o ia64/.libs/Gcreate_addr_space.o ia64/.libs/Gget_proc_info.o ia64/.libs/Gget_save_loc.o ia64/.libs/Gglobal.o ia64/.libs/Ginit.o ia64/.libs/Ginit_local.o ia64/.libs/Ginit_remote.o ia64/.libs/Ginstall_cursor.o ia64/.libs/Gis_signal_frame.o ia64/.libs/Gparser.o ia64/.libs/Grbs.o ia64/.libs/Gregs.o ia64/.libs/Gresume.o ia64/.libs/Gscript.o ia64/.libs/Gstep.o ia64/.libs/Gtables.o -Wl,--whole-archive ./.libs/libunwind-elf64.a -Wl,--no-whole-archive   -nostartfiles -Wl,-soname -Wl,libunwind-ia64.so.8 -o .libs/libunwind-ia64.so.8.0.0
(cd .libs && rm -f libunwind-ia64.so.8 && ln -s libunwind-ia64.so.8.0.0 libunwind-ia64.so.8)
(cd .libs && rm -f libunwind-ia64.so && ln -s libunwind-ia64.so.8.0.0 libunwind-ia64.so)
rm -fr .libs/libunwind-ia64.lax
mkdir .libs/libunwind-ia64.lax
rm -fr .libs/libunwind-ia64.lax/libunwind-elf64.a
mkdir .libs/libunwind-ia64.lax/libunwind-elf64.a
(cd .libs/libunwind-ia64.lax/libunwind-elf64.a && ar x /homes/gingold/Repositories/fsf/libunwind.git/src/./.libs/libunwind-elf64.a)
ar cru .libs/libunwind-ia64.a  os-linux.o mi/init.o mi/flush_cache.o mi/mempool.o mi/strerror.o ia64/regname.o mi/Gdyn-extract.o mi/Gdyn-remote.o mi/Gfind_dynamic_proc_info.o mi/Gget_accessors.o mi/Gget_proc_info_by_ip.o mi/Gget_proc_name.o mi/Gput_dynamic_unwind_info.o mi/Gdestroy_addr_space.o mi/Gget_reg.o mi/Gset_reg.o mi/Gget_fpreg.o mi/Gset_fpreg.o mi/Gset_caching_policy.o ia64/Gcreate_addr_space.o ia64/Gget_proc_info.o ia64/Gget_save_loc.o ia64/Gglobal.o ia64/Ginit.o ia64/Ginit_local.o ia64/Ginit_remote.o ia64/Ginstall_cursor.o ia64/Gis_signal_frame.o ia64/Gparser.o ia64/Grbs.o ia64/Gregs.o ia64/Gresume.o ia64/Gscript.o ia64/Gstep.o ia64/Gtables.o  .libs/libunwind-ia64.lax/libunwind-elf64.a/elf64.o 
ranlib .libs/libunwind-ia64.a
rm -fr .libs/libunwind-ia64.lax
creating libunwind-ia64.la
(cd .libs && rm -f libunwind-ia64.la && ln -s ../libunwind-ia64.la libunwind-ia64.la)
make[2]: Leaving directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git/src'
make[1]: Leaving directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git/src'
Making all in tests
make[1]: Entering directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git/tests'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git/tests'
Making all in doc
make[1]: Entering directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git/doc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git/doc'
make[1]: Entering directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/nfs/tolbiac/tolbiac.a/homes/gingold/Repositories/fsf/libunwind.git'



^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 14:04   ` Tristan Gingold
@ 2012-02-10 14:09     ` Jan Kratochvil
  2012-02-10 14:14       ` Tristan Gingold
  0 siblings, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-10 14:09 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: gdb-patches@sourceware.org ml

On Fri, 10 Feb 2012 15:04:20 +0100, Tristan Gingold wrote:
> I cannot reproduce this on our x86-64 GNU Linux system.  See below the log.

Also builds OK here now; I am sorry, the previous attempt was accidentally
with 1.0.1 and not with libunwind HEAD.


Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 14:09     ` Jan Kratochvil
@ 2012-02-10 14:14       ` Tristan Gingold
  0 siblings, 0 replies; 38+ messages in thread
From: Tristan Gingold @ 2012-02-10 14:14 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches@sourceware.org ml


On Feb 10, 2012, at 3:09 PM, Jan Kratochvil wrote:

> On Fri, 10 Feb 2012 15:04:20 +0100, Tristan Gingold wrote:
>> I cannot reproduce this on our x86-64 GNU Linux system.  See below the log.
> 
> Also builds OK here now; I am sorry, the previous attempt was accidentally
> with 1.0.1 and not with libunwind HEAD.

No problem.  I was somewhat puzzled because I vaguely remembered compiling it on linux without remembering of such an issue.

Tristan.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-02 16:32 RFA: Try to include libunwind-ia64.h in libunwind-frame.h Tristan Gingold
  2012-02-10 12:31 ` Jan Kratochvil
@ 2012-02-10 18:27 ` Jan Kratochvil
  2012-02-10 18:34   ` Pedro Alves
  1 sibling, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-10 18:27 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: gdb-patches@sourceware.org ml

On Thu, 02 Feb 2012 17:32:39 +0100, Tristan Gingold wrote:
> Part of the issue is libunwind.h, which is not well designed for cross operation:
+
> Note that gdb doesn't define UNW_REMOTE_ONLY.  So clearly in my case a wrong header will be used.

[ BTW could you wrap mails to 78-80 chars per line? ]


> I propose to fix this issue with the following patch:

It still did not build for me as it expects libunwind.h installed which
cross-build of libunwind does not install.

OK this patch instead?

For the test with libunwind HEAD I had to patch .so.7 -> .so.8 in GDB, posted
to
	http://lists.nongnu.org/archive/html/libunwind-devel
as
	[Libunwind-devel] .so version bump .7 -> .8 [Re: libunwind 1.0.1]
and for cross-built libunwind I had to fix and post
	[Libunwind-devel] [patch] Fix undefined symbol: _Uelf64_valid_object

Tested only the cross-build + successful dlopen, not with real ia64 target,
though.


Thanks,
Jan


2012-02-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Tristan Gingold  <gingold@adacore.com>

	* configure.ac (--with-libunwind=auto): Set enable_libunwind for
	either of libunwind.h or libunwind-ia64.h (if ia64* is the target).
	* 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.

--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -349,8 +349,14 @@ AS_HELP_STRING([--with-libunwind], [use libunwind frame 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" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
+  if test x"$ac_cv_header_libunwind_h" = xyes; then
     enable_libunwind=yes;
+  elif test x"$ac_cv_header_libunwind_ia64_h" = xyes; then
+    case "$target" in
+      ia64*)
+	enable_libunwind=yes;
+	;;
+    esac
   fi
 ])
    
--- 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 <http://www.gnu.org/licenses/>.  */
 
-#ifdef HAVE_LIBUNWIND_H
+#ifdef HAVE_LIBUNWIND
 
 struct frame_info;
 struct frame_id;
@@ -29,7 +29,13 @@ struct gdbarch;
 #ifndef LIBUNWIND_FRAME_H
 #define LIBUNWIND_FRAME_H 1
 
-#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
 
 struct libunwind_descr
 {
@@ -73,4 +79,4 @@ int libunwind_get_reg_special (struct gdbarch *gdbarch,
 
 #endif /* libunwind-frame.h */
 
-#endif /* HAVE_LIBUNWIND_H  */
+#endif /* HAVE_LIBUNWIND */


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 18:27 ` Jan Kratochvil
@ 2012-02-10 18:34   ` Pedro Alves
  2012-02-10 18:44     ` Jan Kratochvil
  2012-02-11 14:10     ` Jan Kratochvil
  0 siblings, 2 replies; 38+ messages in thread
From: Pedro Alves @ 2012-02-10 18:34 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/10/2012 06:27 PM, Jan Kratochvil wrote:
> +++ b/gdb/configure.ac
> @@ -349,8 +349,14 @@ AS_HELP_STRING([--with-libunwind], [use libunwind frame 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" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
> +  if test x"$ac_cv_header_libunwind_h" = xyes; then
>      enable_libunwind=yes;
> +  elif test x"$ac_cv_header_libunwind_ia64_h" = xyes; then
> +    case "$target" in
> +      ia64*)
> +	enable_libunwind=yes;
> +	;;
> +    esac
>    fi
>  ])
>     

What about --enable-targets=all, or --target=x86_64-foo --enable-target=ia64-xxx ?

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 18:34   ` Pedro Alves
@ 2012-02-10 18:44     ` Jan Kratochvil
  2012-02-10 18:59       ` Pedro Alves
  2012-02-11 14:10     ` Jan Kratochvil
  1 sibling, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-10 18:44 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Fri, 10 Feb 2012 19:33:34 +0100, Pedro Alves wrote:
> What about --enable-targets=all, or --target=x86_64-foo --enable-target=ia64-xxx ?

I forgot to add a note that this solution is far from perfect.  But I find
such general libunwind support outside of the scope of this patch.  This patch
just tries to:
 * fix libunwind support for ia64 natively
 * fix libunwind support for ia64 cross
 * keep libunwind for non-ia64 support in non-regressing somehow working state

Personally I do not think it makes sense to use libunwind with gdb for
non-ia64.  GDB can unwind on its own there.

But thanks noticing this imperfectness of the patch.


Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 18:44     ` Jan Kratochvil
@ 2012-02-10 18:59       ` Pedro Alves
  2012-02-10 19:38         ` Jan Kratochvil
  0 siblings, 1 reply; 38+ messages in thread
From: Pedro Alves @ 2012-02-10 18:59 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/10/2012 06:43 PM, Jan Kratochvil wrote:
> On Fri, 10 Feb 2012 19:33:34 +0100, Pedro Alves wrote:
>> What about --enable-targets=all, or --target=x86_64-foo --enable-target=ia64-xxx ?
> 
> I forgot to add a note that this solution is far from perfect.  But I find
> such general libunwind support outside of the scope of this patch.  This patch
> just tries to:
>  * fix libunwind support for ia64 natively
>  * fix libunwind support for ia64 cross
>  * keep libunwind for non-ia64 support in non-regressing somehow working state

I wasn't pointing at anything related to making libunwind of general
use.  The issue is that you're using $target to detect when to include
libunwind-ia64.h.  That's broken for the --enable-targets=all,
or --target=x86_64-foo --enable-target=ia64-xxx cases, when --target is _not_
ia64-*.  That is, it looks to me that the fix should be to make sure we include
libunwind-ia64.h in ia64 relative code, no matter the $target.  Or maybe I missed
something?

> 
> Personally I do not think it makes sense to use libunwind with gdb for
> non-ia64.  GDB can unwind on its own there.

That's not what I was talking about.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 18:59       ` Pedro Alves
@ 2012-02-10 19:38         ` Jan Kratochvil
  0 siblings, 0 replies; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-10 19:38 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Fri, 10 Feb 2012 19:58:38 +0100, Pedro Alves wrote:
> The issue is that you're using $target to detect when to include
> libunwind-ia64.h.  That's broken for the --enable-targets=all, or
> --target=x86_64-foo --enable-target=ia64-xxx cases, when --target is _not_
> ia64-*.

OK, you are right, I thought it is good enough but I agree it is not.


> That is, it looks to me that the fix should be to make sure we include
> libunwind-ia64.h in ia64 relative code, no matter the $target.

The libunwind interface in GDB (libunwind-frame.c) is not ia64 specific in any
way.  And while you can have libunwind-ia64.so, libunwind-x86_64.so and others
installed in parallel libunwind-frame.c has only one instance in GDB and can
load only one of these.

Also the architecture of libunwind is not directly mapped from configure
architectures.  For example libunwind has x86, GDB has i386.


Maybe Tristan could prepare a better patch?


Thanks,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-10 18:34   ` Pedro Alves
  2012-02-10 18:44     ` Jan Kratochvil
@ 2012-02-11 14:10     ` Jan Kratochvil
  2012-02-13  8:41       ` Tristan Gingold
  2012-02-13 18:58       ` Pedro Alves
  1 sibling, 2 replies; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-11 14:10 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Fri, 10 Feb 2012 19:33:34 +0100, Pedro Alves wrote:
> What about --enable-targets=all, or --target=x86_64-foo --enable-target=ia64-xxx ?

Fixed.


Thanks,
Jan


2012-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Tristan Gingold  <gingold@adacore.com>

	* configure.ac (gdb_target_cpu_has_ia64): New variable.  Set it for
	--target and --enable-targets parameters.
	(--with-libunwind=auto): 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.

--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -184,6 +184,13 @@ fi
 TARGET_OBS=
 all_targets=
 
+# 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 multiple
+# target architectures supported by libunwind prefer ia64 - while GDB can
+# unwind other architectures on its own GDB can unwind ia64 only with libunwind.
+gdb_target_cpu_has_ia64=false
+
 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
 do
   if test "$targ_alias" = "all"; then
@@ -216,6 +223,12 @@ do
     if test x${want64} = xfalse; then
       . ${srcdir}/../bfd/config.bfd
     fi
+
+    case "$targ" in
+      ia64*)
+	gdb_target_cpu_has_ia64=true
+	;;
+    esac
   fi
 done
 
@@ -241,6 +254,7 @@ if test x${all_targets} = xtrue; then
   else
     TARGET_OBS='$(ALL_TARGET_OBS)'
   fi
+  gdb_target_cpu_has_ia64=true
 fi
 
 AC_SUBST(TARGET_OBS)
@@ -349,8 +363,10 @@ AS_HELP_STRING([--with-libunwind], [use libunwind frame 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" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
-    enable_libunwind=yes;
+  if $gdb_target_cpu_has_ia64 && test x"$ac_cv_header_libunwind_ia64_h" = xyes; then
+    enable_libunwind=yes
+  elif test x"$ac_cv_header_libunwind_h" = xyes; then
+    enable_libunwind=yes
   fi
 ])
    
--- 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 <http://www.gnu.org/licenses/>.  */
 
-#ifdef HAVE_LIBUNWIND_H
+#ifdef HAVE_LIBUNWIND
 
 struct frame_info;
 struct frame_id;
@@ -29,7 +29,13 @@ struct gdbarch;
 #ifndef LIBUNWIND_FRAME_H
 #define LIBUNWIND_FRAME_H 1
 
-#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
 
 struct libunwind_descr
 {
@@ -73,4 +79,4 @@ int libunwind_get_reg_special (struct gdbarch *gdbarch,
 
 #endif /* libunwind-frame.h */
 
-#endif /* HAVE_LIBUNWIND_H  */
+#endif /* HAVE_LIBUNWIND */


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-11 14:10     ` Jan Kratochvil
@ 2012-02-13  8:41       ` Tristan Gingold
  2012-02-13 18:58       ` Pedro Alves
  1 sibling, 0 replies; 38+ messages in thread
From: Tristan Gingold @ 2012-02-13  8:41 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Pedro Alves, gdb-patches@sourceware.org ml


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=all, or --target=x86_64-foo --enable-target=ia64-xxx ?
> 
> Fixed.

Looks good to me.
[Although I wouldn't have cared about non-ia64 targets, as libunwind is used only by ia64]

Tristan.

> 
> 
> Thanks,
> Jan
> 
> 
> 2012-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 	    Tristan Gingold  <gingold@adacore.com>
> 
> 	* configure.ac (gdb_target_cpu_has_ia64): New variable.  Set it for
> 	--target and --enable-targets parameters.
> 	(--with-libunwind=auto): 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.
> 
> --- a/gdb/configure.ac
> +++ b/gdb/configure.ac
> @@ -184,6 +184,13 @@ fi
> TARGET_OBS=
> all_targets=
> 
> +# 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 multiple
> +# target architectures supported by libunwind prefer ia64 - while GDB can
> +# unwind other architectures on its own GDB can unwind ia64 only with libunwind.
> +gdb_target_cpu_has_ia64=false
> +
> for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
> do
>   if test "$targ_alias" = "all"; then
> @@ -216,6 +223,12 @@ do
>     if test x${want64} = xfalse; then
>       . ${srcdir}/../bfd/config.bfd
>     fi
> +
> +    case "$targ" in
> +      ia64*)
> +	gdb_target_cpu_has_ia64=true
> +	;;
> +    esac
>   fi
> done
> 
> @@ -241,6 +254,7 @@ if test x${all_targets} = xtrue; then
>   else
>     TARGET_OBS='$(ALL_TARGET_OBS)'
>   fi
> +  gdb_target_cpu_has_ia64=true
> fi
> 
> AC_SUBST(TARGET_OBS)
> @@ -349,8 +363,10 @@ AS_HELP_STRING([--with-libunwind], [use libunwind frame 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" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
> -    enable_libunwind=yes;
> +  if $gdb_target_cpu_has_ia64 && test x"$ac_cv_header_libunwind_ia64_h" = xyes; then
> +    enable_libunwind=yes
> +  elif test x"$ac_cv_header_libunwind_h" = xyes; then
> +    enable_libunwind=yes
>   fi
> ])
> 
> --- 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 <http://www.gnu.org/licenses/>.  */
> 
> -#ifdef HAVE_LIBUNWIND_H
> +#ifdef HAVE_LIBUNWIND
> 
> struct frame_info;
> struct frame_id;
> @@ -29,7 +29,13 @@ struct gdbarch;
> #ifndef LIBUNWIND_FRAME_H
> #define LIBUNWIND_FRAME_H 1
> 
> -#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
> 
> struct libunwind_descr
> {
> @@ -73,4 +79,4 @@ int libunwind_get_reg_special (struct gdbarch *gdbarch,
> 
> #endif /* libunwind-frame.h */
> 
> -#endif /* HAVE_LIBUNWIND_H  */
> +#endif /* HAVE_LIBUNWIND */


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-11 14:10     ` Jan Kratochvil
  2012-02-13  8:41       ` Tristan Gingold
@ 2012-02-13 18:58       ` Pedro Alves
  2012-02-13 19:03         ` Jan Kratochvil
  1 sibling, 1 reply; 38+ messages in thread
From: Pedro Alves @ 2012-02-13 18:58 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/11/2012 02:09 PM, Jan Kratochvil wrote:

> -#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
>  

Looks okay.  I don't understand why we ever include "libunwind.h" though.
libunwind is only ever used by ia64 currently.  If some other target wanting to use
libunwind shows up, then we'll need to include libunwind-fooarch.h instead to interact
with the libunwind for that arch, and somehow make libunwind-frame.h|c support more than
one libunwind instance.  IOW, "libunwind.h" will always be conceptually wrong for gdb.  Was
it needed on some older version of libunwind, perhaps?

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-13 18:58       ` Pedro Alves
@ 2012-02-13 19:03         ` Jan Kratochvil
  2012-02-13 19:20           ` Pedro Alves
  0 siblings, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-13 19:03 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Mon, 13 Feb 2012 19:57:27 +0100, Pedro Alves wrote:
> I don't understand why we ever include "libunwind.h" though.

> libunwind is only ever used by ia64 currently.

It is required for ia64 but it can be used even with non-ia64 archs.

I do not have it tested, though.  I will test it before a check-in.


> If some other target wanting to use libunwind shows up, then we'll need to
> include libunwind-fooarch.h instead

For native configuration libunwind.h includes the right libunwind-fooarch.h
for us.
	/usr/include/libunwind.h
	#if defined __arm__
	# include "libunwind-arm.h"
	#elif defined __hppa__
	# include "libunwind-hppa.h"
	[...]

The cross-build does not work for ia64 well this way, though.  So libunwind
for non-ia64 works even in the non-cross mode.  This is the part I did not
want to start implementing as it may get all more complex.


> IOW, "libunwind.h" will always be conceptually wrong for gdb.

libunwind has pretty active development, I can imaging libunwind developers
/ enthusiasts would like to use it for GDB on x86*.


Thanks,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-13 19:03         ` Jan Kratochvil
@ 2012-02-13 19:20           ` Pedro Alves
  2012-02-13 19:27             ` Jan Kratochvil
  0 siblings, 1 reply; 38+ messages in thread
From: Pedro Alves @ 2012-02-13 19:20 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/13/2012 07:02 PM, Jan Kratochvil wrote:
> On Mon, 13 Feb 2012 19:57:27 +0100, Pedro Alves wrote:
>> I don't understand why we ever include "libunwind.h" though.
> 
>> libunwind is only ever used by ia64 currently.
> 
> It is required for ia64 but it can be used even with non-ia64 archs.

How?  AFAICS, no other target installs the libunwind sniffer.  It's just
dead code on other archs, if I'm reading the code correctly.

> I do not have it tested, though.  I will test it before a check-in.
> 
> 
>> If some other target wanting to use libunwind shows up, then we'll need to
>> include libunwind-fooarch.h instead
> 
> For native configuration libunwind.h includes the right libunwind-fooarch.h
> for us.
> 	/usr/include/libunwind.h
> 	#if defined __arm__
> 	# include "libunwind-arm.h"
> 	#elif defined __hppa__
> 	# include "libunwind-hppa.h"
> 	[...]
> 
> The cross-build does not work for ia64 well this way, though.  So libunwind
> for non-ia64 works even in the non-cross mode.  This is the part I did not
> want to start implementing as it may get all more complex.

Sure.  We don't make sure to include (literaly) "libunwind.h" only when
native, so it's conceptually wrong to include it in target dependent files.

> 
>> IOW, "libunwind.h" will always be conceptually wrong for gdb.
> 
> libunwind has pretty active development, I can imaging libunwind developers
> / enthusiasts would like to use it for GDB on x86*.

I did not say libunwind the library itself is conceptually wrong.  :-)  I'm talking
about including the literal "libunwind.h" header.  Including the literal
"libunwind.h" file directly will always be conceptually wrong for gdb, because
that includes the libunwind header for the host gdb is running on.  The right
conceptual model for gdb is to always treat libunwind as remote/cross, and
thus always include the arch specific libunwind-foo.h header.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-13 19:20           ` Pedro Alves
@ 2012-02-13 19:27             ` Jan Kratochvil
  2012-02-13 20:05               ` Pedro Alves
  0 siblings, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-13 19:27 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Mon, 13 Feb 2012 20:19:45 +0100, Pedro Alves wrote:
> On 02/13/2012 07:02 PM, Jan Kratochvil wrote:
> > It is required for ia64 but it can be used even with non-ia64 archs.
> 
> How?  AFAICS, no other target installs the libunwind sniffer.  It's just
> dead code on other archs, if I'm reading the code correctly.

I see now.  I did not know.  Sure in this case this patch of mine was wrong.
I will therefore make libunwind usable only with ia64, this will be different
patch removing some parts of gdb/ code.

Sure welcome if Tristan would make it.


Thanks,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-13 19:27             ` Jan Kratochvil
@ 2012-02-13 20:05               ` Pedro Alves
  2012-02-14  7:28                 ` Jan Kratochvil
  0 siblings, 1 reply; 38+ messages in thread
From: Pedro Alves @ 2012-02-13 20:05 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/13/2012 07:26 PM, Jan Kratochvil wrote:
> On Mon, 13 Feb 2012 20:19:45 +0100, Pedro Alves wrote:
>> On 02/13/2012 07:02 PM, Jan Kratochvil wrote:
>>> It is required for ia64 but it can be used even with non-ia64 archs.
>>
>> How?  AFAICS, no other target installs the libunwind sniffer.  It's just
>> dead code on other archs, if I'm reading the code correctly.
> 
> I see now.  I did not know.  Sure in this case this patch of mine was wrong.
> I will therefore make libunwind usable only with ia64, this will be different
> patch removing some parts of gdb/ code.

I was only thinking of the below.  Would this work for everyone?

I don't have a cross build of libunwind for ia64 handy, but I assume
this works, given the previous patches...

2012-02-13  Tristan Gingold  <gingold@adacore.com>
	    Pedro Alves  <palves@redhat.com>

	* ia64-tdep.c: Do not include libunwind-ia64.h.
	* libunwind-frame.h: 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.
---

 gdb/config.in         |    3 ---
 gdb/configure         |   22 +++++++++-------------
 gdb/configure.ac      |    6 +++---
 gdb/ia64-tdep.c       |    1 -
 gdb/libunwind-frame.h |    7 ++++++-
 5 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/gdb/config.in b/gdb/config.in
index bae1763..194cc7d 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 2566410..96a82ee 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 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 1b11adb..f7c987d 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 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 a297ecc..a36dc22 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.h b/gdb/libunwind-frame.h
index 0251819..922fdcb 100644
--- a/gdb/libunwind-frame.h
+++ b/gdb/libunwind-frame.h
@@ -29,7 +29,12 @@ struct gdbarch;
 #ifndef LIBUNWIND_FRAME_H
 #define LIBUNWIND_FRAME_H 1

-#include "libunwind.h"
+/* IA64 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 picks up the
+   version for the host gdb is running on.  */
+#include "libunwind-ia64.h"

 struct libunwind_descr
 {


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-13 20:05               ` Pedro Alves
@ 2012-02-14  7:28                 ` Jan Kratochvil
  2012-02-14 12:14                   ` Pedro Alves
  0 siblings, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-14  7:28 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Mon, 13 Feb 2012 21:04:44 +0100, Pedro Alves wrote:
> On 02/13/2012 07:26 PM, Jan Kratochvil wrote:
> > On Mon, 13 Feb 2012 20:19:45 +0100, Pedro Alves wrote:
> >> On 02/13/2012 07:02 PM, Jan Kratochvil wrote:
> >>> It is required for ia64 but it can be used even with non-ia64 archs.
> >>
> >> How?  AFAICS, no other target installs the libunwind sniffer.  It's just
> >> dead code on other archs, if I'm reading the code correctly.
> > 
> > I see now.  I did not know.  Sure in this case this patch of mine was wrong.
> > I will therefore make libunwind usable only with ia64, this will be different
> > patch removing some parts of gdb/ code.
> 
> I was only thinking of the below.  Would this work for everyone?
> 
> I don't have a cross build of libunwind for ia64 handy, but I assume
> this works, given the previous patches...

the patch does not apply to HEAD, with hand-application and
CPPFLAGS="-I/tmp/libunwind-root-ia64/include" CFLAGS="-g $CPPFLAGS" LDFLAGS=-L/tmp/libunwind-root-ia64/lib ./configure --enable-targets=all

getting:

ia64-tdep.c: In function ‘ia64_pseudo_register_read’:
ia64-tdep.c:946:7: error: implicit declaration of function ‘libunwind_is_initialized’ [-Werror=implicit-function-declaration]
ia64-tdep.c:947:4: error: implicit declaration of function ‘libunwind_get_reg_special’ [-Werror=implicit-function-declaration]
config.h:
/* #undef HAVE_LIBUNWIND */
#define HAVE_LIBUNWIND_IA64_H 1

If the non-ia64 libunwind support is therefore really removed the dead code in
libunwind-frame.c should be also removed with some comments making it ia64
specific.

I believe the original goal was to make the libunwind support in GDB
arch-independent but it has been done only half-way and I agree it is OK to
make libunwind support really ia64-only.
	RFA: libunwind basic support
	http://sourceware.org/ml/gdb-patches/2003-10/msg00504.html


+  AC_CHECK_HEADERS(libunwind-ia64.h)
+  if x"$ac_cv_header_libunwind_ia64_h" = xyes; then

This should use threfore AC_CHECK_HEADER.


Regards,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-14  7:28                 ` Jan Kratochvil
@ 2012-02-14 12:14                   ` Pedro Alves
  2012-02-14 14:36                     ` Jan Kratochvil
  0 siblings, 1 reply; 38+ messages in thread
From: Pedro Alves @ 2012-02-14 12:14 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/14/2012 07:27 AM, Jan Kratochvil wrote:
> On Mon, 13 Feb 2012 21:04:44 +0100, Pedro Alves wrote:
>> On 02/13/2012 07:26 PM, Jan Kratochvil wrote:
>>> On Mon, 13 Feb 2012 20:19:45 +0100, Pedro Alves wrote:
>>>> On 02/13/2012 07:02 PM, Jan Kratochvil wrote:
>>>>> It is required for ia64 but it can be used even with non-ia64 archs.
>>>>
>>>> How?  AFAICS, no other target installs the libunwind sniffer.  It's just
>>>> dead code on other archs, if I'm reading the code correctly.
>>>
>>> I see now.  I did not know.  Sure in this case this patch of mine was wrong.
>>> I will therefore make libunwind usable only with ia64, this will be different
>>> patch removing some parts of gdb/ code.
>>
>> I was only thinking of the below.  Would this work for everyone?
>>
>> I don't have a cross build of libunwind for ia64 handy, but I assume
>> this works, given the previous patches...
> 
> the patch does not apply to HEAD,

Huh.  It did for me.

>  with hand-application and CPPFLAGS="-I/tmp/libunwind-root-ia64/include" CFLAGS="-g $CPPFLAGS" LDFLAGS=-L/tmp/libunwind-root-ia64/lib ./configure --enable-targets=all
> 
> getting:
> 
> ia64-tdep.c: In function ‘ia64_pseudo_register_read’:
> ia64-tdep.c:946:7: error: implicit declaration of function ‘libunwind_is_initialized’ [-Werror=implicit-function-declaration]
> ia64-tdep.c:947:4: error: implicit declaration of function ‘libunwind_get_reg_special’ [-Werror=implicit-function-declaration]

Ah.  libunwind-frame.h is wrapped in HAVE_LIBUNWIND_H...

> config.h:
> /* #undef HAVE_LIBUNWIND */
> #define HAVE_LIBUNWIND_IA64_H 1

I missed a "test" in configure.ac.

> 
> If the non-ia64 libunwind support is therefore really removed the dead code in
> libunwind-frame.c should be also removed with some comments making it ia64
> specific.

What dead code?  The code is not really ia64 specific.    The endianess checks?
I don't think it's really worth the bother.  The problem is that libunwind-frame.c
is supposedly a host|target-independent file, but you  you have things like:

/* Required function pointers from libunwind.  */
static int (*unw_get_reg_p) (unw_cursor_t *, unw_regnum_t, unw_word_t *);
static int (*unw_get_fpreg_p) (unw_cursor_t *, unw_regnum_t, unw_fpreg_t *);
static int (*unw_get_saveloc_p) (unw_cursor_t *, unw_regnum_t,
				 unw_save_loc_t *);
static int (*unw_is_signal_frame_p) (unw_cursor_t *);
static int (*unw_step_p) (unw_cursor_t *);
static int (*unw_init_remote_p) (unw_cursor_t *, unw_addr_space_t, void *);
static unw_addr_space_t (*unw_create_addr_space_p) (unw_accessors_t *, int);
static void (*unw_destroy_addr_space_p) (unw_addr_space_t);
static int (*unw_search_unwind_table_p) (unw_addr_space_t, unw_word_t,
					 unw_dyn_info_t *,
					 unw_proc_info_t *, int, void *);
static unw_word_t (*unw_find_dyn_list_p) (unw_addr_space_t, unw_dyn_info_t *,
					  void *);

/* We need to qualify the function names with a platform-specific prefix
   to match the names used by the libunwind library.  The UNW_OBJ macro is
   provided by the libunwind.h header file.  */
#define STRINGIFY2(name)	#name
#define STRINGIFY(name)		STRINGIFY2(name)

#ifndef LIBUNWIND_SO
/* Use the stable ABI major version number.  `libunwind-ia64.so' is a link time
   only library, not a runtime one.  */
#define LIBUNWIND_SO "libunwind-" STRINGIFY(UNW_TARGET) ".so.7"
#endif

static char *get_reg_name = STRINGIFY(UNW_OBJ(get_reg));
static char *get_fpreg_name = STRINGIFY(UNW_OBJ(get_fpreg));
static char *get_saveloc_name = STRINGIFY(UNW_OBJ(get_save_loc));
static char *is_signal_frame_name = STRINGIFY(UNW_OBJ(is_signal_frame));
static char *step_name = STRINGIFY(UNW_OBJ(step));
static char *init_remote_name = STRINGIFY(UNW_OBJ(init_remote));
static char *create_addr_space_name = STRINGIFY(UNW_OBJ(create_addr_space));
static char *destroy_addr_space_name = STRINGIFY(UNW_OBJ(destroy_addr_space));
static char *search_unwind_table_name
  = STRINGIFY(UNW_OBJ(search_unwind_table));
static char *find_dyn_list_name = STRINGIFY(UNW_OBJ(find_dyn_list));


and this all depends at compile time, on a specific libunwind-$arch.h header having been
included.  Also notice that the unw_word_t type appears in the libunwind-frame.h
interface.  unw_word_t is either 64-bit or 32-bit depending on which libunwind-$arch.h
header you include.  So if we cared for any other arch, we'd need to make all these
run-time dependent on the target we're talking to.  Maybe we'd add a new
libunwind-frame-$arch.c file for each arch we supported, which
included libunwind-$arch.h, and filled a structure that contained
function pointers that libunwind-frame.c would use.

We'd also have to do something about unw_word_t.  Probably export
from libunwind-frame.c two versions of the current libunwind_find_dyn_list function:

-unw_word_t libunwind_find_dyn_list (unw_addr_space_t, unw_dyn_info_t *,  void *);
+uint32_t libunwind_find_dyn_list32 (unw_addr_space_t, unw_dyn_info_t *,  void *);
+uint64_t libunwind_find_dyn_list64 (unw_addr_space_t, unw_dyn_info_t *,  void *);

in order to have the libunwind-frame user to call the proper function in
the libunwind-$arch.so with the right prototype.

> I believe the original goal was to make the libunwind support in GDB
> arch-independent but it has been done only half-way and I agree it is OK to
> make libunwind support really ia64-only.
> 	RFA: libunwind basic support
> 	http://sourceware.org/ml/gdb-patches/2003-10/msg00504.html
> 
> 
> +  AC_CHECK_HEADERS(libunwind-ia64.h)
> +  if x"$ac_cv_header_libunwind_ia64_h" = xyes; then
> 
> This should use threfore AC_CHECK_HEADER.

AC_CHECK_HEADERS takes care of defining HAVE_HEADER_FOO_H,
AC_CHECK_HEADER does not, so AC_CHECK_HEADERS is a better fit.

This version is compile tested with current git libunwind built with --target=ia64-linux-gnu
(also --enable-targets=all), and also compile tested without libunwind headers in the
include path (and confirmed libunwind-frame.o wasn't built).

2012-02-14  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.
---

 gdb/config.in         |    3 ---
 gdb/configure         |   22 +++++++++-------------
 gdb/configure.ac      |    6 +++---
 gdb/ia64-tdep.c       |    1 -
 gdb/libunwind-frame.h |   12 +++++++-----
 5 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/gdb/config.in b/gdb/config.in
index bae1763..194cc7d 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 2566410..9cb3742 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 1b11adb..c4c84a0 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 a297ecc..a36dc22 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.h b/gdb/libunwind-frame.h
index 0251819..ef98177 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  */


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-14 12:14                   ` Pedro Alves
@ 2012-02-14 14:36                     ` Jan Kratochvil
  2012-02-14 14:53                       ` Pedro Alves
  0 siblings, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-14 14:36 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Tue, 14 Feb 2012 13:13:53 +0100, Pedro Alves wrote:
> On 02/14/2012 07:27 AM, Jan Kratochvil wrote:
> > the patch does not apply to HEAD,
> 
> Huh.  It did for me.

I expect your MUA corrupted whitespaces:

#-- head$
#++ patch$
#@ -6,7 +6,7 @@ esac],[$
     enable_libunwind=yes;$
   fi$
 ])$
-   $
+$
 if test x"$enable_libunwind" = xyes; then$
   AC_CHECK_HEADERS(libunwind.h libunwind-ia64.h)$
   AC_DEFINE(HAVE_LIBUNWIND, 1, [Define if libunwind library is being used.])$


> > If the non-ia64 libunwind support is therefore really removed the dead code in
> > libunwind-frame.c should be also removed with some comments making it ia64
> > specific.
> 
> What dead code?

At least `libunwind_frame_unwind' is dead - it has no references in the
codebase - which confused me.

Also when you change GDB design by this patch - from arch-independent
libunwind-frame.c to ia64-limited libunwind-frame.c - one should best rename
libunwind-frame.[ch] to libunwind-ia64-frame.[ch].  Otherwise at least write
some comments there this file is used only for ia64 targets now.


> The code is not really ia64 specific.

Yes, because it was designed to be possibly used in the future with arbirary
arch.


Regards,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-14 14:36                     ` Jan Kratochvil
@ 2012-02-14 14:53                       ` Pedro Alves
  2012-02-20 20:54                         ` Jan Kratochvil
  0 siblings, 1 reply; 38+ messages in thread
From: Pedro Alves @ 2012-02-14 14:53 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/14/2012 02:35 PM, Jan Kratochvil wrote:
> At least `libunwind_frame_unwind' is dead - it has no references in the
> codebase - which confused me.

It's dead for IA-64 as well.  It's likely dead for any other arch that may
want to use libunwind.  So "if the non-ia64 libunwind support is therefore
really removed the dead code in libunwind-frame.c should be also removed"
is not the right justification to remove the dead code.  If you want to
remove it, go ahead, but do it because it's dead, period.

> Also when you change GDB design by this patch - from arch-independent
> libunwind-frame.c to ia64-limited libunwind-frame.c - one should best rename
> libunwind-frame.[ch] to libunwind-ia64-frame.[ch].  Otherwise at least write
> some comments there this file is used only for ia64 targets now.

I have already added such comments to libunwind-frame.h.  The limitation that
the file is only usable by ia-64 is pre-existing.  I'm not adding anything
new, other than making the limitation _explicit_, which is a good thing.

I'm adding this comment to libunwind-frame.c

/* 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).  */

Are you fine with that?

>> > The code is not really ia64 specific.
> Yes, because it was designed to be possibly used in the future with arbirary
> arch.

I don't understand what are we discussing.  The possibility is there, but it
needs work to get there.  When the future comes, we'll have to adjust.  Right
now, nobody but IA-64 cares.  Making the limitation explicit by including
the ia64 header directly doesn't make the needed work more difficult one
single bit.  On the contrary.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-14 14:53                       ` Pedro Alves
@ 2012-02-20 20:54                         ` Jan Kratochvil
  2012-02-20 22:30                           ` Pedro Alves
  0 siblings, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-20 20:54 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Tue, 14 Feb 2012 15:52:33 +0100, Pedro Alves wrote:
> I don't understand what are we discussing.  The possibility is there, but it
> needs work to get there.  When the future comes, we'll have to adjust.  Right
> now, nobody but IA-64 cares.  Making the limitation explicit by including
> the ia64 header directly doesn't make the needed work more difficult one
> single bit.  On the contrary.

I do not understand what is the goal here now.  Therefore either

(a) Let's finish multi-arch support for libunwind.

or

(b) Let's make libunwind support ia64-exclusive.

The state is in between I have no clue what is a valid patch anymore.
I am for (b).  Any other opinions before I (or anyone else) write a patch?


Regards,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-20 20:54                         ` Jan Kratochvil
@ 2012-02-20 22:30                           ` Pedro Alves
  2012-02-20 22:37                             ` Joel Brobecker
  2012-02-21  6:48                             ` Jan Kratochvil
  0 siblings, 2 replies; 38+ messages in thread
From: Pedro Alves @ 2012-02-20 22:30 UTC (permalink / raw)
  To: Jan Kratochvil
  Cc: Pedro Alves, Tristan Gingold, gdb-patches@sourceware.org ml

On 02/20/2012 08:43 PM, Jan Kratochvil wrote:
> On Tue, 14 Feb 2012 15:52:33 +0100, Pedro Alves wrote:
>> I don't understand what are we discussing.  The possibility is there, but it
>> needs work to get there.  When the future comes, we'll have to adjust.  Right
>> now, nobody but IA-64 cares.  Making the limitation explicit by including
>> the ia64 header directly doesn't make the needed work more difficult one
>> single bit.  On the contrary.
> 
> I do not understand what is the goal here now.

Fix GDB's broken inclusion of "libunwind.h".
As I've explained before, including "libunwind.h" in GDB is _always_ wrong
for GDB.  Including the libunwind-$arch.h file directly is the right
thing to do.  That's what needs fixing.  I haven't seen any counter
argument to that.

> Therefore either
> 
> (a) Let's finish multi-arch support for libunwind.

I don't imagine how any multi-arch work we do to libunwind would make it
possible to include "libunwind.h".  But if there's a clean way to make
that work, I'd like to know about it.

But in any case, this is much more than the real need we have now.  And I
don't see why we can't fix the include problem, and do multi-arching as
follow up work as necessary.

> 
> or
> 
> (b) Let's make libunwind support ia64-exclusive.

It already is implicitly.  No other arch uses it.  If any other arch wants to
use the file, then you would have two archs in the same GDB build wanting to
use the code, so then it'd be _really_ obvious that including "libunwind.h"
doesn't work.  How would an --enable-targets=all build work?   I've added
comments to the files to make that explicitly clear.  Why invent
more work?

(c) Fix the real problem with the code, which is that it includes
"libunwind.h", when that is the wrong thing to do for GDB.

> The state is in between I have no clue what is a valid patch anymore.
> I am for (b). 

I don't see how different the result will be from today's state,
so I don't see the big benefit...  That'd take us further from being
able to use the code on other archs, but if you want to do it, fine with
me.

Any other opinions before I (or anyone else) write a patch?

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-20 22:30                           ` Pedro Alves
@ 2012-02-20 22:37                             ` Joel Brobecker
  2012-02-20 22:39                               ` Joel Brobecker
  2012-02-20 22:57                               ` Pedro Alves
  2012-02-21  6:48                             ` Jan Kratochvil
  1 sibling, 2 replies; 38+ messages in thread
From: Joel Brobecker @ 2012-02-20 22:37 UTC (permalink / raw)
  To: Pedro Alves
  Cc: Jan Kratochvil, Tristan Gingold, gdb-patches@sourceware.org ml

> Any other opinions before I (or anyone else) write a patch?

FWIW, and from what I've read, what you are saying makes sense to me.

-- 
Joel


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-20 22:37                             ` Joel Brobecker
@ 2012-02-20 22:39                               ` Joel Brobecker
  2012-02-20 22:57                               ` Pedro Alves
  1 sibling, 0 replies; 38+ messages in thread
From: Joel Brobecker @ 2012-02-20 22:39 UTC (permalink / raw)
  To: Pedro Alves
  Cc: Jan Kratochvil, Tristan Gingold, gdb-patches@sourceware.org ml

One thing I wanted to add as well is that I do not see a reason
at the moment to concern ourselves about the fact that the way
we use libunwind is ia64-exclusive. Perhaps there will be reasons
to use it with other arches (and Pedro's suggestions seem to go
in the right direction), but we can worry about it then.

-- 
Joel


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-20 22:37                             ` Joel Brobecker
  2012-02-20 22:39                               ` Joel Brobecker
@ 2012-02-20 22:57                               ` Pedro Alves
  2012-02-20 23:20                                 ` Joel Brobecker
  1 sibling, 1 reply; 38+ messages in thread
From: Pedro Alves @ 2012-02-20 22:57 UTC (permalink / raw)
  To: Joel Brobecker
  Cc: Jan Kratochvil, Tristan Gingold, gdb-patches@sourceware.org ml

On 02/20/2012 10:29 PM, Joel Brobecker wrote:
>> Any other opinions before I (or anyone else) write a patch?
> 
> FWIW, and from what I've read, what you are saying makes sense to me.

For avoidance of doubt, that sentence quoted above was written by
Jan, and I happened to drop the quote char by mistake.  IOW,
it's not clear who you're talking to.  :-)

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-20 22:57                               ` Pedro Alves
@ 2012-02-20 23:20                                 ` Joel Brobecker
  0 siblings, 0 replies; 38+ messages in thread
From: Joel Brobecker @ 2012-02-20 23:20 UTC (permalink / raw)
  To: Pedro Alves
  Cc: Jan Kratochvil, Tristan Gingold, gdb-patches@sourceware.org ml

> For avoidance of doubt, that sentence quoted above was written by
> Jan, and I happened to drop the quote char by mistake.  IOW,
> it's not clear who you're talking to.  :-)

Ah - well, it does not matter. To me, what you are saying (do not
include "libunwind.h") seems the best option forward.

-- 
Joel


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-20 22:30                           ` Pedro Alves
  2012-02-20 22:37                             ` Joel Brobecker
@ 2012-02-21  6:48                             ` Jan Kratochvil
  2012-02-21 13:36                               ` Pedro Alves
  1 sibling, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-21  6:48 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Mon, 20 Feb 2012 23:00:53 +0100, Pedro Alves wrote:
> Fix GDB's broken inclusion of "libunwind.h".
> As I've explained before, including "libunwind.h" in GDB is _always_ wrong
> for GDB.

Not in the native mode.  For example core files support on some platforms is
also supported only natively now.


> I don't imagine how any multi-arch work we do to libunwind would make it
> possible to include "libunwind.h".

For native build of GDB - which is IMO 99% of its builds - with a oneliner
patch of installing the unwinder it should work fully multi-arch.

After your patch it will be slightly more complicated patch to make the
libunwind support multi-arch (in native mode).


> But in any case, this is much more than the real need we have now.  And I
> don't see why we can't fix the include problem, and do multi-arching as
> follow up work as necessary.
+
> I don't see how different the result will be from today's state,

Currently the code has some attempt to be multi-arch, despite not yet there.
Let's say it is in 50% of the multi-arch libunwind supports.

After this limitation to ia64 it will be at 30% of the multi-arch libunwind
support.

We have already spent more time talking about it than to either making it
ia64-exclusive making the support 0% or to making the support fully multi-arch
being 100% where nobody needs to talk about it anymore.

The code in GDB which no longer makes sense but still is neither removed nor
fixed makes it difficult for any contributions, coding, reviewing, anything,
besides a few people who know what it should mean one day in the future.
This is the reason why #if 0 code can be removed as [obv].


Thanks,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-21  6:48                             ` Jan Kratochvil
@ 2012-02-21 13:36                               ` Pedro Alves
  2012-02-21 19:10                                 ` Tom Tromey
  2012-02-21 20:18                                 ` Jan Kratochvil
  0 siblings, 2 replies; 38+ messages in thread
From: Pedro Alves @ 2012-02-21 13:36 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/21/2012 05:24 AM, Jan Kratochvil wrote:
> On Mon, 20 Feb 2012 23:00:53 +0100, Pedro Alves wrote:
>> Fix GDB's broken inclusion of "libunwind.h".
>> As I've explained before, including "libunwind.h" in GDB is _always_ wrong
>> for GDB.
> 
> Not in the native mode. 

It is broken.  See Tristan's original post, or below.

> For example core files support on some platforms is
> also supported only natively now.

I don't understand the relevance of this comment.  libunwind-$arch.h works
just the same for native core files.  Except is doesn't result in a silently
broken gdb if the wrong "libunwind.h" happens to be on the include path.

>> I don't imagine how any multi-arch work we do to libunwind would make it
>> possible to include "libunwind.h".
> 
> For native build of GDB - which is IMO 99% of its builds - with a oneliner
> patch of installing the unwinder it should work fully multi-arch.
> 
> After your patch it will be slightly more complicated patch to make the
> libunwind support multi-arch (in native mode).

First, I don't understand what do you mean by multi-arch in native mode.
Multi-arch necessarily means non-native mode for at least one for
the archs in the multi set.

Second, that's not a convincing explanation at all.  Please explain how the
code will be able to choose the correct libunwind.h header for each of the
archs in the multi-arch world, given that libunwind.h is a _native_ header:

$ cat libunwind.h:
...
#if defined __arm__
# include "libunwind-arm.h"
#elif defined __hppa__
# include "libunwind-hppa.h"
#elif defined __ia64__
# include "libunwind-ia64.h"
#elif defined __mips__
# include "libunwind-mips.h"
#elif defined __powerpc__ && !defined __powerpc64__
# include "libunwind-ppc32.h"
#elif defined __powerpc64__
# include "libunwind-ppc64.h"
#elif defined __i386__
# include "libunwind-x86.h"
#elif defined __x86_64__
# include "libunwind-x86_64.h"
#else
# error "Unsupported arch"
#endif

and so necessarily at least one of the archs will be built against the
wrong header.

Third, if we wanted to restrict to using libunwind only in the native case,
and we wanted to add a second arch using libunwind-frame, my patch does not
make it worse; it makes it clearer what is necessary.  The easier path would
be to teach configure.tgt/configure.ac to define a
global -DGDB_LIBUNWIND_HEADER=libunwind-$arch.h that libunwind-frame.h|c
would include instead.  _And_, we'd need some way for the 'non --target'
arch to not use libunwind (as it would use the wrong libunwind).

Forth, nothing got worse/harder to build a native compiler.  Both
libunwind.h and libunwind-$arch.h are always installed.  So including one
or the other is the same:

$ ls /usr/include/libunwind*
/usr/include/libunwind-common.h  /usr/include/libunwind-dynamic.h  /usr/include/libunwind.h  /usr/include/libunwind-ptrace.h  /usr/include/libunwind-x86_64.h

But if we pick the right one (the $arch variant) even on native builds,
then e.g., a x64_64 x ia64 cross build will no longer work incorrectly.  A cross
build _does_ build incorrectly today because gdb will silently build
against / load the x84_64 libunwind!  That is what Tristan's original
is all about.

>> But in any case, this is much more than the real need we have now.  And I
>> don't see why we can't fix the include problem, and do multi-arching as
>> follow up work as necessary.
> +
>> I don't see how different the result will be from today's state,
> 
> Currently the code has some attempt to be multi-arch, despite not yet there.
> Let's say it is in 50% of the multi-arch libunwind supports.
> 
> After this limitation to ia64 it will be at 30% of the multi-arch libunwind
> support.

IMO, that's bogus.  Making the code multi-arch necessarily means _not including
libunwind.h anywhere, so it makes the code 70% multiarch (more than 50%, hey
I can make up stats too! :-) ).

> 
> We have already spent more time talking about it than to either making it
> ia64-exclusive making the support 0% or to making the support fully multi-arch
> being 100% where nobody needs to talk about it anymore.

We have already spent more time talking about it than committing the patch
below, which fixes the bug, and doesn't make any multi-arch work any harder.

> The code in GDB which no longer makes sense but still is neither removed nor
> fixed makes it difficult for any contributions, coding, reviewing, anything,
> besides a few people who know what it should mean one day in the future.

That's an exaggeration fallacy.  I have added comments to prevent people from
getting confused.

Besides, you can't make libunwind-frame.c ia64-exclusive (whatever that means,
though I assume basically file and function renaming) without fixing the
libunwind.h header problem.

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.

---

 gdb/config.in         |    3 ---
 gdb/configure         |   22 +++++++++-------------
 gdb/configure.ac      |    6 +++---
 gdb/ia64-tdep.c       |    1 -
 gdb/libunwind-frame.c |    8 ++++++++
 gdb/libunwind-frame.h |   12 +++++++-----
 6 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/gdb/config.in b/gdb/config.in
index bae1763..194cc7d 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 2566410..9cb3742 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 1b11adb..c4c84a0 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 a297ecc..a36dc22 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 893fe1e..f8f5289 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 0251819..ef98177 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  */


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-21 13:36                               ` Pedro Alves
@ 2012-02-21 19:10                                 ` Tom Tromey
  2012-02-22  7:56                                   ` Tristan Gingold
  2012-02-21 20:18                                 ` Jan Kratochvil
  1 sibling, 1 reply; 38+ messages in thread
From: Tom Tromey @ 2012-02-21 19:10 UTC (permalink / raw)
  To: Pedro Alves
  Cc: Jan Kratochvil, Tristan Gingold, gdb-patches@sourceware.org ml

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> Besides, you can't make libunwind-frame.c ia64-exclusive
Pedro> (whatever that means, though I assume basically file and function
Pedro> renaming) without fixing the libunwind.h header problem.

I mostly tuned out of this thread, but I am curious to know if someone
has a reason we would ever want to expand our use of libunwind.
Does it provide some benefit over gdb's built-in unwinders?

Tom


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-21 13:36                               ` Pedro Alves
  2012-02-21 19:10                                 ` Tom Tromey
@ 2012-02-21 20:18                                 ` Jan Kratochvil
  2012-02-21 20:43                                   ` Pedro Alves
  1 sibling, 1 reply; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-21 20:18 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On Tue, 21 Feb 2012 10:22:43 +0100, Pedro Alves wrote:
> First, I don't understand what do you mean by multi-arch in native mode.

"multi-" was written in a meaning of "libunwind support for native build on
non-ia64 architecture".  


> We have already spent more time talking about it than committing the patch
> below, which fixes the bug, and doesn't make any multi-arch work any harder.

I do not agree with the patch but it is very formal, one can change any code
by any number of patches.  I can submit then some change on top of it.  Such
patch would definitely conflict with ours otherwise.


Regards,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-21 20:18                                 ` Jan Kratochvil
@ 2012-02-21 20:43                                   ` Pedro Alves
  0 siblings, 0 replies; 38+ messages in thread
From: Pedro Alves @ 2012-02-21 20:43 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Tristan Gingold, gdb-patches@sourceware.org ml

On 02/21/2012 07:23 PM, Jan Kratochvil wrote:
> I do not agree with the patch but it is very formal, one can change any code
> by any number of patches.  I can submit then some change on top of it.  Such
> patch would definitely conflict with ours otherwise.

Thanks.  I've checked it in.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-21 19:10                                 ` Tom Tromey
@ 2012-02-22  7:56                                   ` Tristan Gingold
  2012-02-22 14:52                                     ` Jan Kratochvil
  0 siblings, 1 reply; 38+ messages in thread
From: Tristan Gingold @ 2012-02-22  7:56 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Pedro Alves, Jan Kratochvil, gdb-patches@sourceware.org ml


On Feb 21, 2012, at 7:08 PM, Tom Tromey wrote:

>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> Besides, you can't make libunwind-frame.c ia64-exclusive
> Pedro> (whatever that means, though I assume basically file and function
> Pedro> renaming) without fixing the libunwind.h header problem.
> 
> I mostly tuned out of this thread, but I am curious to know if someone
> has a reason we would ever want to expand our use of libunwind.
> Does it provide some benefit over gdb's built-in unwinders?

From what I understand, libunwind doesn't handle endianness, so I think the cross support is somewhat weak.

Tristan.


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
  2012-02-22  7:56                                   ` Tristan Gingold
@ 2012-02-22 14:52                                     ` Jan Kratochvil
  0 siblings, 0 replies; 38+ messages in thread
From: Jan Kratochvil @ 2012-02-22 14:52 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: Tom Tromey, Pedro Alves, gdb-patches@sourceware.org ml

On Wed, 22 Feb 2012 08:44:18 +0100, Tristan Gingold wrote:
> From what I understand, libunwind doesn't handle endianness, so I think the
> cross support is somewhat weak.

gdb/ia64-tdep.c
ia64_access_mem (unw_addr_space_t as,
                 unw_word_t addr, unw_word_t *val,
                 int write, void *arg)
  /* XXX do we need to normalize byte-order here?  */

I think so, it is always called for one unw_word_t.  But I do not know more
about it.


Regards,
Jan


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2012-02-22  7:56 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-02 16:32 RFA: Try to include libunwind-ia64.h in libunwind-frame.h Tristan Gingold
2012-02-10 12:31 ` Jan Kratochvil
2012-02-10 13:15   ` Tristan Gingold
2012-02-10 13:21     ` Jan Kratochvil
2012-02-10 13:27     ` Joel Brobecker
2012-02-10 13:45       ` Tristan Gingold
2012-02-10 14:04   ` Tristan Gingold
2012-02-10 14:09     ` Jan Kratochvil
2012-02-10 14:14       ` Tristan Gingold
2012-02-10 18:27 ` Jan Kratochvil
2012-02-10 18:34   ` Pedro Alves
2012-02-10 18:44     ` Jan Kratochvil
2012-02-10 18:59       ` Pedro Alves
2012-02-10 19:38         ` Jan Kratochvil
2012-02-11 14:10     ` Jan Kratochvil
2012-02-13  8:41       ` Tristan Gingold
2012-02-13 18:58       ` Pedro Alves
2012-02-13 19:03         ` Jan Kratochvil
2012-02-13 19:20           ` Pedro Alves
2012-02-13 19:27             ` Jan Kratochvil
2012-02-13 20:05               ` Pedro Alves
2012-02-14  7:28                 ` Jan Kratochvil
2012-02-14 12:14                   ` Pedro Alves
2012-02-14 14:36                     ` Jan Kratochvil
2012-02-14 14:53                       ` Pedro Alves
2012-02-20 20:54                         ` Jan Kratochvil
2012-02-20 22:30                           ` Pedro Alves
2012-02-20 22:37                             ` Joel Brobecker
2012-02-20 22:39                               ` Joel Brobecker
2012-02-20 22:57                               ` Pedro Alves
2012-02-20 23:20                                 ` Joel Brobecker
2012-02-21  6:48                             ` Jan Kratochvil
2012-02-21 13:36                               ` Pedro Alves
2012-02-21 19:10                                 ` Tom Tromey
2012-02-22  7:56                                   ` Tristan Gingold
2012-02-22 14:52                                     ` Jan Kratochvil
2012-02-21 20:18                                 ` Jan Kratochvil
2012-02-21 20:43                                   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox