GDB (xrefs)
/tmp/gdb-7.10/gdb/jv-varobj.c
Go to the documentation of this file.
1 /* varobj support for Java.
2 
3  Copyright (C) 1999-2015 Free Software Foundation, Inc.
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
7  the Free Software Foundation; either version 3 of the License, or
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
16  along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 
18 #include "defs.h"
19 #include "varobj.h"
20 
21 /* Java */
22 
23 static int
24 java_number_of_children (const struct varobj *var)
25 {
27 }
28 
29 static char *
30 java_name_of_variable (const struct varobj *parent)
31 {
32  char *p, *name;
33 
34  name = cplus_varobj_ops.name_of_variable (parent);
35  /* If the name has "-" in it, it is because we
36  needed to escape periods in the name... */
37  p = name;
38 
39  while (*p != '\000')
40  {
41  if (*p == '-')
42  *p = '.';
43  p++;
44  }
45 
46  return name;
47 }
48 
49 static char *
50 java_name_of_child (const struct varobj *parent, int index)
51 {
52  char *name, *p;
53 
54  name = cplus_varobj_ops.name_of_child (parent, index);
55  /* Escape any periods in the name... */
56  p = name;
57 
58  while (*p != '\000')
59  {
60  if (*p == '.')
61  *p = '-';
62  p++;
63  }
64 
65  return name;
66 }
67 
68 static char *
69 java_path_expr_of_child (const struct varobj *child)
70 {
71  return NULL;
72 }
73 
74 static struct value *
75 java_value_of_child (const struct varobj *parent, int index)
76 {
77  return cplus_varobj_ops.value_of_child (parent, index);
78 }
79 
80 static struct type *
81 java_type_of_child (const struct varobj *parent, int index)
82 {
83  return cplus_varobj_ops.type_of_child (parent, index);
84 }
85 
86 static char *
87 java_value_of_variable (const struct varobj *var,
88  enum varobj_display_formats format)
89 {
90  return cplus_varobj_ops.value_of_variable (var, format);
91 }
92 
93 /* varobj operations for java. */
94 
95 const struct lang_varobj_ops java_varobj_ops =
96 {
105  NULL, /* value_has_mutated */
107 };
static struct type * java_type_of_child(const struct varobj *parent, int index)
Definition: jv-varobj.c:81
static struct value * java_value_of_child(const struct varobj *parent, int index)
Definition: jv-varobj.c:75
Definition: varobj.h:89
char *(* value_of_variable)(const struct varobj *var, enum varobj_display_formats format)
Definition: varobj.h:193
int varobj_default_value_is_changeable_p(const struct varobj *var)
Definition: varobj.c:2706
static char * java_name_of_variable(const struct varobj *parent)
Definition: jv-varobj.c:30
static char * java_value_of_variable(const struct varobj *var, enum varobj_display_formats format)
Definition: jv-varobj.c:87
static int java_number_of_children(const struct varobj *var)
Definition: jv-varobj.c:24
char *(* name_of_child)(const struct varobj *parent, int index)
Definition: varobj.h:178
int(* number_of_children)(const struct varobj *parent)
Definition: varobj.h:170
const char *const name
Definition: aarch64-tdep.c:68
struct value *(* value_of_child)(const struct varobj *parent, int index)
Definition: varobj.h:186
int varobj_default_is_path_expr_parent(const struct varobj *var)
Definition: varobj.c:1016
static char * java_path_expr_of_child(const struct varobj *child)
Definition: jv-varobj.c:69
static char * java_name_of_child(const struct varobj *parent, int index)
Definition: jv-varobj.c:50
Definition: gdbtypes.h:749
struct value * parent
Definition: value.c:262
const struct lang_varobj_ops cplus_varobj_ops
Definition: c-varobj.c:959
Definition: value.c:172
char *(* name_of_variable)(const struct varobj *parent)
Definition: varobj.h:174
struct type *(* type_of_child)(const struct varobj *parent, int index)
Definition: varobj.h:189
varobj_display_formats
Definition: varobj.h:25