Re: RFA: Try to include libunwind-ia64.h in libunwind-frame.h

Pedro Alves
2012-02-13T18:58:06Z

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