delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/04/28/15:25:34

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Wed, 28 Apr 1999 20:24:30 +0100 (BST)
From: Jon Wright <jpw22 AT cus DOT cam DOT ac DOT uk>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: g77/GDB problem
In-Reply-To: <011b01be91a4$c7390720$426a4fa2@palm.itc.nrcs.usda.gov>
Message-ID: <Pine.SOL.3.96.990428195646.3811A-100000@ursa.cus.cam.ac.uk>
MIME-Version: 1.0

Apologies for posting a mingw32 specific problem on this list. Please
redirect me if there is a more appropriate list for this question.
(Sending it to comp.lang.fortran also)

The problem is this - running a program under the gdb causes it to
exit with a segmentation fault where it runs as expected without gdb. 

I didn't find this in the known bugs and I don't currently have access
any other g77/gdb installation. Am I just doing something very silly? 

Thanks in advance,

Jon Wright.
-----------
The source: (test.f)
      PROGRAM TEST
      PRINT*, 'BEFORE OPEN STATEMENT'
      OPEN(UNIT=22,ACCESS='DIRECT',FORM='FORMATTED',
     & STATUS='SCRATCH',RECL=80)
      PRINT*, 'AFTER OPEN STATEMENT'
      STOP 
      END
-----------

D:\USERS\jonwright\ccsl\jpw>g77 -v
g77 version egcs-2.91.66 19990314 (egcs-1.1.2 release) (from FSF-g77 
version 0.5 .24-19981002)
Driving: C:\PROGRA~1\EGCS-1~1.2\BIN\G77.EXE -v -c -xf77-version /dev/null 
-xnone

G77.EXE: /dev/null: No such file or directory
Reading specs from 
C:\PROGRA~1\EGCS-1~1.2\BIN\..\lib\gcc-lib\i386-mingw32\egcs-2.91.66\specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

D:\USERS\jonwright\ccsl\jpw>g77 -g -Wall -o test test.f

D:\USERS\jonwright\ccsl\jpw>test
 BEFORE OPEN STATEMENT
 AFTER OPEN STATEMENT

[As expected]
D:\USERS\jonwright\ccsl\jpw>gdb test.exe
GNU gdb 4.17.1
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are welcome to change it and/or distribute copies of it under certain
conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for 
details.
This GDB was configured as "i386-mingw32"...
(gdb) run
run
Starting program: D:\USERS\jonwright\ccsl\jpw/test.exe
bff70000:C:\WINDOWS\SYSTEM\KERNEL32.DLL
7fd50000:C:\WINDOWS\SYSTEM\CRTDLL.DLL
 BEFORE OPEN STATEMENT

Program received signal SIGSEGV, Segmentation fault.
0xbff76d9a in _size_of_stack_reserve__ () 
(gdb) bt
bt
#0  0xbff76d9a in _size_of_stack_reserve__ ()
Cannot access memory at address 0x2000000.
(gdb)




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019