1 /* GDB variable objects API.
2 Copyright (C) 1999, 2000, 2001, 2005, 2007, 2008, 2009
3 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
25 /* Enumeration for the format types */
26 enum varobj_display_formats
28 FORMAT_NATURAL, /* What gdb actually calls 'natural' */
29 FORMAT_BINARY, /* Binary display */
30 FORMAT_DECIMAL, /* Decimal display */
31 FORMAT_HEXADECIMAL, /* Hex display */
32 FORMAT_OCTAL /* Octal display */
37 USE_SPECIFIED_FRAME, /* Use the frame passed to varobj_create */
38 USE_CURRENT_FRAME, /* Use the current frame */
39 USE_SELECTED_FRAME /* Always reevaluate in selected frame */
42 /* Enumerator describing if a variable object is in scope. */
43 enum varobj_scope_status
45 VAROBJ_IN_SCOPE = 0, /* Varobj is scope, value available. */
46 VAROBJ_NOT_IN_SCOPE = 1, /* Varobj is not in scope, value not available,
47 but varobj can become in scope later. */
48 VAROBJ_INVALID = 2, /* Varobj no longer has any value, and never
52 /* String representations of gdb's format codes (defined in varobj.c) */
53 extern char *varobj_format_string[];
55 /* Languages supported by this variable objects system. */
58 vlang_unknown = 0, vlang_c, vlang_cplus, vlang_java, vlang_end
61 /* String representations of gdb's known languages (defined in varobj.c) */
62 extern char *varobj_language_string[];
64 /* Struct thar describes a variable object instance */
67 typedef struct varobj *varobj_p;
70 typedef struct varobj_update_result_t
72 struct varobj *varobj;
75 enum varobj_scope_status status;
76 } varobj_update_result;
78 DEF_VEC_O (varobj_update_result);
82 extern struct varobj *varobj_create (char *objname,
83 char *expression, CORE_ADDR frame,
84 enum varobj_type type);
86 extern char *varobj_gen_name (void);
88 extern struct varobj *varobj_get_handle (char *name);
90 extern char *varobj_get_objname (struct varobj *var);
92 extern char *varobj_get_expression (struct varobj *var);
94 extern int varobj_delete (struct varobj *var, char ***dellist,
97 extern enum varobj_display_formats varobj_set_display_format (
99 enum varobj_display_formats format);
101 extern enum varobj_display_formats varobj_get_display_format (
104 extern int varobj_get_thread_id (struct varobj *var);
106 extern void varobj_set_frozen (struct varobj *var, int frozen);
108 extern int varobj_get_frozen (struct varobj *var);
110 extern int varobj_get_num_children (struct varobj *var);
112 /* Return the list of children of VAR. The returned vector
113 should not be modified in any way. */
114 extern VEC (varobj_p)* varobj_list_children (struct varobj *var);
116 extern char *varobj_get_type (struct varobj *var);
118 extern struct type *varobj_get_gdb_type (struct varobj *var);
120 extern char *varobj_get_path_expr (struct varobj *var);
122 extern enum varobj_languages varobj_get_language (struct varobj *var);
124 extern int varobj_get_attributes (struct varobj *var);
126 extern char *varobj_get_formatted_value (struct varobj *var,
127 enum varobj_display_formats format);
129 extern char *varobj_get_value (struct varobj *var);
131 extern int varobj_set_value (struct varobj *var, char *expression);
133 extern int varobj_list (struct varobj ***rootlist);
135 extern VEC(varobj_update_result) *varobj_update (struct varobj **varp,
138 extern void varobj_invalidate (void);
140 extern int varobj_editable_p (struct varobj *var);
142 extern int varobj_floating_p (struct varobj *var);
144 #endif /* VAROBJ_H */