I have a SIGFPE happening within a loop. If I set a breakpoint or handle the SIGFPE with stop, nopass, etc, i loose the frame variables after this line. In the case of a breakpoint, I need to first get there by executing n N, where N is a large number, so that the loop runs over the breakpoint within until such variable values occure that the SIGFPE is issued. After the execution by handling or breakpoint, I loose the frame variables, so I cannot reverse-search and further debug the program (variable out of context).
How do I handle a SIGFPE within a loop in a fast way?
Thanks!
New information: is it possible to stop a program with a logical watch point? I have gone into the responsible frame, and found that the variable in question attains a value of 350 (it should be way less than zero). Why doesn’t
watch x0 > 100
stop the execution at this point?
You use
watchin wrong way.http://www.ofb.net/gnu/gdb/gdb_30.html#SEC30
watch exprSo, you can’t watch a
x0>100, but can watch ax0, orarray[59](argument of watch is address in memory)For your task you can use conditional break. http://www.ofb.net/gnu/gdb/gdb_29.html#SEC29
break ... if condSo