From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9467 invoked by alias); 7 Nov 2005 03:23:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 9459 invoked by uid 22791); 7 Nov 2005 03:23:08 -0000 Received: from ausmtp01.au.ibm.com (HELO ausmtp01.au.ibm.com) (202.81.18.186) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 07 Nov 2005 03:23:08 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp01.au.ibm.com (8.12.10/8.12.10) with ESMTP id jA73QDBb008178 for ; Mon, 7 Nov 2005 14:26:13 +1100 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.250.243]) by sd0208e0.au.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id jA73Q2rL075176 for ; Mon, 7 Nov 2005 14:26:02 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.12.11/8.13.3) with ESMTP id jA73N0C5029505 for ; Mon, 7 Nov 2005 14:23:00 +1100 Received: from [9.181.133.252] ([9.181.133.252]) by d23av02.au.ibm.com (8.12.11/8.12.11) with ESMTP id jA73Mv2d029413; Mon, 7 Nov 2005 14:22:58 +1100 Date: Mon, 07 Nov 2005 04:04:00 -0000 From: Wu Zhou To: eliz@gnu.org, gdb-patches@sources.redhat.com Subject: [RFC/Doc]: Some words about Fortran debugging Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-11/txt/msg00073.txt.bz2 Hi Eli, I added some words in chapter 12 to describe some Fortran specific support. Appended is the patch. I use "made info" to verify that it does works. Do I need to do anything other to verify that? What things I need to keep in mind if I want to add something into the document? As you might know, it is the first time for me to work on texinfo. So if there is anything wrong or inproper, please feel free to correct me. Thanks a lot! Here goes the patch: Index: gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.282 diff -c -3 -p -r1.282 gdb.texinfo *** gdb.texinfo 1 Nov 2005 11:09:18 -0000 1.282 --- gdb.texinfo 7 Nov 2005 03:10:21 -0000 *************** function, @code{_NSPrintForDebugger}, de *** 9089,9094 **** --- 9089,9153 ---- @subsection Fortran @cindex Fortran-specific support in @value{GDBN} + @value{GDBN} can be used to debug programs written in Fortran, but it + mainly support the old Fortran 77 language features. For most of these + new language feature introduced after Fortran 77 standard, such as + derived type, modular, pointer and so on, @value{GDBN} doesn't support + yet. But there are some effort trying to add support for them. + + @cindex Add a trailing underscore or not + To debug some Fortran compilers generated code, you may need to refer to + some variables or functions with a trailing underscore. GNU Fortran 77 + and Fortran 95 compiler are among this kind of compilers. As far as I + know, you don't need to do that for IBM's XL Fortran compiler and Intel's + Fortran compiler. If you are not sure, you can use the command completion + feature of @value{GDBN} to see whether there is a trailing underscore or + not. + + @menu + * Fortran Operators:: Fortran operators and expressions + * Fortran Defaults:: Default settings for Fortran + * Special commands:: Special @value{GDBN} commands for Fortran + * Known Problems:: Known problems and workaround (if exists) + @end menu + + @node Fortran Operators + @subsubsection Fortran operators and expressions + + @cindex Fortran operators and expressions + + Operators must be defined on values of specific types. For instance, + @code{+} is defined on numbers, but not on structures. Operators are + often defined on groups of types. + + @table @code + @item ** + The exponentiation operator. It raises the first operand to the power + of the second one. + + @item : + The range operator. Normally used in the form of array(low:high) to + represent a section of array. + @end table + + @node Fortran Defaults + @subsubsection Fortran Defaults + + @cindex Fortran Defaults + + Fortran symbols are usually case-insensitive, so @value{GDBN} by + default uses case-insensitive matches for Fortran symbols. You can + change that with the @samp{set case-insensitive} command, see + @ref{Symbols}, for the details. + + @node Special commands + @subsubsection Special commands + + @cindex Special commands + + @value{GDBN} had some commands to support Fortran specific feature, + such as common block display. + @table @code @cindex @code{COMMON} blocks, Fortran @kindex info common *************** all @code{COMMON} blocks visible at curr *** 9099,9108 **** printed. @end table ! Fortran symbols are usually case-insensitive, so @value{GDBN} by ! default uses case-insensitive matches for Fortran symbols. You can ! change that with the @samp{set case-insensitive} command, see ! @ref{Symbols}, for the details. @node Pascal @subsection Pascal --- 9158,9172 ---- printed. @end table ! @node Known Problems ! @subsubsection Known Problems ! ! @cindex Known Problems ! ! There are a few known problems while using @value{GDBN} to debug Fortran ! code. Some of them might even crash GDB or the debugged program. So ! you need to pay attention to them when using @value{GDBN} to debug Fortran ! program. @node Pascal @subsection Pascal Regards - Wu Zhou P.S: This patch is quite an initial one. I am mainly use this to solicit comment to see if I am on the correct track.