MI/C++/references fixup
Vladimir Prus
ghost@cs.msu.su
Wed Dec 6 09:17:00 GMT 2006
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00REFERENCES.diff
Type: text/x-diff
Size: 4485 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20061206/b8e4d8af/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mi-var-cp.cc
Type: text/x-objcsrc
Size: 915 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20061206/b8e4d8af/attachment-0001.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mi-var-cp.exp
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20061206/b8e4d8af/attachment.ksh>
More information about the Gdb-patches
mailing list