[mi] fix 'editable' attribute for references

Vladimir Prus ghost@cs.msu.su
Tue Jan 16 19:06:00 GMT 2007


Vladimir Prus wrote:

> 
> I've noticed that the -var-show-references returns 'attr=noneditable' for
> structures, but 'attr=editable' for references to structures, which makes
> no sense.

I've also noticed that while for structures, we don't compare old 
and new values, and never report varobj corresponding to structure as
changed, we do all that for references to structures. This patch fixes
both problems, OK?

- Volodya

        Fix the 'editable' attribute computation
        for references.

        testsuite/
        * lib/mi-support.exp (mi_delete_varobj): New.
        * gdb.mi/mi-var-cp.exp: Run the reference_to_struct
        testcase.
        * gdb.mi/mi-var-cp.cc (reference_to_struct): New function.
        (main): Call the above.
        (reference_update_test, base_in_reference_test)
        (reference_to_pointer): Delete the created varobjs.

        gdb/
        * varobj.c (get_value_type): New function.
        (c_variable_editable): Use get_value_type.
        (varobj_value_is_changeable): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: path_3_5_references__gdb_mainline.diff
Type: text/x-diff
Size: 4666 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20070116/d9298c69/attachment.bin>


More information about the Gdb-patches mailing list