delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,TW_DB |
X-Spam-Check-By: | sourceware.org |
X-Mail-Handler: | Dyn Standard SMTP by Dyn |
X-Report-Abuse-To: | abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) |
X-MHO-User: | U2FsdGVkX19YduUGVBBmCrhk+R0VcK2N |
Date: | Sun, 12 Aug 2012 16:18:15 -0400 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: gdb dies debugging fortran program |
Message-ID: | <20120812201815.GA6511@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <50280B27 DOT 4030805 AT mvseac DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <50280B27.4030805@mvseac.com> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Sun, Aug 12, 2012 at 12:59:35PM -0700, L Anderson wrote: >I trying to use gdb to debug a fortran program compiled with gfortran >but gdb inconsistently dies in the process. I have written a >small fortran program that exhibits the problem. > >The test program is: > ><code> > PROGRAM GDBDIES > >C PROGRAM TO SHOW GDB DIES DEBUGGING IT > IMPLICIT INTEGER (A-Z) > > A = 1 > > B = 2 > > IF (B.EQ.2) GOTO 20 > > C = 4 > > 20 D = 200 > > END ></code> > >I compiled it with: > >$ gfortran -g -o gdbdies gdbdies.f > >and ran it under gdb thusly: > >$ gdb gdbdies.exe >GNU gdb (GDB) 7.3.50.20111026-cvs (cygwin-special) >Copyright (C) 2011 Free Software Foundation, Inc. >License GPLv3+: GNU GPL version 3 or later ><http://gnu.org/licenses/gpl.html> >This is free software: you are free to change and redistribute it. >There is NO WARRANTY, to the extent permitted by law. Type "show copying" >and "show warranty" for details. >This GDB was configured as "i686-cygwin". >For bug reporting instructions, please see: ><http://www.gnu.org/software/gdb/bugs/>... >Reading symbols from /cygdrive/m/Langpak/src/gdbdies.exe...done. >(gdb) b 9 >Breakpoint 1 at 0x40117d: file gdbdies.f, line 9. >(gdb) run >Starting program: /cygdrive/m/Langpak/src/gdbdies.exe >[New Thread 4672.0x1630] >[New Thread 4672.0x15b8] > >Breakpoint 1, gdbdies () at gdbdies.f:9 >9 B = 2 >(gdb) n >10 C = 3 >(gdb) n >11 IF (C.EQ.3) GOTO 20 >(gdb) n <<<---here's where it goes out to lunch and never comes back. > >gdb doesn't consistently die in the same place--it seems to be related >to where the breakpoint is set. However, it seems to more consistently >die just after line 11 where the GOTO 20 is. > >My system is XP Pro SP3 with Cygwin DLL version 1.7.16 > > >Is this a bug in gdb or am I doing something wrong? Are you running gdb under mintty or on a windows console. I've seen a problem with gdb running in a console which manifests the way you describe. Running under mintty usually works better. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |