Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

view source code after exception durig debugging

dmoog4
Beginner
1,076 Views
I'm running CVF Prof Ed. 6.6.B, and during debugging I am unable to get the execution to stop in the source code window rather than the disassembly window after an exception. That is, I lose access to the debugger. I have set every exception in Debug > Exceptions to "Stop always" except for a few that won't permit it. I have yet to get any exception to stop in the debugger. The one I am currently struggling with stems from a "run-time error M6201: MATH - exp: DOMAIN error." What can I do to stop within the debugger following this and other errors? Thanks.
0 Kudos
8 Replies
Steven_L_Intel1
Employee
1,076 Views
I think the problem you're having is that the exception is reported from inside the call to the math library, so the debugger is showing you the assembly code there (it doesn't have the source to the math library.)

Next time this happens, look for the "Context" dropdown list, usually below the source pane. Change the context to be that of your source, and it should then show you the source.

Steve
0 Kudos
dmoog4
Beginner
1,076 Views
Thanks for the suggestion, but I must be missing something here. I don't know what you mean by the "context window;" at least I can't find any other windows that might be that, unless you mean the source code window. I can see that, but the problem is that the debugger is then inactive; I can't check any variable values. Perhaps relevant is that the last call in the call stack is to NTDLL (running Windows 2000 Pro), for which there is no source code. The thing is that so far it seems that every error I get does the same thing, not just this math error, but that could just be a conincidence. I'll see what happens with the next error if I can eliminate the current one.

Doug
0 Kudos
Steven_L_Intel1
Employee
1,076 Views
I just tried a simple example and didn't need to do anything special - the debugger pointed me at the source line.

I referred to a context dropdown list, not window. In the debugger, this is usually displayed at the top of the variables window, below the source window.

You may have something else that is interfering with the normal exception handling process.

Steve
0 Kudos
dmoog4
Beginner
1,076 Views
I have only one tab below the source code window, i.e. "File View", so I must not have the context dropdown box to which you refer. Anyway, the problem is that the debugger exits. Something bigger must be wrong, since I have been unable to set any conditional breakpoints. It always says "One or more breakpoints cannot be set and have been disabled."

Doug
0 Kudos
Steven_L_Intel1
Employee
1,076 Views
Try deleting the .PDB files in your Debug folder and doing a Rebuild All. See if that helps.

Steve
0 Kudos
nijhuis
Beginner
1,076 Views
The context dropdown list can be set along with program variables with the button "Variable" in the "Debug Windows" menu started from the "View" menu. This button can be clicked when debugging is active.
It (and other items) can also be controlled by a right mouse click on the edges of the various control windows in CVF during debugging.

Guus
0 Kudos
dmoog4
Beginner
1,076 Views
I seem to have resolved the problems I described, and your help is much appreciated. I trapped the error I was encountering by setting Project settings > Fortran > Floating point > Floating point exception handling to 0. Regenerating the .pdb files helped my debugger problem, and I appreciate the identification of the "context window." If only the debugger would accept breaks conditioned on array elements... but I assume that's a design feature/limitation.

Doug
0 Kudos
nijhuis
Beginner
1,076 Views
It is possible to set breakpoints on array elements. Click the "Edit", "Breakpoints" menu items and click the "Data" tab and you can enter an array element ( name with subscript(s) ) at which the debugger has to stop when changed. Breaks on allocatable array elements can only be set after allocation of the array.

Guus
0 Kudos
Reply