delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,TW_DB |
X-Spam-Check-By: | sourceware.org |
X-Eon-Dm: | dm0207 |
X-Eon-Sig: | AQMH8HNQKFLXM7OnVgIAAAAB,6297bd7cefffde63c01e54dd1fb7fb43 |
Message-ID: | <502852D5.10802@mvseac.com> |
Date: | Sun, 12 Aug 2012 18:05:25 -0700 |
From: | L Anderson <lowella AT mvseac DOT com> |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120715 Firefox/14.0.1 SeaMonkey/2.11 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: gdb dies debugging fortran program |
References: | <50280B27 DOT 4030805 AT mvseac DOT com> <20120812201815 DOT GA6511 AT ednor DOT casa DOT cgf DOT cx> <50282059 DOT 1060005 AT mvseac DOT com> |
In-Reply-To: | <50282059.1060005@mvseac.com> |
X-Proofpoint-Virus-Version: | vendor=fsecure engine=2.50.10432:5.7.7855,1.0.260,0.0.0000 definitions=2012-08-12_06:2012-08-10,2012-08-12,1970-01-01 signatures=0 |
X-Proofpoint-Spam-Details: | rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=4 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1208120334 |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 |
L Anderson wrote: > Christopher Faylor wrote: >> 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. >> > Running under mintty--haven't used windows console for cygwin in ages. > aaargggg!! I'm embarrassed! I have two shortcuts I use to run cygwin and I thought they were both the same--mintty. But, alas, one was mintty and one was windows console. The console was the one that failed but the mintty seems to work. This explains why the results were inconsistent--sometimes mintty(worked) sometimes console(failed). At least there appears to be a problem with windows console and gdb. LA -- 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 |