/* Gdb/Python header for private use by Python module.
- Copyright (C) 2008-2020 Free Software Foundation, Inc.
+ Copyright (C) 2008-2021 Free Software Foundation, Inc.
This file is part of GDB.
extern PyTypeObject thread_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("thread_object");
-typedef struct gdbpy_breakpoint_object
+struct gdbpy_breakpoint_object
{
PyObject_HEAD
/* 1 is this is a FinishBreakpoint object, 0 otherwise. */
int is_finish_bp;
-} gdbpy_breakpoint_object;
+};
/* Require that BREAKPOINT be a valid breakpoint ID; throw a Python
exception if it is invalid. */
extern gdbpy_breakpoint_object *bppy_pending_object;
-typedef struct
+struct thread_object
{
PyObject_HEAD
/* The Inferior object to which this thread belongs. */
PyObject *inf_obj;
-} thread_object;
+};
struct inferior_object;
\f
/* extension_language_script_ops "methods". */
-extern int gdbpy_auto_load_enabled (const struct extension_language_defn *);
+/* Return true if auto-loading Python scripts is enabled.
+ This is the extension_language_script_ops.auto_load_enabled "method". */
+
+extern bool gdbpy_auto_load_enabled (const struct extension_language_defn *);
/* extension_language_ops "methods". */
PyObject *gdbpy_selected_inferior (PyObject *self, PyObject *args);
PyObject *gdbpy_string_to_argv (PyObject *self, PyObject *args);
PyObject *gdbpy_parameter_value (enum var_types type, void *var);
-char *gdbpy_parse_command_name (const char *name,
- struct cmd_list_element ***base_list,
- struct cmd_list_element **start_list);
+gdb::unique_xmalloc_ptr<char> gdbpy_parse_command_name
+ (const char *name, struct cmd_list_element ***base_list,
+ struct cmd_list_element **start_list);
PyObject *gdbpy_register_tui_window (PyObject *self, PyObject *args,
PyObject *kw);
struct varobj_iter;
struct varobj;
-struct varobj_iter *py_varobj_get_iterator (struct varobj *var,
- PyObject *printer);
+std::unique_ptr<varobj_iter> py_varobj_get_iterator (struct varobj *var,
+ PyObject *printer);
/* Deleter for Py_buffer unique_ptr specialization. */