Simpify varobj children handling for C++
Vladimir Prus
ghost@cs.msu.su
Mon Dec 25 08:16:00 GMT 2006
Vladimir Prus wrote:
>
> This patch merges the code for getting name, value and type of
> varobj children for C++ into one function, just like the previously
> posted patch for C.
>
> This was manually tested from KDevelop. We really need tests
> for MI C++ functionality, and I plan to write them, but only
> after my patch that makes it possible to write MI tests using
> just C files is approved.
>
> Is this patch OK provided that tests will be writted before committing?
Here's a revised version of this. I've noticed that the new
adjust_value_for_children_access function subsumes get_type_deref,
and therefore this patch removes get_type_deref.
- Volodya
Refactor getting children name, value and type access
for varobjs in C++.
* value.c (value_as_address): Use coerce_array_proper
instead of coerce_array so that not fail for references.
(coerce_array_proper): New function.
(coerce_array): Use the above.
* value.h (coerce_array_proper): Declare.
* valops.c (value_ind): Handle references.
* varobj.c (get_type_deref): Remove.
(adjust_value_for_children_access): New.
(c_number_of_children): Use the above.
(c_describe_child): Likewise.
(enum accessibility): New.
(match_accessibility): New function.
(cplus_describe_child): New function.
(cplus_name_of_child, cplus_value_of_child)
(cplus_type_of_child): Reimplement in terms
of cplus_describe_child.
(cplus_number_of_children): Use
adjust_value_for_children_access.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: path_4_unify_cpp__gdb_mainline.diff
Type: text/x-diff
Size: 17618 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20061225/5e7484f9/attachment.bin>
More information about the Gdb-patches
mailing list