This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: translating synchronous signals into exceptions
- From: Andrew Haley <aph at redhat dot com>
- To: Benjamin Collar <benjamin dot collar at siemens dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 3 Dec 2004 13:07:13 +0000
- Subject: Re: translating synchronous signals into exceptions
- References: <1102077279.4647.26.camel@mhpajh5c>
Benjamin Collar writes:
> Greetings everyone,
>
> I'm working on a project with customers who come from a Windows
> background, are not comfortable with signal-handling in C++ and would
> prefer to throw exceptions from signal-handlers.
>
> I saw a message on the GCC mailing list
> http://gcc.gnu.org/ml/gcc/2004-09/msg00725.html , where it's explained
> explained how it could be accomplished for synchronous signals. This is
> exactly what they are looking for. The difficulty I have at the moment
> is that they are using the AMD 64 platform. Looking at the header
> libjava/include/x86_64-signal.h, I see that SEGV is handled but, unlike
> i386, FPE is not.
>
> Can someone explain why FPE is not handled? Is there a plan for handling
> FPE in the near future?
We just need to write the code. It's not particularly difficult, but
it's quite tricky to test all the cases. You see the
HANDLE_DIVIDE_OVERFLOW is quite hairy in the i386 case. It might well
work with little change.
Andrew.