This is the mail archive of the gdb-patches@sourceware.org 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] mi/10586


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> +/* The names of varobjs representing anonymous structs or unions.
Keith> +   Note that is_name_anonymous_type makes assumptions about these two
Keith> +   constants.  */

I didn't see 'is_name_anonymous_type' anywhere in the tree or in the patch.
I guess it needs an update.

Keith> +static int
Keith> +is_path_expr_parent (struct varobj *var)
[...]
Keith> +  type  = get_value_type (var);

Extra space.

Keith> +  return strncmp (child->name, ANONYMOUS_STRUCT_NAME, 11) == 0;

I think this is wrong since the macros have _() in their expansion.
I think you have to use strlen.

Keith> +	field_name = TYPE_FIELD_NAME (type, index);
Keith> +	if (*field_name == '\0')

Can field_name == NULL?
It is not clear to me.  There is some code in gdb that checks this, but
I don't know whether that is defensive programming or checking a
condition that is truly possible.

Otherwise this looks good to me.

Tom


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