Frozen variable objects 2

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Frozen variable objects 2

Vladimir Prus-3

This is the final patch to add frozen variable objects. It includes testsuite
changes and documentation.

Since the time I've posted the first version the code has seen some extra
testing, and basically works fine. The only change is that now the "frozen=1"
fields is only output for frozen variable objects and "frozen=0" is never output.
This is to avoid adjusting everything single use of -var-create in the testsuite.

This patch depends on some of my previously posted patches, namely:

        - mi_continue_to cleanup
        - varobj doc cleanup
        - simplified MI tests

OK?

- Volodya

        gdb/
        * varobj.h (varobj_set_frozen): New
        (varobj_get_frozen): New.
        (varobj_update): New parameter explicit.
        * varobj.c (struct varobj): New fields frozen
        and not_fetched.
        (varobj_set_frozen, varobj_get_frozen): New.
        (install_new_value): Don't fetch values for
        frozen variable object, or children thereof.  Allow
        a frozen variable object to have non-fetched value.
        (varobj_update): Allow updating child variables.
        Don't traverse frozen children.
        (new_variable): Initialize the frozen field.
        (c_value_of_variable): Return NULL for frozen
        variable without any value yet.
        * mi/mi-cmd-var.c (varobj_update_one): New parameter
        'explicit'.
        (mi_cmd_var_create): Output the 'frozen' field,
        as soon as testsuite is adjusted to expect that field.
        (mi_cmd_var_set_frozen): New.
        (mi_cmd_var_update): Pass the 'explicit' parameter to
        varobj_update_one.
        * mi/mi-cmds.c (mi_cmds): Register '-var-set-frozen'.
        * mi/mi-cmds.h (mi_cmd_var_set_frozen): Declare.

        doc/
        * gdb.texinfo (GDB/MI Variable Objects): Document
        frozen variables objects.

        testsuite/
        * gdb.mi/mi-var-cmd.exp: Delete varobjs left by previous
        tests. Run the frozen varobjs test.
        * gdb.mi/var-cmd.c (do_frozen_tests): New.
        * lib/mi-support.exp (mi_varobj_delete): New.
        (mi_varobj_update): Fix thinko.
       

frozen__gdb_mainline.diff (23K) Download Attachment