Simpify varobj children handling for C++

Vladimir Prus ghost@cs.msu.su
Sat Dec 23 21:51:00 GMT 2006


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?

- 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 (adjust_value_for_children_access): New.
	(c_describe_child): Use the above.
	(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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: path_4_unify_cpp__gdb_mainline.diff
Type: text/x-diff
Size: 13830 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20061223/4e71677d/attachment.bin>


More information about the Gdb-patches mailing list