public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24526] New: variables from modules not visible in gdb
@ 2005-10-25 19:51 tkoenig at gcc dot gnu dot org
2005-10-26 3:25 ` [Bug fortran/24526] " woodzltc at sources dot redhat dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-10-25 19:51 UTC (permalink / raw)
To: gcc-bugs
$ cat module.f90
module foo
real :: a
end module foo
program main
use foo, only : a
a = 42.
print *,a
end program main
$ gfortran -g module.f90
$ gdb ./a.out
GNU gdb 6.3-debian
Copyright 2004 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 "i386-linux"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".
(gdb) b module.f90:7
Breakpoint 1 at 0x80485e4: file module.f90, line 7.
(gdb) r
Starting program: /home/ig25/Krempel/Gdb/a.out
Breakpoint 1, MAIN__ () at module.f90:7
7 a = 42.
Current language: auto; currently fortran
(gdb) p a
No symbol "a" in current context.
(gdb)
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1/configure --prefix=/home/ig25
--enable-languages=c,fortran : (reconfigured) ../gcc-4.1/configure
--prefix=/home/ig25 --enable-languages=c,fortran --no-create --no-recursion
Thread model: posix
gcc version 4.1.0 20051011 (experimental)
$ gdb --version
GNU gdb 6.3-debian
Copyright 2004 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 "i386-linux".
--
Summary: variables from modules not visible in gdb
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-debug
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24526
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/24526] variables from modules not visible in gdb
2005-10-25 19:51 [Bug fortran/24526] New: variables from modules not visible in gdb tkoenig at gcc dot gnu dot org
@ 2005-10-26 3:25 ` woodzltc at sources dot redhat dot com
2005-10-27 23:15 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: woodzltc at sources dot redhat dot com @ 2005-10-26 3:25 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/24526] variables from modules not visible in gdb
2005-10-25 19:51 [Bug fortran/24526] New: variables from modules not visible in gdb tkoenig at gcc dot gnu dot org
2005-10-26 3:25 ` [Bug fortran/24526] " woodzltc at sources dot redhat dot com
@ 2005-10-27 23:15 ` pinskia at gcc dot gnu dot org
2006-10-14 14:21 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-27 23:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-10-27 23:15 -------
(In reply to comment #1)
> To let gdb recognize 'a' directly, some trick in gdb might be needed.
I don't know if some trickery is needed, just we might need to emit something
like what C++ does with it using statements.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-10-27 23:15:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24526
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/24526] variables from modules not visible in gdb
2005-10-25 19:51 [Bug fortran/24526] New: variables from modules not visible in gdb tkoenig at gcc dot gnu dot org
2005-10-26 3:25 ` [Bug fortran/24526] " woodzltc at sources dot redhat dot com
2005-10-27 23:15 ` pinskia at gcc dot gnu dot org
@ 2006-10-14 14:21 ` steven at gcc dot gnu dot org
2008-08-21 21:33 ` burnus at gcc dot gnu dot org
2009-05-29 7:43 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-10-14 14:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from steven at gcc dot gnu dot org 2006-10-14 14:21 -------
There is support for Fortran module variables in DWARF3, see
http://dwarf.freestandards.org/Dwarf3.pdf.
Unfortunately GDB doesn't seem to support this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24526
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/24526] variables from modules not visible in gdb
2005-10-25 19:51 [Bug fortran/24526] New: variables from modules not visible in gdb tkoenig at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-10-14 14:21 ` steven at gcc dot gnu dot org
@ 2008-08-21 21:33 ` burnus at gcc dot gnu dot org
2009-05-29 7:43 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-08-21 21:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2008-08-21 21:31 -------
I think the gfortran part is fixed by PR 29635. The rest has to be solved in
gdb. Other debugers seem to have also some problems, e.g. Intel's idb, cf.
http://gcc.gnu.org/ml/fortran/2008-08/msg00128.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24526
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/24526] variables from modules not visible in gdb
2005-10-25 19:51 [Bug fortran/24526] New: variables from modules not visible in gdb tkoenig at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-08-21 21:33 ` burnus at gcc dot gnu dot org
@ 2009-05-29 7:43 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-05-29 7:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2009-05-29 07:43 -------
Is this a duplicate of PR 40040?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24526
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-05-29 7:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-25 19:51 [Bug fortran/24526] New: variables from modules not visible in gdb tkoenig at gcc dot gnu dot org
2005-10-26 3:25 ` [Bug fortran/24526] " woodzltc at sources dot redhat dot com
2005-10-27 23:15 ` pinskia at gcc dot gnu dot org
2006-10-14 14:21 ` steven at gcc dot gnu dot org
2008-08-21 21:33 ` burnus at gcc dot gnu dot org
2009-05-29 7:43 ` burnus at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).