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: [PATCH 3/7] Remove field value_of_root


> 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


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