Re: [PATCH 3/7] Remove field value_of_root

Joel Brobecker
2013-10-01T10:16:11Z

> c_value_of_root is used for all languages, so it is unnecessary to
> have a field 'value_of_root' any more in 'struct language_specific'.
> This patch removes the field 'value_of_root' and use c_value_of_root.
>
> gdb:
>
> 2013-09-18 Yao Qi <yao@codesourcery.com>
>
> * varobj.c (c_value_of_root): Remove declaration.
> (cplus_value_of_root, java_value_of_root): Likewise.
> (ada_value_of_root): Likewise.
> (struct language_specific) <value_of_root>: Remove.
> (languages): Update initialization.
> (check_scope): Moved earlier.
> (c_value_of_root): Renamed to ...
> (value_of_root_1): ... this.
> (value_of_root): Caller update.
> (cplus_value_of_root, java_value_of_root): Remove.
> (ada_value_of_root): Remove.

I think it's a step in the right direction, as I don't see how
we would want a language-specific value-of-root. So, LGTM, but
could you also add an empty line after the description of function
check_scope? Also, Could you mention that "c_value_of_root" was
moved earlier as well (ie: "Move earlier and renamed to...").

> +/* If frame associated with VAR can be found, switch
> + to it and return 1. Otherwise, return 0. */
> +static int
> +check_scope (struct varobj *var)

Thanks,
--
Joel