From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32369 invoked by alias); 12 Jun 2003 00:28:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32332 invoked from network); 12 Jun 2003 00:28:40 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 12 Jun 2003 00:28:40 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h5C0SeH29247 for ; Wed, 11 Jun 2003 20:28:40 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h5C0SdI04851; Wed, 11 Jun 2003 20:28:39 -0400 Received: from [150.1.200.14] (vpn50-62.rdu.redhat.com [172.16.50.62]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h5C0Sce28621; Wed, 11 Jun 2003 20:28:39 -0400 Subject: Re: [RFA] varobj: call CHECK_TYPEDEF From: Keith Seitz To: David Carlton Cc: Andrew Cagney , "gdb-patches@sources.redhat.com" , Daniel Jacobowitz In-Reply-To: References: <1051215397.1538.43.camel@lindt.uglyboxes.com> <3EA84A9B.5020308@redhat.com> <1051221433.1534.72.camel@lindt.uglyboxes.com> <3EA8629B.50603@redhat.com> <1055362509.1571.63.camel@lindt.uglyboxes.com> Content-Type: text/plain Organization: Message-Id: <1055378162.1571.98.camel@lindt.uglyboxes.com> Mime-Version: 1.0 Date: Thu, 12 Jun 2003 00:28:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00405.txt.bz2 On Wed, 2003-06-11 at 16:49, David Carlton wrote: > I've just gone and looked over the thread and at Keith's patch; I > think the idea is sound, but the implementation isn't. The comments > at the top of get_type say that it's supposed to skip past typedefs, > so calling CHECK_TYPEDEF certainly seems legitimate. But > CHECK_TYPEDEF calls check_typedef, which already goes through chains > of typedefs, so you can get rid of the loop in get_type. Yup, I think you are correct. I'm sure that I was just being laz^Whasty. :-) I'll note that there is still one failure in the testsuite. gdb.mi/mi-var-display.exp: create local variable weird (aka insight's c_variable 6.22) fails because the output type is now considered "struct _struct_decl" instead of it's typedef name "weird". I believe it is a bug below varobj, though. In varobj_create, gdb_evaluate_expression is called. It returns the struct value for the expression. It returns a type that looks like: var->value->type->main_type->code = TYPE_CODE_PTR var->value->type->main_type->target_type->main_type->code = TYPE_CODE_STRUCT, tag_name="_struct_decl" I think that this is wrong, and it should be "TYPE_CODE_TYPEDEF" and "weird_struct"... Or am I yet again being laz^Whasty? :-) Keith