X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 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: dm0220 X-Eon-Sig: AQMH8HNQKCBabnhsJAIAAAAB,8ba49ccd23e9491d976e56433b77e68f Message-ID: <50282059.1060005@mvseac.com> Date: Sun, 12 Aug 2012 14:30:01 -0700 From: L Anderson 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> In-Reply-To: <20120812201815.GA6511@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-1208120267 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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: >> >> >> 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 >> >> >> 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 >> >> 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: >> ... >> 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. 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