This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: printing variables inside a module
>> A better patch, which also includes support for Fortran-90-
>> style arrays (and C99's VLA), is in the archer git repository:
>> http://sourceware.org/git/?p=archer.git;a=heads
>> (several heads, esp. "archer-jankratochvil-fedora-merge").
>> Red Hat/Fedora 11 but also openSUSE Factory ship a gdb
>> which contains those patches. The module/VLA patches will be
>> included in the official version of GDB at some point.
>>
>
> I will try the git image and see what happens.
>
I downloaded the "archer-jankratochvil-fedora-merge" branch from from
your link. After compiling and installing this version, I have
$ gdb -v
GNU gdb (GDB) 6.8.50.20090302-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Even this branch does not solve my problem.
$ gfortran -g -O0 modvars.f90
$ gdb -q ./a.out
(gdb) b 11
Breakpoint 1 at 0x4007b6: file modvars.f90, line 11.
(gdb) r
Starting program: <munge1>/work/fortran/a.out
Breakpoint 1, b () at modvars.f90:11
11 write(*,*) " jo = ", jo
Current language: auto; currently fortran
(gdb) p jo
No symbol "jo" in current context.
(gdb) n
jo = 14
12 write(*,*) jo+1
(gdb) p jo
No symbol "jo" in current context.
(gdb) c
Continuing.
15
Program exited normally.
Any idea?