From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11887 invoked by alias); 20 Sep 2010 10:58:12 -0000 Received: (qmail 11876 invoked by uid 22791); 20 Sep 2010 10:58:12 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out1.tiscali.nl (HELO smtp-out1.tiscali.nl) (195.241.79.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Sep 2010 10:58:08 +0000 Received: from [212.123.169.34] (helo=[192.168.1.100]) by smtp-out1.tiscali.nl with esmtp (Exim) (envelope-from ) id 1Oxe4T-0004VA-L4; Mon, 20 Sep 2010 12:58:05 +0200 Subject: Re: [PATCH] [RFC] python: gdb.Type: strip typedefs past pointers too From: Paul Bolle To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Daniel Jacobowitz In-Reply-To: <20100920100417.GA5751@host1.dyn.jankratochvil.net> References: <1284753356.21566.10.camel@localhost.localdomain> <20100920100417.GA5751@host1.dyn.jankratochvil.net> Content-Type: text/plain; charset="UTF-8" Date: Mon, 20 Sep 2010 16:08:00 -0000 Message-ID: <1284979636.1857.47.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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/msg00342.txt.bz2 Message-ID: <20100920160800.NnaMF5WqE8VhF2EAMbs1dTtENzPrUXr9yrJqpb8YB7Q@z> On Mon, 2010-09-20 at 12:04 +0200, Jan Kratochvil wrote: > On Fri, 17 Sep 2010 21:55:56 +0200, Paul Bolle wrote: > > 1) I drafted a patch (pasted below this message) that works around this > > limitation: > > > > (gdb) ptype wchar_t > > type = long int > > (gdb) ptype wchar_t * > > type = long int * > > What is the goal of this patch? strip_typedefs I understand to be the Python > interface to check_typedef. Basically I tried to emulate the current behavior of the ptype command, which goes past pointers to look whether their target is typedef'd too (see the second example above). Daniel explained that this seems to be a bug in the ptype command. > The strip_typedefs description should be fixed anyway as the text is now > ambiguous. Do you mean that the current text is ambiguous? In the commit message of my draft patch I noted that strip_typedefs() "doesn't really behave as advertised (well, as I understand the advertisement)". I understood that text to mean that behavior similar to that of the ptype command was intended. Paul Bolle