This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/34153] Debugging: Cannot set breakpoint in comment lines or "END PROGRAM"



------- Comment #2 from fxcoudert at gcc dot gnu dot org  2007-11-20 13:10 -------
(In reply to comment #1)
> The problem is that you end up in the wrong file. If you enter "break 3" you
> are debugging the wrapping program not the Fortran "program test", which is the
> reason that there is no "i" available.

This part of the bug was fixed by a recent commit of mine (and a gdb patch).
With development versions of gfortran and gdb, breaking by "b 2" will break at
line 2 of the Fortran main program.

> However, there is another problem: One cannot set the break point after the
> assignment:
> 
>       program test    ! Breakpoint possible
>       i = 1           ! Breakpoint possible
> !     Breakpoint here ! No breakpoint possible
>       end             ! No breakpoint possible

It's also possible in C with GCC mainline:

(gdb) l
1       int main(void)
2       {
3         int i;
4         i = 1;
5         /* That's all, folks!  */
6       }
(gdb) b 5
Breakpoint 1 at 0x400467: file z.c, line 5.
(gdb) r
Starting program: /home/fxcoudert/devel/debug2/irun/a.out

Breakpoint 1, main () at z.c:6
6       }


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
OtherBugsDependingO|                            |24546
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-debug
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-20 13:10:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34153


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]