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

Pedro Alves
2012-02-20T22:01:35Z

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