Bug 175071 - cannot set breakpoint in preprocessed fortran code
cannot set breakpoint in preprocessed fortran code
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2005-12-06 04:10 EST by Alexander Täschner
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.1.0-0.14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-07 12:16:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexander Täschner 2005-12-06 04:10:03 EST
I cannot set a breakpoint on a specific line in a preprocessed fortran file:

[taschna@localhost gdbtest]$ cat main.F
      PROGRAM Test

        WRITE(*,*) 'Hello World'

[taschna@localhost gdbtest]$ gfortran -g -save-temps main.F -o main
[taschna@localhost gdbtest]$ gdb main
GNU gdb Red Hat Linux (
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-redhat-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
9               WRITE(*,*) 'Hello World'
(gdb) b 9
No line 9 in file "main.f".

Using the same file without the preprocessing works fine:

[taschna@localhost gdbtest]$ cp main.F main.f
[taschna@localhost gdbtest]$ gfortran -g -save-temps main.f -o main
[taschna@localhost gdbtest]$ gdb main
(gdb) l
1             PROGRAM Test
2             IMPLICIT NONE
4               WRITE(*,*) 'Hello World'
6             END
(gdb) b 4
Breakpoint 1 at 0x8048602: file main.f, line 4.
Comment 1 Alexander Täschner 2005-12-07 02:22:06 EST
According to the comments in the gdb bug database for fortran/2048
trail&database=gdb&pr=2048) this is a bug in gfortran, therefore
changing the component tag of this bug.
Comment 3 Jakub Jelinek 2006-01-07 12:16:14 EST
Should be fixed in gcc-4.1.0-0.14.

Note You need to log in before you can comment on or make changes to this bug.