This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24526] variables from modules not visible in gdb
- From: "woodzltc at sources dot redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2005 03:25:28 -0000
- Subject: [Bug fortran/24526] variables from modules not visible in gdb
- References: <bug-24526-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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.
[woodzltc@plinuxt2 ~]$ 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