From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16570 invoked by alias); 20 Sep 2010 11:14:07 -0000 Received: (qmail 16561 invoked by uid 22791); 20 Sep 2010 11:14:06 -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-out3.tiscali.nl (HELO smtp-out3.tiscali.nl) (195.241.79.178) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Sep 2010 11:14:02 +0000 Received: from [212.123.169.34] (helo=[192.168.1.100]) by smtp-out3.tiscali.nl with esmtp (Exim) (envelope-from ) id 1OxeJr-0001kF-Nm; Mon, 20 Sep 2010 13:13:59 +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:25: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/msg00343.txt.bz2 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10705 invoked by alias); 20 Sep 2010 10:53:31 -0000 Received: (qmail 10695 invoked by uid 22791); 20 Sep 2010 10:53:30 -0000 X-SWARE-Spam-Status: No, hits=-1.7 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-out2.tiscali.nl (HELO smtp-out2.tiscali.nl) (195.241.79.177) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Sep 2010 10:53:25 +0000 Received: from [212.123.169.34] (helo=[192.168.1.100]) by smtp-out2.tiscali.nl with esmtp (Exim) (envelope-from ) id 1Oxdzu-0002on-La; Mon, 20 Sep 2010 12:53:22 +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 13:59: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/msg00341.txt.bz2 Message-ID: <20100920135900.lj1_YOTf85WJQPt00GWAdHgmTpWfEYdUE4dJ5pEOZqI@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 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