31 std::unique_ptr<varobj_item>
next ()
override;
63std::unique_ptr<varobj_item>
68 const char *
name = NULL;
83 if (!PyErr_Occurred ())
90 gdb::unique_xmalloc_ptr<char> value_str = fetched_error.
to_string ();
91 if (value_str == NULL)
97 std::string name_str = string_printf (
"<error at %d>",
99 item.reset (Py_BuildValue (
"(ss)", name_str.c_str (),
115 if (!PyArg_ParseTuple (item.get (),
"sO", &
name, &py_v))
118 error (_(
"Invalid item from the child list"));
123 if (vitem->
value == NULL)
128 return std::unique_ptr<varobj_item> (vitem);
138 m_iter (pyiter.release ()),
146std::unique_ptr<varobj_iter>
163 error (_(
"Null value returned for children"));
170 error (_(
"Could not get children iterator"));
173 return gdb::make_unique<py_varobj_iter> (var, std::move (iter), opts);
gdb::unique_xmalloc_ptr< char > to_string() const
const struct value_print_options * gdbpy_current_print_options
gdb::ref_ptr< T, gdbpy_ref_policy< T > > gdbpy_ref
struct value * convert_value_from_python(PyObject *obj)
std::unique_ptr< varobj_iter > py_varobj_get_iterator(struct varobj *var, PyObject *printer, const value_print_options *opts)
void gdbpy_print_stack(void)
int gdb_python_initialized
PyObject * gdbpy_children_cst
PyObject * gdbpy_gdb_memory_error
~py_varobj_iter() override
py_varobj_iter(struct varobj *var, gdbpy_ref<> &&pyiter, const value_print_options *opts)
value_print_options m_opts
std::unique_ptr< varobj_item > next() override
std::vector< varobj * > children
value_ref_ptr release_value(struct value *val)