This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] varobj: call CHECK_TYPEDEF


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]