+2020-12-11 Tom Tromey <tom@tromey.com>
+
+ * varobj.c (varobj_create): Update.
+ (install_variable): Return void.
+
2020-12-11 Tom Tromey <tom@tromey.com>
* varobj.c (instantiate_pretty_printer): Use gdbpy_ref.
static void delete_variable_1 (int *, struct varobj *, bool, bool);
-static bool install_variable (struct varobj *);
+static void install_variable (struct varobj *);
static void uninstall_variable (struct varobj *);
if ((var != NULL) && (objname != NULL))
{
var->obj_name = objname;
-
- /* If a varobj name is duplicated, the install will fail so
- we must cleanup. */
- if (!install_variable (var.get ()))
- return NULL;
+ install_variable (var.get ());
}
return var.release ();
}
/* Install the given variable VAR with the object name VAR->OBJ_NAME. */
-static bool
+static void
install_variable (struct varobj *var)
{
hashval_t hash = htab_hash_string (var->obj_name.c_str ());
/* If root, add varobj to root list. */
if (is_root_p (var))
rootlist.push_front (var->root);
-
- return true; /* OK */
}
/* Uninstall the object VAR. */