fortran/2048: cannot set breakpoint in preprocessed fortran code

taschna@uni-muenster.de taschna@uni-muenster.de
Tue Dec 6 13:18:00 GMT 2005


>Number:         2048
>Category:       fortran
>Synopsis:       cannot set breakpoint in preprocessed fortran code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 06 13:18:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     taschna@uni-muenster.de
>Release:        6.4
>Organization:
>Environment:
FC 4, gfortran (gcc version 4.0.2 20051125 (Red Hat 4.0.2-8))
>Description:
I cannot set a breakpoint on specific lines in 
preprocessed fortran files.
The same problem appears with version
gdb Red Hat Linux (6.3.0.0-1.84rh).
>How-To-Repeat:
$ cat main.F
      PROGRAM Test
      IMPLICIT NONE

        WRITE(*,*) 'Hello World'

      END
$ gfortran -g -save-temps main.F -o main
$ ../gdb-6.4/gdb/gdb main
GNU gdb 6.4
Copyright 2005 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) l
1       # 1 "main.F"
2       # 1 "/home/taschna/gdbtest//"
3       # 1 "<built-in>"
4       # 1 "<command line>"
5       # 1 "main.F"
6             PROGRAM Test
7             IMPLICIT NONE
8
9               WRITE(*,*) 'Hello World'
10
(gdb) b 9
No line 9 in file "main.f".


The same code does not have the problem if the preprocessing
stage is ommited:

$ cp main.F main.f
$ gfortran -g -save-temps main.f -o main
$ ../gdb-6.4/gdb/gdb main
GNU gdb 6.4
Copyright 2005 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) l
1             PROGRAM Test
2             IMPLICIT NONE
3
4               WRITE(*,*) 'Hello World'
5
6             END
(gdb) b 4
Breakpoint 1 at 0x8048602: file main.f, line 4.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gdb-prs mailing list