]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/varobj.h
* elf32-spu.c (spu_elf_object_p): New function.
[thirdparty/binutils-gdb.git] / gdb / varobj.h
CommitLineData
8b93c638 1/* GDB variable objects API.
9b254dd1
DJ
2 Copyright (C) 1999, 2000, 2001, 2005, 2007, 2008
3 Free Software Foundation, Inc.
8b93c638
JM
4
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
a9762ec7 7 the Free Software Foundation; either version 3 of the License, or
8b93c638
JM
8 (at your option) any later version.
9
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.
14
15 You should have received a copy of the GNU General Public License
a9762ec7 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
8b93c638
JM
17
18#ifndef VAROBJ_H
19#define VAROBJ_H 1
20
21#include "symtab.h"
22#include "gdbtypes.h"
d56d46f5 23#include "vec.h"
8b93c638
JM
24
25/* Enumeration for the format types */
26enum varobj_display_formats
27 {
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 */
33 };
34
73a93a32
JI
35enum varobj_type
36 {
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 */
40 };
8756216b
DP
41
42/* Error return values for varobj_update function. */
43enum varobj_update_error
44 {
45 NOT_IN_SCOPE = -1, /* varobj not in scope, can not be updated. */
46 TYPE_CHANGED = -2, /* varobj type has changed. */
47 INVALID = -3, /* varobj is not valid anymore. */
8756216b
DP
48 };
49
8b93c638
JM
50/* String representations of gdb's format codes (defined in varobj.c) */
51extern char *varobj_format_string[];
52
53/* Languages supported by this variable objects system. */
54enum varobj_languages
55 {
56 vlang_unknown = 0, vlang_c, vlang_cplus, vlang_java, vlang_end
57 };
58
59/* String representations of gdb's known languages (defined in varobj.c) */
60extern char *varobj_language_string[];
61
62/* Struct thar describes a variable object instance */
63struct varobj;
64
d56d46f5
VP
65typedef struct varobj *varobj_p;
66DEF_VEC_P (varobj_p);
67
8b93c638
JM
68/* API functions */
69
70extern struct varobj *varobj_create (char *objname,
73a93a32
JI
71 char *expression, CORE_ADDR frame,
72 enum varobj_type type);
8b93c638
JM
73
74extern char *varobj_gen_name (void);
75
76extern struct varobj *varobj_get_handle (char *name);
77
78extern char *varobj_get_objname (struct varobj *var);
79
80extern char *varobj_get_expression (struct varobj *var);
81
82extern int varobj_delete (struct varobj *var, char ***dellist,
83 int only_children);
84
85extern enum varobj_display_formats varobj_set_display_format (
86 struct varobj *var,
87 enum varobj_display_formats format);
88
89extern enum varobj_display_formats varobj_get_display_format (
90 struct varobj *var);
91
c5b48eac
VP
92extern int varobj_get_thread_id (struct varobj *var);
93
25d5ea92
VP
94extern void varobj_set_frozen (struct varobj *var, int frozen);
95
96extern int varobj_get_frozen (struct varobj *var);
97
8b93c638
JM
98extern int varobj_get_num_children (struct varobj *var);
99
d56d46f5
VP
100/* Return the list of children of VAR. The returned vector
101 should not be modified in any way. */
102extern VEC (varobj_p)* varobj_list_children (struct varobj *var);
8b93c638
JM
103
104extern char *varobj_get_type (struct varobj *var);
105
1ecb4ee0
DJ
106extern struct type *varobj_get_gdb_type (struct varobj *var);
107
02142340
VP
108extern char *varobj_get_path_expr (struct varobj *var);
109
8b93c638
JM
110extern enum varobj_languages varobj_get_language (struct varobj *var);
111
112extern int varobj_get_attributes (struct varobj *var);
113
de051565
MK
114extern char *varobj_get_formatted_value (struct varobj *var,
115 enum varobj_display_formats format);
116
8b93c638
JM
117extern char *varobj_get_value (struct varobj *var);
118
119extern int varobj_set_value (struct varobj *var, char *expression);
120
121extern int varobj_list (struct varobj ***rootlist);
122
25d5ea92
VP
123extern int varobj_update (struct varobj **varp, struct varobj ***changelist,
124 int explicit);
8b93c638 125
8756216b
DP
126extern void varobj_invalidate (void);
127
c203027e
NR
128extern int varobj_editable_p (struct varobj *var);
129
5a413362
VP
130extern int varobj_floating_p (struct varobj *var);
131
8b93c638 132#endif /* VAROBJ_H */