Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Reply-To: Cygwin List Message-Id: <6.1.0.6.0.20040609113253.0320ab18@pop.prospeed.net> X-Sender: Date: Wed, 09 Jun 2004 11:37:26 -0400 To: "Su, Hua" , From: Larry Hall Subject: Re: problem of GDB with Fortran array In-Reply-To: <4C6526212238CD40AB0CB47EE48553118E385C@tatooine.de.tatm.th ales> References: <4C6526212238CD40AB0CB47EE48553118E385C AT tatooine DOT de DOT tatm DOT thales> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 09:50 AM 6/9/2004, you wrote: >Dear all, > >I'm new to this mailing list. Before I ask a question, I have searched the mailing list archive, but I have not found an answer. My problem is when I debug fortran source code using GDB, a problem will occur when using GDB command print to show elemnet of an array. But problem does not occur under Linux environment. > >taking following small source code (test.for) as an example: > > dimension a(10) > write(*,*)'This is a test.' > call sub(a,10) > write(*,*) a > stop > end > > subroutine sub(a,n) > dimension a(n) > do 100 i=1, 10 > a(i)=i >100 continue > return > end > >After compiling using command, g77 -g -O test.for, we can use GDB to debug test.exe, but if you want to show content of some element of array a, the error occurs with the message: > >Program received signal SIGSEGV, Segmentation fault. >0x0022f010 in ?? () >The program being debugged was signaled while in a function called from GDB. >GDB remains in the frame where the signal was received. >To change this behavior use "set unwindonsignal on" >Evaluation of the expression containing the function (at 0x22f010) will be abandoned. > >BUT I have not met such problem in Linux environment. > >My Cygwin version is 1.5.9-1 >GDB is 20030919-1 (GNU gdb 2003-09-20-cvs (cygwin-special)) > >Many thanks for any help. Could just be the "new" annoyance of gdb reported to this list earlier caused by an internal call to IsBadWritePtr(). If it is, you can ignore this problems. Just try just continuing. You may have to make multiple attempts at this. If that's not it, I don't have further ideas for you (beyond the obvious further debugging). -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/