This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unwinding through signal handlers on IA-64/Linux
- From: Jim Wilson <wilson at specifix dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 07 Nov 2005 16:28:30 -0800
- Subject: Re: Unwinding through signal handlers on IA-64/Linux
- References: <200511042036.30845.ebotcazou@adacore.com>
Eric Botcazou wrote:
It works if the unwind library is HP's libunwind (aka system libunwind) but
doesn't if the unwind library is the bundled one (config/ia64/unwind-ia64.c).
Is this the David Mosberger libunwind that you are referring to? As far
as I know, the actual HP libunwind only supports HPUX. The one David
Mosberger wrote is different from the HP libunwind implementation, and
is free software that supports linux.
Anyways, I strongly recommend using David Mosberger's libunwind
implementation. I consider any ia64 linux machine which doesn't have it
installed to be broken. The gcc libunwind is probably never going to be
as good as the one David Mosberger wrote.
That said, it would be nice to fix the gcc unwinder if we can. The code
in question is in Jakub's patch that added the MD_HANDLE_UNWABI support.
So it has been there since the beginning for this macro.
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg00940.html
I find it curious that there are some unexplained differences between
the MD_HANDLE_UNWABI and MD_FALLBACK_FRAME_STACK_FOR macros. The latter
supports fpsr for instance, and the former does not. There is also a
difference for psp. And the code at the end of each macro is
difference. It is this last bit you are complaining about. Some of
these differences are probably bugs.
Maybe changes to the linux kernel and/or glibc have affected this code,
in which case we may need different versions for different kernel/glibc
versions. Or maybe smarter code that works with every linux kernel
and/or glibc version. I'm just guessing here. There is probably a
reason why Jakub included that code in his patch, but I don't know
offhand what it is.
I've never looked at the low level details of the unwinder, and how it
interacts with signal stack frames, so I'm not sure how much help I can
be here.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com