aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-04-03 18:15:13 -0600
committerTom Tromey <tom@tromey.com>2018-04-06 15:44:48 -0600
commitb4d61099ba840824fd0aac9800403f6278476347 (patch)
treee2424dd947930be814dfb299fd671de6bd16037e /gdb/varobj.h
parent9b5587295bbc57e5e0453b659e24d7c2b504b894 (diff)
downloadgdb-b4d61099ba840824fd0aac9800403f6278476347.zip
gdb-b4d61099ba840824fd0aac9800403f6278476347.tar.gz
gdb-b4d61099ba840824fd0aac9800403f6278476347.tar.bz2
Change varobj to use value_ref_ptr
This changes varobj to use value_ref_ptr, allowing the removal of some manual reference count management. gdb/ChangeLog 2018-04-06 Tom Tromey <tom@tromey.com> * varobj.h (struct varobj) <value>: Now a value_ref_ptr. * varobj.c (varobj_set_display_format, varobj_set_value) (install_default_visualizer, construct_visualizer) (install_new_value, ~varobj, varobj_get_value_type) (my_value_of_variable, varobj_editable_p): Update. * c-varobj.c (c_describe_child, c_value_of_variable) (cplus_number_of_children, cplus_describe_child): Update. * ada-varobj.c (ada_number_of_children, ada_name_of_child) (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child) (ada_value_of_variable, ada_value_is_changeable_p): Update.
Diffstat (limited to 'gdb/varobj.h')
-rw-r--r--gdb/varobj.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/varobj.h b/gdb/varobj.h
index 6e80d1b..3aba0cd 100644
--- a/gdb/varobj.h
+++ b/gdb/varobj.h
@@ -20,6 +20,7 @@
#include "symtab.h"
#include "gdbtypes.h"
#include "vec.h"
+#include "value.h"
/* Enumeration for the format types */
enum varobj_display_formats
@@ -122,7 +123,7 @@ struct varobj
indicates there was an error getting this value.
Invariant: if varobj_value_is_changeable_p (this) is non-zero,
the value is either NULL, or not lazy. */
- struct value *value = NULL;
+ value_ref_ptr value;
/* The number of (immediate) children this variable has. */
int num_children = -1;