From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23377 invoked by alias); 4 Nov 2011 17:42:14 -0000 Received: (qmail 23367 invoked by uid 22791); 4 Nov 2011 17:42:13 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Nov 2011 17:41:58 +0000 Received: by qadc11 with SMTP id c11so2922758qad.0 for ; Fri, 04 Nov 2011 10:41:58 -0700 (PDT) Received: by 10.224.182.196 with SMTP id cd4mr7921056qab.3.1320428518064; Fri, 04 Nov 2011 10:41:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.182.196 with SMTP id cd4mr7921043qab.3.1320428517926; Fri, 04 Nov 2011 10:41:57 -0700 (PDT) Received: by 10.224.6.76 with HTTP; Fri, 4 Nov 2011 10:41:57 -0700 (PDT) In-Reply-To: References: <3A3AF5AE-70E8-43D0-B8CE-DCADFEEF879A@comcast.net> <560557F2-1B8B-4633-8CD6-E63705EEAF0E@comcast.net> <83wrckrcg1.fsf@gnu.org> Date: Fri, 04 Nov 2011 17:42:00 -0000 Message-ID: Subject: Re: [RFA] Re: Python: add field access by name and standard python mapping methods to gdb.Type From: Doug Evans To: Paul Koning Cc: Eli Zaretskii , tromey@redhat.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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-11/txt/msg00120.txt.bz2 On Tue, Oct 4, 2011 at 8:56 AM, Paul Koning wrote: > > On Oct 4, 2011, at 11:41 AM, Eli Zaretskii wrote: > >>> From: Paul Koning >>> Date: Tue, 4 Oct 2011 11:29:58 -0400 >>> Cc: Doug Evans , gdb-patches@sourceware.org >>> >>> >>>> For future reference, there is a separate ChangeLog in doc. =A0Entries= for >>>> documentation have to go there. >>> >>> I overlooked that file. =A0Thanks for the reference. =A0Should I move t= he entry there? >> >> Yes, please. > > Done. > >> >>>> Could you write a NEWS entry for this change? >>> >>> How about this? >> >> Fine with me, thanks. > > Committed. Ummm, hi. I know I looked at the patch and approved it myself, but having played with it for awhile I'm having second thoughts. And before a release goes out I'd like to get this resolved. If you want I'll do the work, or at least help however I can. One way to look at my reasoning is that a type "has a" field list but it's not the case that a type "is a" field list. And I'm uncomfortable with len(gdb.parse_and_eval("1").type) =3D=3D 0. IOW, len(gdb.Type of "int") is now 0. I think it should flag an exception. OTOH, adding the new support to the result of gdb.Type.fields() is great. Anyone object to me changing things and moving the new iterator support to gdb.Type.fields()? Or do people disagree with my reasoning? I haven't looked into what's involved. At this point I just want to get the user-visible semantics right.