This is a second revision of the patch to add MI command that creates varobjs for registers. The command is renamed to -var-list and used like: -var-list --registers There are now docs and tests. The created variable objects no longer have 'public' pseudo-fields, no matter what the language of the program is. Along the way, I've promoted a private function in ada-lang.c to language.c, so I'd appreciate if Ada maintainers take a quick look. OK? - Volodya Implement the -var-list command, with initial support for listing registers. * mi/mi-cmds.h (mi_cmd_var_list): New. * mi/mi-cmds.c: Register "var-list". * mi/mi-cmd-var.c (create_varobj_in_frame): New function. (mi_cmd_var_create): Use the above. (restore_language_mode): New. (mi_cmd_var_list): New. * language.h (restore_language): Declare. * language.c (restore_language): New function. * ada-lang.c (restore_language): Remove. (lookup_symbol_in_language): Adjust. * Makefile (mi-cmd-var.o): Update dependencies. doc/ * gdb.texinfo (GDB/MI Variable Objects): Document -var-list. testsuite/ * gdb.mi/mi-var-cmd.exp: Test for -var-list.