New varobj language callback: value_is_changeable_p.
authorJoel Brobecker <brobecker@gnat.com>
Wed, 28 Mar 2012 21:31:29 +0000 (21:31 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Wed, 28 Mar 2012 21:31:29 +0000 (21:31 +0000)
commitd32cafc7d5388a56e7e1bb832891e4dd8f2535ae
tree3fa75daeb99d8fb27a08b9782a72a88f27ef140a
parent181875a4ab05b144b16271677cdfcac85edd5c7e
New varobj language callback: value_is_changeable_p.

This patch introduces a new language-specific callback for varobj
objects, allowing us to move the language-specific bits of the
varobj_value_is_changeable_p routine to language-specific functions.
This is more elegant than testing for the varobj's language...

gdb/ChangeLog:

        * varobj.c (default_value_is_changeable_p): New function,
        extracted from varobj_value_is_changeable_p.  Add declaration.
        (ada_value_is_changeable_p): New function, extracted from
        varobj_value_is_changeable_p.  Add declaration.
        (struct language_specific): New field "value_is_changeable_p".
        (languages): Add entries for new field.
        (varobj_create): Set language before calling install_new_value.
        (varobj_value_is_changeable_p): Reimplement to call the varobj's
        "value_is_changeable_p" language callback.
gdb/ChangeLog
gdb/varobj.c