+2011-07-18 Jean-Charles Delay <delay@adacore.com>
+
+ * varobj.h (varobj_languages): Add vlang_ada definition to the list
+ of supported languages.
+ * varobj.c: Add top definitions and basic implementation of the
+ following callbacks: ada_number_of_children, ada_name_of_variable,
+ ada_name_of_child, ada_path_expr_of_child, ada_value_of_root,
+ ada_value_of_child, ada_type_of_child, ada_value_of_variable.
+ (languages): Register Ada-specific callbacks.
+ (variable_language): Add the Ada case in the language setter switch.
+
2011-07-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* remote-mips.c (pmon_download): Fix ignored return value GCC warning.
static char *java_value_of_variable (struct varobj *var,
enum varobj_display_formats format);
+/* Ada implementation */
+
+static int ada_number_of_children (struct varobj *var);
+
+static char *ada_name_of_variable (struct varobj *parent);
+
+static char *ada_name_of_child (struct varobj *parent, int index);
+
+static char *ada_path_expr_of_child (struct varobj *child);
+
+static struct value *ada_value_of_root (struct varobj **var_handle);
+
+static struct value *ada_value_of_child (struct varobj *parent, int index);
+
+static struct type *ada_type_of_child (struct varobj *parent, int index);
+
+static char *ada_value_of_variable (struct varobj *var,
+ enum varobj_display_formats format);
+
/* The language specific vector */
struct language_specific
java_value_of_root,
java_value_of_child,
java_type_of_child,
- java_value_of_variable}
+ java_value_of_variable},
+ /* Ada */
+ {
+ vlang_ada,
+ ada_number_of_children,
+ ada_name_of_variable,
+ ada_name_of_child,
+ ada_path_expr_of_child,
+ ada_value_of_root,
+ ada_value_of_child,
+ ada_type_of_child,
+ ada_value_of_variable}
};
/* A little convenience enum for dealing with C++/Java. */
case language_java:
lang = vlang_java;
break;
+ case language_ada:
+ lang = vlang_ada;
+ break;
}
return lang;
return cplus_value_of_variable (var, format);
}
+/* Ada specific callbacks for VAROBJs. */
+
+static int
+ada_number_of_children (struct varobj *var)
+{
+ return c_number_of_children (var);
+}
+
+static char *
+ada_name_of_variable (struct varobj *parent)
+{
+ return c_name_of_variable (parent);
+}
+
+static char *
+ada_name_of_child (struct varobj *parent, int index)
+{
+ return c_name_of_child (parent, index);
+}
+
+static char*
+ada_path_expr_of_child (struct varobj *child)
+{
+ return c_path_expr_of_child (child);
+}
+
+static struct value *
+ada_value_of_root (struct varobj **var_handle)
+{
+ return c_value_of_root (var_handle);
+}
+
+static struct value *
+ada_value_of_child (struct varobj *parent, int index)
+{
+ return c_value_of_child (parent, index);
+}
+
+static struct type *
+ada_type_of_child (struct varobj *parent, int index)
+{
+ return c_type_of_child (parent, index);
+}
+
+static char *
+ada_value_of_variable (struct varobj *var, enum varobj_display_formats format)
+{
+ return c_value_of_variable (var, format);
+}
+
/* Iterate all the existing _root_ VAROBJs and call the FUNC callback for them
with an arbitrary caller supplied DATA pointer. */