how to debug fortran code using idb
debugging Fortran programs.
Compiling your Fortran program for debugging
To prepare your program for debugging when using the command line (ifort command):
In a command window, (such as the Fortran command window available from the Intel Fortran program folder), compile and link the program with full debug information and no optimization:
ifort -g file.f90 (Linux OS and Mac OS X) ifort /debug:full file.f90 (Windows OS)
On Windows OS, specify the /debug:full compiler option to produce full debugging information. It produces symbol table information needed for full symbolic debugging of unoptimized code and global symbol information needed for linking.
How to use Intel idb as debugger.
IDB comes with good help information
eg, (idb) help run
Run the debugger program.
Usage: run (arguments) (redirections) Arguments: Run the program with the specified arguments. Run the program with the specified input and output redirections.
If no arguments and redirections are specified, program is run with arguments
and redirections specified by previous “run” command with arguments or by “set
args” command.
Synonyms: “r”.
To run the exe in debug mode from command line, use devenv with debugexe option.. read more for How To Run .exe In Debug Mode Microsoft Visual Studio.
Eg. > devenv /DebugExe r280test01.exe
After windows debugger starts Hit F10 key to start debugging.
Check out How to use dbx as debugger for fortan debugging here.
Check out Debugging Fortran programs with gdb here
Intel® Debugger (IDB) Manual
Related posts:
- Ifort -extend-source Option Errors & Fortran Fixed Formatting Use nofree
- How To Debug Err This Application Has Failed To Start Because MSVCR90.dll Was Not Found
- How To Run .exe In Debug Mode Microsoft Visual Studio 2008
- This USE Statement Is Not Positioned Correctly Within The Scoping Unit
- Unresolved External Symbol _getenv_ USE IFPORT Link Error For Application Porting From UNIX To Win32
Tags: debug, fortran, unix to windows porting, Windows XP
This entry was posted on Wednesday, October 6th, 2010 at 4:54 am and is filed under Tips & Tricks, Unix2Win32_Porting. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
#1 written by admin October 21st, 2010 at 02:21
ifort debug option; How to debug a Windows* Fortran application from the command line;; at http://software.intel.com/en-us/articles/debug-windows-fortran-application-from-command-line/