This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/7] Remove field value_of_root
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 1 Oct 2013 12:16:08 +0200
- Subject: Re: [PATCH 3/7] Remove field value_of_root
- Authentication-results: sourceware.org; auth=none
- References: <1379512482-31773-1-git-send-email-yao at codesourcery dot com> <1379512482-31773-4-git-send-email-yao at codesourcery dot com>
> 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