Bug 175071 - cannot set breakpoint in preprocessed fortran code
cannot set breakpoint in preprocessed fortran code
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2006-01-07 12:16:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
      IMPLICIT NONE

        WRITE(*,*) 'Hello World'

      END
[taschna@localhost gdbtest]$ gfortran -g -save-temps main.F -o main
[taschna@localhost gdbtest]$ gdb main
GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
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
8
9               WRITE(*,*) 'Hello World'
10
(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
3
4               WRITE(*,*) 'Hello World'
5
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
(http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-
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.