Re: catching floating point exception on OS X Intel
Re: catching floating point exception on OS X Intel
- Subject: Re: catching floating point exception on OS X Intel
- From: Jonas Maebe <email@hidden>
- Date: Fri, 11 May 2007 14:21:44 +0200
On 11 mei 2007, at 01:44, Kristoffer Eriksen wrote:
I'm not using long doubles, so for simplicity I've disabled 387
instruction generation with the -mfpmath=sse compiler switch, and
therefore only have to deal with the SSE XMCSR.
For clarity's sake: -mfpmath=sse is the default on Mac OS X. If you
use long doubles, it will nevertheless still use the 387 because they
are not supported by the sse units.
Program received signal EXC_ARITHMETIC, Arithmetic exception.
0x00001f2f in main (argc=1, argv=0xbfffe708) at fpasm.c:14
14 x = -1.0/0.0;
It's not a SIGFPE, which is a little puzzling, and I don't know
what an EXC_ARITHMETIC, is but it's effective.
As Andrew Pinski mentioned, gdb catches the exceptions at the Mach
rather than at the Unix level. This is quite annoying, because it
cannot step into Unix signal handlers because of this. This has been
the case forever afaik, and there is a long standing bug report open
about this with Apple (rdar://problem/2818847)
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden