Sorry guys - I don't know if any of this should work, but I tried to use gdb with limited success - if the subroutine argument values would have printed, gdb would have been working well enough to be useful.
[dir:~/tests/gfortran] dir% gfortran -g -o debug debug.f [dir:~/tests/gfortran] dir% gdb debug GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28 GMT 2004) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin". Reading symbols for shared libraries ..... done (gdb) break sub1_ Breakpoint 1 at 0x1c90: file ../../../gcc/libgfortran/runtime/error.c, line 275. (gdb) break sub1 Function "sub1" not defined. (gdb) run Starting program: /Users/dir/tests/gfortran/debug Reading symbols for shared libraries ++. done Error in re-setting breakpoint 1: Function "sub1_" not defined. Re-enabling shared library breakpoints: 1 Breakpoint 1, 0x00001c90 in sub1_ (a=Invalid F77 type code 17 in symbol table. ) at debug.f:5 5 subroutine sub1(a,b) (gdb) s Current language: auto; currently fortran sub1_ (a=Invalid F77 type code 17 in symbol table. ) at debug.f:6 6 i=3 (gdb) s 7 write(*,*)a,b (gdb) print a $1 = (Invalid type code (17) in symbol table. (gdb) print b $2 = (Invalid type code (17) in symbol table. (gdb) quit The program is running. Exit anyway? (y or n) y [dir:~/tests/gfortran] dir% cat debug.f program main call sub1(1.0,2.0) stop end subroutine sub1(a,b) i=3 write(*,*)a,b return end -- Summary: gdb will not print subroutine arguments Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dir at lanl dot gov CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: powerpc-apple-darwin7.8.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20112