------- Comment #1 from woodzltc at sources dot redhat dot com 2005-10-26 03:25 ------- Variable a in modular foo is represented as __foo__a in the DWARF output. So you can use "print __foo__a" to get the value of modular variable a.
[EMAIL PROTECTED] ~]$ gdb -q ./modular Using host libthread_db library "/lib64/tls/libthread_db.so.1". (gdb) b modular.f90:7 Breakpoint 1 at 0x10001700: file modular.f90, line 7. (gdb) r Starting program: /home/woodzltc/modular Breakpoint 1, MAIN__ () at modular.f90:7 7 a = 42. Current language: auto; currently fortran (gdb) p __foo__a $2 = 0 (gdb) n 8 print *,a (gdb) p __foo__a $3 = 42 (gdb) To let gdb recognize 'a' directly, some trick in gdb might be needed. -- woodzltc at sources dot redhat dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |woodzltc at sources dot | |redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24526