Daniel Jacobowitz wrote: > On Wed, Nov 29, 2006 at 05:41:13PM +0300, Vladimir Prus wrote: >> +# Creates varobj named NAME for EXPRESSION. >> +# Name cannot be "-". >> +proc mi_create_varobj { name expression } { > >> +# Updates varobj named NAME and checks that all varobjs in EXPECTED >> +# are reported as updated, and no other varobj is updated. >> +# Assumes that no varobj is out of scope and that no varobj changes >> +# types. >> +proc mi_varobj_update { name expected } { > >> +proc mi_check_varobj_value { name value } { > > I would recommend giving these an argument for the test name, as some > of the other helper functions do. Otherwise, if you call them twice in > a row with the same arguments (which your test does) then you've got > two tests with the same name. > > On Thu, Nov 30, 2006 at 10:31:07AM +0300, Vladimir Prus wrote: >> > * gdb.mi/mi-cpp.cpp: New file. >> > >> > gdb.mi/mi-var-cp.exp? >> > gdb.mi/mi-var-cp.cc? >> > >> > Its for variable objects, and for consistency. The testsuite has the >> > directory gdb.cp and it's populated with *.cc files >> >> I've no problems with 'cp' and '.cc'. I don't think that '-var-' is good >> -- now, there is just single MI test dealing with C++, so I want a >> testcase that will accumulate all C++ specific things, not necessary >> related to variable objects. But I don't care much. > > I'd rather keep varobj tests easily identifiable; please use Nick's > suggestions. Here's revised patch. Ok for HEAD? - Volodya * varobj.c (varobj_create): Don't call release_value. (varobj_set_value): Likewise. (install_new_value): Call coerce_ref and release_value on the value. Add asserts. testsuite/ * lib/mi-support.exp (mi_runto): Accept "()" after function name. (mi_create_varobj): New function. (mi_varobj_update): New function. (mi_Check_varobj_value): New function. * gdb.mi/mi-var-cp.exp: New file. * gdb.mi/mi-var-cp.cc: New file.