$ gfortran -g test.f -o test.exe $ gdb test.exe GNU gdb (GDB) 7.5.50.20130309-cvs (cygwin-special) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-cygwin". For bug reporting instructions, please see: ... Reading symbols from /cygdrive/c/DOCUME~1/harryr/d62/B1900/svn/B1900/test.exe...done. (gdb) tb test:1 Temporary breakpoint 1 at 0x401176: file test.f, line 7. (gdb) r Starting program: /cygdrive/c/DOCUME~1/harryr/d62/B1900/svn/B1900/test.exe [New Thread 800.0x1834] [New Thread 800.0x1abc] Temporary breakpoint 1, test () at test.f:7 7 foo = 99 (gdb) n 10 call sleep(0) (gdb) b Breakpoint 2 at 0x401180: file test.f, line 10. (gdb) n 12 total_ticks=22 (gdb) 13 loopcounter = 0 (gdb) 14 do while (loopcounter .lt. total_ticks) (gdb) 15 loopcounter = loopcounter + 1 (gdb) b Breakpoint 3 at 0x4011af: file test.f, line 15. (gdb) b Note: breakpoint 3 also set at pc 0x4011af. Breakpoint 4 at 0x4011af: file test.f, line 15. (gdb) so .gdbtest (gdb) c Continuing. $1 = 2 $2 = 2 $3 = 3 $4 = 3 $5 = 3 $6 = 3 $7 = 3 $8 = 3 $9 = 3 $10 = 3 $11 = 3 $12 = 3 $13 = 3 Breakpoint 2, test () at test.f:10 10 call sleep(0)