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 Message-ID: <00f401bea6fb$80b74890$29acdfd0@InspirePharm.Com> Reply-To: "Suhaib M. Siddiqi" From: "Suhaib M. Siddiqi" To: "Richard Stanton" , "Cygwin Mailing List" References: <001001bea6fa$9a03d5d0$8f4b2080 AT berkeley DOT edu> Subject: Re: Problems with gdb and FORTRAN programs Date: Tue, 25 May 1999 18:11:13 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id SAA21824 Try gdb 1.8 from Mumit's site or compile your own (it compiles out of the box). I work with F77 code often and I am always able to track the bugs in code using gdb. Sorry for not being of more help. Suhaib ----- Original Message ----- From: Richard Stanton To: Suhaib M. Siddiqi ; Cygwin Mailing List Sent: Tuesday, May 25, 1999 6:04 PM Subject: RE: Problems with gdb and FORTRAN programs > Thanks for the reply, Suhaib. > > I did compile using "g77 -f", and the debugging symbols were in the > executable - note that gdb in fortran mode could tell me that "n" was a > pointer to an integer, and in c mode I could even print the contents of n. > It was just when I tried to access the contents of n in fortran mode that > gdb crashed on me. > > Regards, > > Richard Stanton > > > -----Original Message----- > > From: Suhaib M. Siddiqi [mailto:ssiddiqi AT ipass DOT net] > > Sent: Tuesday, May 25, 1999 1:25 PM > > To: Richard Stanton; Cygwin Mailing List > > Subject: Re: Problems with gdb and FORTRAN programs > > > > > > > > > > > I'm writing/debugging some FORTRAN code using egcs 1.1.2 and gdb 4.17.1. > > > There seem to be some problems viewing variables with gdb in > > fortran mode. > > > For example, > > > > > > Breakpoint 1, getdat_ (data=0xf0be20, m=0x30720d0, n=0x30720d4) at > > > snpdata.f:40 > > > (gdb) print n > > > $2 = (PTR TO -> ( integer )) 0x30720d4 > > > (gdb) set lang c > > > Warning: the current language does not match this frame. > > > (gdb) print n[0] > > > $3 = 491 > > > (gdb) set lang fortran > > > (gdb) print n(1) > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > 0x30720d9 in ?? () > > > > Are you compiling your code with -g option i.e. g77 -g xx.f ? > > Do not use any optimization flags when compiling a debug versions. > > > > I think you are missing the debug symbols in your binary. > > > > > > --Suhaib > > > > > > > The program being debugged stopped while in a function called from GDB. > > > When the function (at 0x30720d4) is done executing, GDB will silently > > > stop (instead of continuing to evaluate the expression containing > > > the function call). > > > (gdb) > > > > > > How can I view the contents of the variable n in fortran mode? > > > > > > Richard Stanton > > > > > > > > > -- > > > Want to unsubscribe from this list? > > > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > > > > > > > > > > > > > > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com