From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27305 invoked by alias); 12 Jun 2003 01:28:25 -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 27297 invoked from network); 12 Jun 2003 01:28:24 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 12 Jun 2003 01:28:24 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19QGti-0006Yy-00; Wed, 11 Jun 2003 20:29:02 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19QGss-0005cT-00; Wed, 11 Jun 2003 21:28:10 -0400 Date: Thu, 12 Jun 2003 01:28:00 -0000 From: Daniel Jacobowitz To: Keith Seitz Cc: David Carlton , Andrew Cagney , "gdb-patches@sources.redhat.com" Subject: Re: [RFA] varobj: call CHECK_TYPEDEF Message-ID: <20030612012810.GA21583@nevyn.them.org> Mail-Followup-To: Keith Seitz , David Carlton , Andrew Cagney , "gdb-patches@sources.redhat.com" 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> <1055378162.1571.98.camel@lindt.uglyboxes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1055378162.1571.98.camel@lindt.uglyboxes.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00406.txt.bz2 On Wed, Jun 11, 2003 at 05:36:02PM -0700, Keith Seitz wrote: > 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. > :-) David's analysis sounds right to me. I'll look over the actual code tomorrow, really I will... > 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 I am 99.99% certain that this test is a compiler problem, not a GDB problem, and that I fixed it in GCC a few months ago. My memory's going though :P -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer