This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] varobj: call CHECK_TYPEDEF
- From: Keith Seitz <keiths at redhat dot com>
- To: David Carlton <carlton at math dot stanford dot edu>
- Cc: Andrew Cagney <ac131313 at redhat dot com>, "gdb-patches at sources dot redhat dot com" <gdb-patches at sources dot redhat dot com>, Daniel Jacobowitz <drow at mvista dot com>
- Date: 11 Jun 2003 17:36:02 -0700
- Subject: Re: [RFA] varobj: call CHECK_TYPEDEF
- Organization:
- 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> <ro1d6hk5g4q.fsf@jackfruit.Stanford.EDU>
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