aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 4cbf007..941c38c 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -673,15 +673,6 @@ varobj_get_iterator (struct varobj *var)
requested an iterator from a non-dynamic varobj"));
}
-/* Release and clear VAR's saved item, if any. */
-
-static void
-varobj_clear_saved_item (struct varobj_dynamic *var)
-{
- if (var->saved_item != NULL)
- var->saved_item.reset (nullptr);
-}
-
static bool
update_dynamic_varobj_children (struct varobj *var,
std::vector<varobj *> *changed,
@@ -700,8 +691,7 @@ update_dynamic_varobj_children (struct varobj *var,
if (update_children || var->dynamic->child_iter == NULL)
{
var->dynamic->child_iter = varobj_get_iterator (var);
-
- varobj_clear_saved_item (var->dynamic);
+ var->dynamic->saved_item.reset (nullptr);
i = 0;
@@ -1864,8 +1854,6 @@ varobj::~varobj ()
}
#endif
- varobj_clear_saved_item (var->dynamic);
-
if (is_root_p (var))
delete var->root;