This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g77/GDB problem


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@sourceware.cygnus.com