From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23712 invoked by alias); 30 Jan 2008 18:21:57 -0000 Received: (qmail 23703 invoked by uid 22791); 30 Jan 2008 18:21:56 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Jan 2008 18:21:37 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-45-178.inter.net.il [80.230.45.178]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id EUU91004 (AUTH halo1); Wed, 30 Jan 2008 20:20:43 +0200 (IST) Date: Wed, 30 Jan 2008 18:31:00 -0000 Message-Id: From: Eli Zaretskii To: "Rob Quill" CC: jimb@red-bean.com, gdb-patches@sourceware.org In-reply-to: (rob.quill@gmail.com) Subject: Re: New scope checking patch Reply-to: Eli Zaretskii References: X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00812.txt.bz2 > Date: Wed, 30 Jan 2008 12:05:35 +0000 > From: "Rob Quill" > > I have attached the docs patch below. Thanks. > I wasn't sure how much to put in the docs Imagine yourself reading the manual and put there as much stuff as you would like to find if you were reading about this feature for the first time. > Any feedback is much appreciated. I have some comments below. > * gdb.texinfo (Program Variables): Add a small paragraph about > the $in_scope operator. The name in parentheses should be the name of the node, not the chapter/section. I actually think that this feature should be described in the node "Convenience Vars", not in "Variables". The latter describes how to refer to variables in the program being debugged; while $in_scope is related (and should perhaps be cross-referenced from "Variables"), that is not the right place for describing GDB built-ins. > Index: gdb/NEWS > =================================================================== > RCS file: /cvs/src/src/gdb/NEWS,v > retrieving revision 1.254 > diff -u -p -r1.254 NEWS > --- gdb/NEWS 30 Jan 2008 00:51:49 -0000 1.254 > +++ gdb/NEWS 30 Jan 2008 11:56:12 -0000 > @@ -3,6 +3,12 @@ > > *** Changes since GDB 6.7 > > +* New expression type > + > +$in_scope(...) > + The value of this expression is 1 if the variable within the > + parentheses is within the current scope, 0 otherwise. This is okay. > +The @code{$in_scope} operator can be used to check if a variable is in scope, > +returning 1 if it is and 0 if it is not. This is most useful when scripting GDB Two spaces after a period that ends a sentence, please. Also, please use @value{GDBN} instead of a literal "GDB", as we do elsewhere in the manual. Finally, please add index entries for this feature. I suggest these: @vindex $in_scope @cindex variable in scope, testing