Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

View the Call Stack in the Microsoft Debugger

In most cases, your program will automatically stop at the point where the exception occurs, allowing you to view the source code and values of variables. If the error is related to an I/O statement, you may want to view the call stack.

If you want to view where your program is currently executing in the hierarchy of routines , you can display the Call Stack window in the debugger. For example, you may want to display this window to determine where in your program an exception occurs.

To view the call stack:

  1. Start the debugger and stop at a breakpoint.

  2. Select Debug > Windows > Call Stack.

A severe unhandled I/O programming error (such as an End-of-File condition) can occur while the program is executing in the debugger. When this occurs, the Fortran runtime system will raise a debug event automatically to stop program execution, allowing display of the Call Stack.

When the severe unhandled I/O error occurs in the debugger:

  • An information box is displayed that contains:

    User breakpoint called from code at 0xnnnnnnn
  • A window appears with your cursor in NTDLL disassembly code

Click OK to dismiss the information box.

Scanning down the Call Stack display, there will be a few frames from NTDLL and the Fortran runtime system displayed, then the actual Fortran routine with the I/O statement that caused the error. In the call stack, select the Fortran routine to display the Fortran code and the variables using the Locals window. The green arrow points to the I/O statement that caused the error.

This action all occurs after the error message and traceback information has been displayed. The error message and traceback information is available in the program output window. To view the program output window, either iconize (minimize) the integrated development environment (IDE) or click the icon for the output window in the task bar. You should not need the stack dump because you have the Call Stack window in the IDE, but the error message with the file name might be useful to see.