[ale] Trapping a fpe?
Danny Cox
danny at compgen.com
Tue Aug 15 12:58:36 EDT 2000
Justin,
On Tue, 15 Aug 2000, Justin Russell wrote:
> Does anyone know of a free profiler or debugger that will trap
> floating-point exceptions (overflow, underflow, etc) and do a
> backtrace? This is an iterative C program, so breakpoint specification
> doesn't help me find my memory leak. I have looked through gdb and
> don't think this is possible with the gnu tools. Any ideas?
You could try catching SIGFPE yourself. The stack backtrace
will show your signal handler name, some "trampoline code", but
afterwards where the program was at the time of the signal. Your signal
handler could just call abort (), to generate a core file.
In the back of my mind (hmm, many cobwebs), I seem to recall
that IEEE floating point allowed you to somehow set actions if
underflow, overflow, divide-by-zero, etc. occurred. If you could find
and set that, perhaps an action could be 'abort with core' or
equivalent.
Hope this helps!
Danny
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list