Automatic date update in version.in
[platform/upstream/binutils.git] / gdb / varobj.h
index e32c6ef..d5ab0f9 100644 (file)
@@ -1,5 +1,5 @@
 /* GDB variable objects API.
-   Copyright (C) 1999-2013 Free Software Foundation, Inc.
+   Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -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;
@@ -177,26 +167,26 @@ struct varobj
 struct lang_varobj_ops
 {
   /* The number of children of PARENT.  */
-  int (*number_of_children) (struct varobj * parent);
+  int (*number_of_children) (struct varobj *parent);
 
   /* The name (expression) of a root varobj.  */
-  char *(*name_of_variable) (struct varobj * parent);
+  char *(*name_of_variable) (struct varobj *parent);
 
   /* The name of the INDEX'th child of PARENT.  */
-  char *(*name_of_child) (struct varobj * parent, int index);
+  char *(*name_of_child) (struct varobj *parent, int index);
 
   /* Returns the rooted expression of CHILD, which is a variable
      obtain that has some parent.  */
-  char *(*path_expr_of_child) (struct varobj * child);
+  char *(*path_expr_of_child) (struct varobj *child);
 
   /* The ``struct value *'' of the INDEX'th child of PARENT.  */
-  struct value *(*value_of_child) (struct varobj * parent, int index);
+  struct value *(*value_of_child) (struct varobj *parent, int index);
 
   /* The type of the INDEX'th child of PARENT.  */
-  struct type *(*type_of_child) (struct varobj * parent, int index);
+  struct type *(*type_of_child) (struct varobj *parent, int index);
 
   /* The current value of VAR.  */
-  char *(*value_of_variable) (struct varobj * var,
+  char *(*value_of_variable) (struct varobj *var,
                              enum varobj_display_formats format);
 
   /* Return non-zero if changes in value of VAR must be detected and
@@ -223,13 +213,20 @@ struct lang_varobj_ops
      Languages where types do not mutate can set this to NULL.  */
   int (*value_has_mutated) (struct varobj *var, struct value *new_value,
                            struct type *new_type);
+
+  /* Return nonzero if VAR is a suitable path expression parent.
+
+     For C like languages with anonymous structures and unions an anonymous
+     structure or union is not a suitable parent.  */
+  int (*is_path_expr_parent) (struct varobj *var);
 };
 
-const struct lang_varobj_ops c_varobj_ops;
-const struct lang_varobj_ops cplus_varobj_ops;
-const struct lang_varobj_ops java_varobj_ops;
-const struct lang_varobj_ops ada_varobj_ops;
+extern const struct lang_varobj_ops c_varobj_ops;
+extern const struct lang_varobj_ops cplus_varobj_ops;
+extern const struct lang_varobj_ops java_varobj_ops;
+extern const struct lang_varobj_ops ada_varobj_ops;
 
+#define default_varobj_ops c_varobj_ops
 /* API functions */
 
 extern struct varobj *varobj_create (char *objname,
@@ -285,7 +282,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);
 
@@ -315,7 +312,9 @@ extern void varobj_enable_pretty_printing (void);
 
 extern int varobj_has_more (struct varobj *var, int to);
 
-extern int varobj_pretty_printed_p (struct varobj *var);
+extern int varobj_is_dynamic_p (struct varobj *var);
+
+extern struct cleanup *varobj_ensure_python_env (struct varobj *var);
 
 extern int varobj_default_value_is_changeable_p (struct varobj *var);
 extern int varobj_value_is_changeable_p (struct varobj *var);
@@ -335,4 +334,7 @@ extern void varobj_formatted_print_options (struct value_print_options *opts,
 
 extern void varobj_restrict_range (VEC (varobj_p) *children, int *from,
                                   int *to);
+
+extern int varobj_default_is_path_expr_parent (struct varobj *var);
+
 #endif /* VAROBJ_H */