This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34153] Debugging: Cannot set breakpoint in comment lines or "END PROGRAM"
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Nov 2007 13:10:19 -0000
- Subject: [Bug fortran/34153] Debugging: Cannot set breakpoint in comment lines or "END PROGRAM"
- References: <bug-34153-15382@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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