From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24815 invoked by alias); 10 Apr 2012 15:50:12 -0000 Received: (qmail 24803 invoked by uid 22791); 10 Apr 2012 15:50:09 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Apr 2012 15:49:56 +0000 Received: by vcbfk14 with SMTP id fk14so3281158vcb.0 for ; Tue, 10 Apr 2012 08:49:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=kVSfrXDVPYNslPdAMKPwuuedHJoAjVLXTf3jAg6Bu7g=; b=Crh59nn5v6vtB8MKKdJJombyU+arWMEH4ndBGKCyS7owE6dSCntxL37Sh3lOvt+OAE Wc4eIV+NJ1w31FWoR1ZA/rQdSCztqc0iR84c9NHnhOhp4SXjAznK7ekpft/ZKbmuVJNK YkpSibUQ9Of4univyiNBrHY+MMT4Xv2BzLMc50JZ5Wm+xkrXx8UF0XOgm7X8x4fdBG6r uxESV981DqM+PON/xlwDnT6IER8zGhmJCZUhPh9K+sFHlsJKvyZaMb13xc0T6D+lYnc6 rugT5CRMVycGTAP8LZ2A4c/1is2IfeLiFxAE16zNIiGiLjqhYVPlpYjUDPcSo9mGwzK+ 3AMg== Received: by 10.52.179.35 with SMTP id dd3mr4896489vdc.2.1334072994708; Tue, 10 Apr 2012 08:49:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.179.35 with SMTP id dd3mr4896478vdc.2.1334072994558; Tue, 10 Apr 2012 08:49:54 -0700 (PDT) Received: by 10.220.73.14 with HTTP; Tue, 10 Apr 2012 08:49:54 -0700 (PDT) In-Reply-To: References: <87mx6k4b9t.fsf@fleche.redhat.com> Date: Tue, 10 Apr 2012 17:16:00 -0000 Message-ID: Subject: Re: [RFC - Python Scripting] New method gdb.Symtab.blocks_iterator - docs included From: Doug Evans To: Siva Chandra Cc: Tom Tromey , Eli Zaretskii , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQmNudDBKVl1VnLFLw+es/wXyFiGEHXHB/GdRvE75r0ahP0Mp1A2807Ir1RtyMhKjZj+U0mW2eUaNpUWpFt801XVZIB896FQkCLO6HGvNJ2QuGH2AAjRd6I2EHqKcv6TKkoJfJcyT0mic5O81x281FH3c1yhkQ== 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: 2012-04/txt/msg00185.txt.bz2 On Tue, Apr 10, 2012 at 12:44 AM, Siva Chandra wro= te: > Thanks Eli and Tom for taking a look. > > Tom, I have addressed all your comments. =A0For some of them, I have my > own comments below. =A0The updated patch is attached. > > Code - > 2012-04-10 =A0Siva Chandra Reddy =A0 > > =A0 =A0 =A0 =A0Add a new method gdb.Symtab.blocks to iterate > =A0 =A0 =A0 =A0over the scope blocks of a symbol table. > =A0 =A0 =A0 =A0* NEWS (Python scripting): Add entry about the new method. > =A0 =A0 =A0 =A0* python/py-symtab.c (symtab_blocks_iterator_object): New > =A0 =A0 =A0 =A0iterator type to iterate over the scope blocks of a symtab. > =A0 =A0 =A0 =A0(stpy_blocks): New function which implements the new metho= d. > =A0 =A0 =A0 =A0(symtab_blocks_iterator_dealloc): New function which serves > =A0 =A0 =A0 =A0as the tp_dealloc function for symtab_blocks_iterator_obje= ct. > =A0 =A0 =A0 =A0(symtab_blocks_iterator_iter): New function which serves as > =A0 =A0 =A0 =A0the tp_iter function for symtab_blocks_iterator_object. > =A0 =A0 =A0 =A0(symtab_blocks_iterator_iternext): New function which serv= es as > =A0 =A0 =A0 =A0the tp_iternext function for symtab_blocks_iterator_object. > =A0 =A0 =A0 =A0(gdbpy_initialize_symtabs): Add initializations for the new > =A0 =A0 =A0 =A0iterator type. [filed for reference sake] I can imagine bug fixes and improvements meaning that iterating over blocks can give different results one gdb release to the next. I don't want our hands tied because we're afraid of breaking someone's python script. This is an area where I can easily imagine change. I'm not saying this can't go in, to the contrary. But IWBN to have it written down somewhere that we make no promises of absolute consistency one release to the next.