From fa4d0c4081f7337c0126a01f16959f7a4e864ff5 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Wed, 9 Oct 2013 22:10:14 +0800 Subject: Remove varobj_language_string, languages and varobj_languages This patch does some cleanups, removing some language-related stuff. Note that mi_cmd_var_info_expression uses varobj_language_string, which is redundant, because we can get language name from lang->la_natural_name. varobj_language_string doesn't have "Ada", which looks like a bug to me. With this patch applied, this problem doesn't exist, because the language name is got from the same place (field la_natural_name). gdb: 2013-11-07 Yao Qi * mi/mi-cmd-var.c: Include "language.h". (mi_cmd_var_info_expression): Get language name from language_defn. * varobj.c (varobj_language_string): Remove. (variable_language): Remove declaration. (languages): Remove. (varobj_get_language): Change the type of return value. (variable_language): Remove. * varobj.h (enum varobj_languages): Remove. (varobj_language_string): Remove declaration. (varobj_get_language): Update declaration. gdb/doc: 2013-11-07 Yao Qi * gdb.texinfo (GDB/MI Variable Objects): Update doc about the output of "-var-info-expression". --- gdb/varobj.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'gdb/varobj.h') diff --git a/gdb/varobj.h b/gdb/varobj.h index 2379c3d9c30..978d9b94c92 100644 --- a/gdb/varobj.h +++ b/gdb/varobj.h @@ -52,16 +52,6 @@ enum varobj_scope_status /* String representations of gdb's format codes (defined in varobj.c). */ extern char *varobj_format_string[]; -/* Languages supported by this variable objects system. This enum is used - to index arrays so we make its first enum explicitly zero. */ -enum varobj_languages - { - vlang_c = 0, vlang_cplus, vlang_java, vlang_ada, vlang_end - }; - -/* String representations of gdb's known languages (defined in varobj.c). */ -extern char *varobj_language_string[]; - /* Struct thar describes a variable object instance. */ struct varobj; @@ -286,7 +276,7 @@ extern struct type *varobj_get_gdb_type (struct varobj *var); extern char *varobj_get_path_expr (struct varobj *var); -extern enum varobj_languages varobj_get_language (struct varobj *var); +extern const struct language_defn *varobj_get_language (struct varobj *var); extern int varobj_get_attributes (struct varobj *var); -- cgit v1.2.1