Catch ifc f90 runtime exceptions with idb?

Catch ifc f90 runtime exceptions with idb?


I am in the process of translating an old, roughly 50,000 line legacy f77 code into f90/95. I've done the translation and, having successfully gotten the thing to compile and link with ifc, I'm now in the run_in_debugger-fix-repeat phase. I'm using idb, which is wonderful, except that I have NOT been able to figure out how to catch runtime errors such as "Error 460: Pointer not allocated" in idb, while the process is still active and I can go up the stack and examine the state of the code at the point where the problem was detected. All I've been able to do is set a break in __GI_exit, which isn't all that useful because variable information is lost.

While it is true that the runtime error checking does print out line number information, it seems to me that one ought to be able to just have execution stop (or break) at the point where the problem is first detected. At present, my debug cycle consists of: 1) run until it crashes 2) set breakpoint where it crashed 3) rerun 4) examine state of code 5) fix bug, and repeat. Steps 2 and 3 could be excluded if someone could tell me how to cause execution to break at the point where a runtime error is detected, instead of the thread terminating.

This is so basic, yet I have not been able to figure out how to accomplish it.


1 post / novo 0
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.