Is it possible to convert floating point exceptions (signals) into C++ exceptions on x86 Linux?
This is for debugging purposes, so nonportability and imperfection is oka
Due to the way signals and exceptions work, you can't do it immediately when the signal is thrown - exceptions rely on certain aspects of the stack that aren't true when a signal handler gets called.
You can set a global variable in the signal handler, and then check this at key points in the program and throw an exception if it's set. This doesn't give you the exact information about the thrown exception, though.