From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13575 invoked by alias); 16 Mar 2011 19:23:37 -0000 Received: (qmail 13566 invoked by uid 22791); 16 Mar 2011 19:23:36 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Mar 2011 19:23:29 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LI6004000B0YM00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Wed, 16 Mar 2011 21:22:16 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.107.218]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LI6004690H218A0@a-mtaout20.012.net.il>; Wed, 16 Mar 2011 21:22:16 +0200 (IST) Date: Wed, 16 Mar 2011 19:26:00 -0000 From: Eli Zaretskii Subject: Re: [python] [patch] Add is_valid to several classes In-reply-to: To: pmuldoon@redhat.com Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83r5a6q39z.fsf@gnu.org> 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: 2011-03/txt/msg00870.txt.bz2 > From: Phil Muldoon > Date: Wed, 16 Mar 2011 16:02:44 +0000 > > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -38,6 +38,10 @@ > > * Python scripting > > + ** Symbols, Symbol Table, Symbol Table and Line, Object Files, > + Inferior, Inferior Thread, Blocks, and Block Iterator APIs now > + have an is_valid method. > + This part is okay. > +@defmethod Inferior is_valid > +Returns true if the @code{gdb.Inferior} object is valid, false if ^^^^ ^^^^^ You mean @code{true} and @code{false}, right? These are Python symbols, aren't they? Same comment on the other uses of "true" and "false". > +A @code{gdb.Objfile} object can become invalid if the object file it > +refers to does not exist in @value{GDBN} any longer. "File does not exist in GDB" sounds awkward: GDB is not a filesystem. How about "file is not loaded in GDB" instead? > +Returns true if the @code{gdb.Block} object is valid, false if not. A ^^ Two spaces. > +@code{gdb.Block} supports via the Python method @code{iter} function. Did you really mean to say "Python method `iter' function"? I think either "method" or "function", no? > +A @code{gdb.Symbol} object can become invalid if the symbol it refers > +to does not exist in @value{GDBN} any longer. How can a symbol cease to exist? > +if not. A @code{gdb.Symtab_and_line} object can become invalid if the > +Symbol table and line object it refers to does not exist in > +@value{GDBN} any longer. Likewise here: does GDB unload symtabs once they were loaded? > +A @code{gdb.Symtab} object can become invalid if the symbol table it > +refers to does not exist in @value{GDBN} any longer. And here. Thanks.