I'm developing an OpenGL viewer for a school project, but I can't seam to debug it with gdb. Each time gdb starts, I get a SIGFPE. (gdb) run Starting program: /home/diederik/werk/3dviewer-pascal/3dviewer [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 16655)] Program received signal SIGFPE, Arithmetic exception. [Switching to Thread 16384 (LWP 16655)] 0x403bc29c in _mesa_test_os_sse_exception_support () from /usr/X11R6/lib/modules/dri/r200_dri.so Reproducible: Always Steps to Reproduce:
Which version of gdb (emerge -pv gdb) are you using? does a version bump fix it? Search the developer's of gdbs mail list for an error similar error. if all else fails can you include the code section of your school project here.
That is SSE detection code. It tests for SSE by installing a signal handler, then executing SSE code. If the processor doesn't support SSE, a signal is triggered and handled properly, then things proceed. However if you're running it in a debugger, then the SEGV will get trapped by gdb instead of going to the Mesa handler. So you have to "cont" to let it be handled, and let the code proceed to the real problem. [ Read from http://bugzilla.redhat.com/bugzilla/long_list.cgi?buglist=106566 ]
Note: The parent poster meant that the SIGFPE will get trapped by gdb. The redhat bugreport is primarily about a SEGV, but the SIGFPE issue is briefly mentioned. If you do not want gdb to stop when a SIGFPE is generated, you can change the way it is handled by doing: handle SIGFPE nostop or even: handle SIGFPE nostop noprint This is not a bug.
Closing as invalid.