This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h
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