From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21499 invoked by alias); 19 Sep 2010 17:56:58 -0000 Received: (qmail 21488 invoked by uid 22791); 19 Sep 2010 17:56:56 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Sep 2010 17:56:52 +0000 Received: (qmail 17478 invoked from network); 19 Sep 2010 17:56:50 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 19 Sep 2010 17:56:50 -0000 Date: Mon, 20 Sep 2010 09:32:00 -0000 From: Daniel Jacobowitz To: Paul Bolle Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [PATCH] [RFC] python: gdb.Type: strip typedefs past pointers too Message-ID: <20100919175644.GA24247@caradoc.them.org> Mail-Followup-To: Paul Bolle , Joel Brobecker , gdb-patches@sourceware.org References: <1284753356.21566.10.camel@localhost.localdomain> <20100918141253.GM3845@adacore.com> <1284841648.1857.12.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1284841648.1857.12.camel@localhost.localdomain> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-09/txt/msg00334.txt.bz2 On Sat, Sep 18, 2010 at 10:27:28PM +0200, Paul Bolle wrote: > On Sat, 2010-09-18 at 10:12 -0400, Joel Brobecker wrote: > > Personally, I think that the current behavior is correct. But I did > > not participate in the design of the API, so others will probably > > have a more informed opinion. > > > > If we want to support the behavior you are looking for, I think it > > should be done either through the control of a parameter (defaulted > > to current behavior), or another method (recursive_strip_typedef). > > The documentation reads: > > -- Method on Type: strip_typedefs > > Return a new `gdb.Type' that represents the real type, after > > removing all layers of typedefs. > > I feel that both the name of this function (which uses typedefs in > plural) and the documentation imply the behavior my patch tries to > achieve. I agree with Joel; the current behavior is correct. I'm surprised by the CLI example you gave; I kind of consider that a bug too... -- Daniel Jacobowitz CodeSourcery