diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/varobj.c | 14 |
2 files changed, 7 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3b6569a..f61cfda 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2020-12-11 Tom Tromey <tom@tromey.com> + * varobj.c (varobj_clear_saved_item): Remove. + (update_dynamic_varobj_children): Update. + (varobj::~varobj): Don't call varobj_clear_saved_item. + +2020-12-11 Tom Tromey <tom@tromey.com> + * varobj.c (install_dynamic_child, varobj_clear_saved_item) (update_dynamic_varobj_children, create_child) (create_child_with_value): Update. 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; |