GDB (xrefs)

Classes | Macros | Typedefs | Enumerations | Functions | Variables
python-internal.h File Reference
`#include "extension.h"`
`#include "extension-priv.h"`
`#include <Python.h>`
`#include <frameobject.h>`
`#include "symtab.h"`
`#include "command.h"`
`#include "breakpoint.h"`

Go to the source code of this file.

## Classes
struct | gdb_PyGetSetDef
struct | gdbpy_breakpoint_object
struct | thread_object
class | gdbpy_enter
class | gdbpy_enter_varobj

## Macros
#define | CPYCHECKER_RETURNS_BORROWED_REF
#define | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG)
#define | CPYCHECKER_STEALS_REFERENCE_TO_ARG(n)
#define | CPYCHECKER_SETS_EXCEPTION
#define | CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
#define | PY_SSIZE_T_CLEAN
#define | PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size,
#define | Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
#define | PyGILState_Ensure() ((PyGILState_STATE) 0)
#define | PyGILState_Release(ARG) ((void)(ARG))
#define | PyEval_InitThreads()
#define | PyThreadState_Swap(ARG) ((void)(ARG))
#define | PyEval_ReleaseLock()
#define | GDB_PY_LL_ARG "L"
#define | GDB_PY_LLU_ARG "K"
#define | gdb_py_long_from_longest PyLong_FromLong
#define | gdb_py_long_from_ulongest PyLong_FromUnsignedLong
#define | gdb_py_long_as_ulongest PyLong_AsUnsignedLong
#define | PyMem_RawMalloc PyMem_Malloc
#define | Py_DECREF(op) gdb_Py_DECREF (op)
#define | PyObject_GetAttrString(obj, attr) gdb_PyObject_GetAttrString (obj, attr)
#define | PyObject_HasAttrString(obj, attr) gdb_PyObject_HasAttrString (obj, attr)
#define | PyObject_CallMethod gdb_PyObject_CallMethod
#define | PyErr_NewException gdb_PyErr_NewException
#define | PySys_GetObject gdb_PySys_GetObject
#define | GDB_PYSYS_SETPATH_CHAR char
#define | PySys_SetPath gdb_PySys_SetPath
#define | BPPY_REQUIRE_VALID(Breakpoint)
#define | BPPY_SET_REQUIRE_VALID(Breakpoint)
#define | GDB_PY_HANDLE_EXCEPTION(Exception)
#define | GDB_PY_SET_HANDLE_EXCEPTION(Exception)

## Typedefs
typedef long | gdb_py_longest
typedef unsigned long | gdb_py_ulongest
typedef long | Py_hash_t
typedef struct gdbpy_breakpoint_object | gdbpy_breakpoint_object

## Enumerations
enum | gdbpy_iter_kind { iter_keys, iter_values, iter_items }

## Functions
static void | gdb_Py_DECREF (void *op)
static PyObject * | gdb_PyObject_GetAttrString (PyObject *obj, const char *attr)
static int | gdb_PyObject_HasAttrString (PyObject *obj, const char *attr)
template<typename... Args>
static PyObject * | gdb_PyObject_CallMethod (PyObject *o, const char *method, const char *format, Args... args)
static PyObject * | gdb_PyErr_NewException (const char *name, PyObject *base, PyObject *dict)
static PyObject * | gdb_PySys_GetObject (const char *name)
static void | gdb_PySys_SetPath (const GDB_PYSYS_SETPATH_CHAR *path)
static int | gdb_PyArg_ParseTupleAndKeywords (PyObject *args, PyObject *kw, const char *format, const char **keywords,...)
PyTypeObject value_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("value_object")
PyTypeObject block_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("block_object")
PyTypeObject symbol_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("symbol_object")
PyTypeObject event_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object")
PyTypeObject breakpoint_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("breakpoint_object")
PyTypeObject frame_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("frame_object")
PyTypeObject thread_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("thread_object")
int | gdbpy_auto_load_enabled (const struct extension_language_defn *)
enum ext_lang_rc | gdbpy_apply_val_pretty_printer (const struct extension_language_defn *, struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, const struct language_defn *language)
enum ext_lang_bt_status | gdbpy_apply_frame_filter (const struct extension_language_defn *, struct frame_info *frame, int flags, enum ext_lang_frame_args args_type, struct ui_out *out, int frame_low, int frame_high)
void | gdbpy_preserve_values (const struct extension_language_defn *, struct objfile *objfile, htab_t copied_types)
enum ext_lang_bp_stop | gdbpy_breakpoint_cond_says_stop (const struct extension_language_defn *, struct breakpoint *)
int | gdbpy_breakpoint_has_cond (const struct extension_language_defn *, struct breakpoint *b)
void * | gdbpy_clone_xmethod_worker_data (const struct extension_language_defn *extlang, void *data)
void | gdbpy_free_xmethod_worker_data (const struct extension_language_defn *extlang, void *data)
enum ext_lang_rc | gdbpy_get_matching_xmethod_workers (const struct extension_language_defn *extlang, struct type *obj_type, const char *method_name, xmethod_worker_vec **dm_vec)
enum ext_lang_rc | gdbpy_get_xmethod_arg_types (const struct extension_language_defn *extlang, struct xmethod_worker *worker, int *nargs, struct type ***arg_types)
enum ext_lang_rc | gdbpy_get_xmethod_result_type (const struct extension_language_defn *extlang, struct xmethod_worker *worker, struct value *object, struct value **args, int nargs, struct type **result_type)
struct value * | gdbpy_invoke_xmethod (const struct extension_language_defn *extlang, struct xmethod_worker *worker, struct value *obj, struct value **args, int nargs)
PyObject * | gdbpy_history (PyObject *self, PyObject *args)
PyObject * | gdbpy_breakpoints (PyObject *, PyObject *)
PyObject * | gdbpy_frame_stop_reason_string (PyObject *, PyObject *)
PyObject * | gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw)
PyObject * | gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw)
PyObject * | gdbpy_start_recording (PyObject *self, PyObject *args)
PyObject * | gdbpy_current_recording (PyObject *self, PyObject *args)
PyObject * | gdbpy_stop_recording (PyObject *self, PyObject *args)
PyObject * | gdbpy_newest_frame (PyObject *self, PyObject *args)
PyObject * | gdbpy_selected_frame (PyObject *self, PyObject *args)
PyObject * | gdbpy_block_for_pc (PyObject *self, PyObject *args)
PyObject * | gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw)
int | gdbpy_is_field (PyObject *obj)
PyObject * | gdbpy_create_lazy_string_object (CORE_ADDR address, long length, const char *encoding, struct type *type)
PyObject * | gdbpy_inferiors (PyObject *unused, PyObject *unused2)
PyObject * | gdbpy_create_ptid_object (ptid_t ptid)
PyObject * | gdbpy_selected_thread (PyObject *self, PyObject *args)
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)
PyObject * | symtab_and_line_to_sal_object (struct symtab_and_line sal)
PyObject * | symtab_to_symtab_object (struct symtab *symtab)
PyObject * | symbol_to_symbol_object (struct symbol *sym)
PyObject * | block_to_block_object (const struct block *block, struct objfile *objfile)
PyObject * | value_to_value_object (struct value *v)
PyObject * | type_to_type_object (struct type *)
PyObject * | frame_info_to_frame_object (struct frame_info *frame)
PyObject * | symtab_to_linetable_object (PyObject *symtab)
PyObject * | pspace_to_pspace_object (struct program_space *) CPYCHECKER_RETURNS_BORROWED_REF
PyObject * | pspy_get_printers (PyObject *, void *)
PyObject * | pspy_get_frame_filters (PyObject *, void *)
PyObject * | pspy_get_frame_unwinders (PyObject *, void *)
PyObject * | pspy_get_xmethods (PyObject *, void *)
PyObject * | objfile_to_objfile_object (struct objfile *) CPYCHECKER_RETURNS_BORROWED_REF
PyObject * | objfpy_get_printers (PyObject *, void *)
PyObject * | objfpy_get_frame_filters (PyObject *, void *)
PyObject * | objfpy_get_frame_unwinders (PyObject *, void *)
PyObject * | objfpy_get_xmethods (PyObject *, void *)
PyObject * | gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw)
PyObject * | gdbarch_to_arch_object (struct gdbarch *gdbarch)
thread_object * | create_thread_object (struct thread_info *tp)
thread_object * | find_thread_object (ptid_t ptid) CPYCHECKER_RETURNS_BORROWED_REF
PyObject * | find_inferior_object (int pid)
PyObject * | inferior_to_inferior_object (struct inferior *inferior)
const struct block * | block_object_to_block (PyObject *obj)
struct symbol * | symbol_object_to_symbol (PyObject *obj)
struct value * | value_object_to_value (PyObject *self)
struct value * | convert_value_from_python (PyObject *obj)
struct type * | type_object_to_type (PyObject *obj)
struct symtab * | symtab_object_to_symtab (PyObject *obj)
struct symtab_and_line * | sal_object_to_symtab_and_line (PyObject *obj)
struct frame_info * | frame_object_to_frame_info (PyObject *frame_obj)
struct gdbarch * | arch_object_to_gdbarch (PyObject *obj)
void | gdbpy_initialize_gdb_readline (void)
int | gdbpy_initialize_auto_load (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_values (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_frames (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_instruction (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_btrace (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_record (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_symtabs (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_commands (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_symbols (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_blocks (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_types (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_functions (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_pspace (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_objfile (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_breakpoints (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_finishbreakpoints (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_lazy_string (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_linetable (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_parameters (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_thread (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_inferior (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_eventregistry (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_event (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_py_events (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_arch (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_xmethods (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_unwind (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_print_python_errors_p (void)
void | gdbpy_print_stack (void)
PyObject * | python_string_to_unicode (PyObject *obj)
gdb::unique_xmalloc_ptr< char > | unicode_to_target_string (PyObject *unicode_str)
gdb::unique_xmalloc_ptr< char > | python_string_to_target_string (PyObject *obj)
PyObject * | python_string_to_target_python_string (PyObject *obj)
gdb::unique_xmalloc_ptr< char > | python_string_to_host_string (PyObject *obj)
PyObject * | host_string_to_python_string (const char *str)
int | gdbpy_is_string (PyObject *obj)
gdb::unique_xmalloc_ptr< char > | gdbpy_obj_to_string (PyObject *obj)
gdb::unique_xmalloc_ptr< char > | gdbpy_exception_to_string (PyObject *ptype, PyObject *pvalue)
int | gdbpy_is_lazy_string (PyObject *result)
void | gdbpy_extract_lazy_string (PyObject *string, CORE_ADDR *addr, struct type **str_type, long *length, gdb::unique_xmalloc_ptr< char > *encoding)
int | gdbpy_is_value_object (PyObject *obj)
PyObject * | apply_varobj_pretty_printer (PyObject *print_obj, struct value **replacement, struct ui_file *stream)
PyObject * | gdbpy_get_varobj_pretty_printer (struct value *value)
gdb::unique_xmalloc_ptr< char > | gdbpy_get_display_hint (PyObject *printer)
PyObject * | gdbpy_default_visualizer (PyObject *self, PyObject *args)
void | bpfinishpy_pre_stop_hook (struct gdbpy_breakpoint_object *bp_obj)
void | bpfinishpy_post_stop_hook (struct gdbpy_breakpoint_object *bp_obj)
void | gdbpy_convert_exception (struct gdb_exception) CPYCHECKER_SETS_EXCEPTION
int | get_addr_from_python (PyObject *obj, CORE_ADDR *addr) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
PyObject * | gdb_py_object_from_longest (LONGEST l)
PyObject * | gdb_py_object_from_ulongest (ULONGEST l)
int | gdb_py_int_as_long (PyObject *, long *)
PyObject * | gdb_py_generic_dict (PyObject *self, void *closure)
int | gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
struct varobj_iter * | py_varobj_get_iterator (struct varobj *var, PyObject *printer)

## Variables
int | gdb_python_initialized
PyObject * | gdb_module
PyObject * | gdb_python_module
gdbpy_breakpoint_object * | bppy_pending_object
struct cmd_list_element * | set_python_list
struct cmd_list_element * | show_python_list
struct gdbarch * | python_gdbarch
const struct language_defn * | python_language
PyObject * | gdbpy_doc_cst
PyObject * | gdbpy_children_cst
PyObject * | gdbpy_to_string_cst
PyObject * | gdbpy_display_hint_cst
PyObject * | gdbpy_enabled_cst
PyObject * | gdbpy_value_cst
PyObject * | gdbpy_gdb_error
PyObject * | gdbpy_gdb_memory_error
PyObject * | gdbpy_gdberror_exc

## Macro Definition Documentation

## ◆ BPPY_REQUIRE_VALID

#define BPPY_REQUIRE_VALID | ( |  | Breakpoint | ) |

Value:
do { \
if ((Breakpoint)->bp == NULL) \
return PyErr_Format (PyExc_RuntimeError, \
_("Breakpoint %d is invalid."), \
(Breakpoint)->number); \
} while (0)
_
#define _(String)
Definition: gdb_locale.h:35
extract_bp_kind::bp

Definition at line 406 of file python-internal.h.

Referenced by bppy_delete_breakpoint(), bppy_get_commands(), bppy_get_condition(), bppy_get_enabled(), bppy_get_expression(), bppy_get_hit_count(), bppy_get_ignore_count(), bppy_get_location(), bppy_get_number(), bppy_get_pending(), bppy_get_silent(), bppy_get_task(), bppy_get_temporary(), bppy_get_thread(), bppy_get_type(), and bppy_get_visibility().

## ◆ BPPY_SET_REQUIRE_VALID

#define BPPY_SET_REQUIRE_VALID | ( |  | Breakpoint | ) |

Value:
do { \
if ((Breakpoint)->bp == NULL) \
{ \
PyErr_Format (PyExc_RuntimeError, _("Breakpoint %d is invalid."), \
(Breakpoint)->number); \
return -1; \
} \
} while (0)
_
#define _(String)
Definition: gdb_locale.h:35
extract_bp_kind::bp

Definition at line 416 of file python-internal.h.

Referenced by bppy_init(), bppy_set_condition(), bppy_set_enabled(), bppy_set_hit_count(), bppy_set_ignore_count(), bppy_set_silent(), bppy_set_task(), and bppy_set_thread().

## ◆ CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION

#define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION

Definition at line 63 of file python-internal.h.

## ◆ CPYCHECKER_RETURNS_BORROWED_REF

#define CPYCHECKER_RETURNS_BORROWED_REF

Definition at line 36 of file python-internal.h.

## ◆ CPYCHECKER_SETS_EXCEPTION

#define CPYCHECKER_SETS_EXCEPTION

Definition at line 56 of file python-internal.h.

## ◆ CPYCHECKER_STEALS_REFERENCE_TO_ARG

#define CPYCHECKER_STEALS_REFERENCE_TO_ARG | ( |  | n | ) |

Definition at line 50 of file python-internal.h.

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF

#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( |  | ARG | ) |

Definition at line 43 of file python-internal.h.

## ◆ GDB_PY_HANDLE_EXCEPTION

#define GDB_PY_HANDLE_EXCEPTION | ( |  | Exception | ) |

Value:
do { \
if (Exception.reason < 0) \
{ \
gdbpy_convert_exception (Exception); \
return NULL; \
} \
} while (0)

Definition at line 663 of file python-internal.h.

Referenced by bppy_delete_breakpoint(), execute_gdb_command(), frapy_arch(), frapy_block(), frapy_find_sal(), frapy_function(), frapy_is_valid(), frapy_name(), frapy_newer(), frapy_older(), frapy_pc(), frapy_read_register(), frapy_read_var(), frapy_select(), frapy_type(), frapy_unwind_stop_reason(), gdbpy_block_for_pc(), gdbpy_find_pc_line(), gdbpy_get_varobj_pretty_printer(), gdbpy_history(), gdbpy_lookup_global_symbol(), gdbpy_lookup_symbol(), gdbpy_newest_frame(), gdbpy_parameter(), gdbpy_parse_and_eval(), gdbpy_selected_frame(), gdbpy_write(), infpy_read_memory(), infpy_search_memory(), infpy_thread_from_thread_handle(), infpy_threads(), infpy_write_memory(), ltpy_get_pcs_for_line(), objfpy_add_separate_debug_file(), objfpy_get_build_id(), pending_framepy_read_register(), pending_framepy_str(), recpy_bt_goto(), recpy_bt_insn_data(), recpy_bt_insn_sal(), stpy_convert_to_value(), sympy_needs_frame(), sympy_value(), thpy_switch(), typy_array_1(), typy_const(), typy_fields_items(), typy_get_composite(), typy_legacy_template_argument(), typy_lookup_type(), typy_lookup_typename(), typy_pointer(), typy_reference(), typy_richcompare(), typy_str(), typy_strip_typedefs(), typy_template_argument(), typy_unqualified(), typy_volatile(), unwind_infopy_str(), valpy_absolute(), valpy_binop(), valpy_call(), valpy_const_value(), valpy_dereference(), valpy_do_cast(), valpy_fetch_lazy(), valpy_float(), valpy_get_dynamic_type(), valpy_get_is_lazy(), valpy_get_is_optimized_out(), valpy_getitem(), valpy_int(), valpy_invert(), valpy_lazy_string(), valpy_long(), valpy_negative(), valpy_reference_value(), valpy_referenced_value(), valpy_richcompare(), valpy_str(), and valpy_string().

## ◆ GDB_PY_LL_ARG

#define GDB_PY_LL_ARG "L"

Definition at line 169 of file python-internal.h.

Referenced by ltpy_get_pcs_for_line(), ltpy_has_line(), and valpy_lazy_string().

## ◆ GDB_PY_LLU_ARG

#define GDB_PY_LLU_ARG "K"

Definition at line 170 of file python-internal.h.

Referenced by archpy_disassemble(), gdbpy_block_for_pc(), gdbpy_find_pc_line(), and gdbpy_solib_name().

## ◆ gdb_py_long_as_ulongest

#define gdb_py_long_as_ulongest PyLong_AsUnsignedLong

Definition at line 175 of file python-internal.h.

Referenced by get_addr_from_python().

## ◆ gdb_py_long_from_longest

#define gdb_py_long_from_longest PyLong_FromLong

Definition at line 173 of file python-internal.h.

Referenced by btpy_list_index(), convert_field(), typy_get_sizeof(), and valpy_long().

## ◆ gdb_py_long_from_ulongest

#define gdb_py_long_from_ulongest PyLong_FromUnsignedLong

Definition at line 174 of file python-internal.h.

Referenced by archpy_disassemble(), frapy_pc(), recpy_bt_insn_pc(), salpy_get_last(), salpy_get_pc(), stpy_get_address(), and valpy_long().

## ◆ GDB_PY_SET_HANDLE_EXCEPTION

#define GDB_PY_SET_HANDLE_EXCEPTION | ( |  | Exception | ) |

Value:
do { \
if (Exception.reason < 0) \
{ \
gdbpy_convert_exception (Exception); \
return -1; \
} \
} while (0)

Definition at line 674 of file python-internal.h.

Referenced by bpfinishpy_init(), bppy_set_condition(), bppy_set_enabled(), bppy_set_ignore_count(), bppy_set_task(), get_addr_from_python(), valpy_nonzero(), and value_has_field().

## ◆ GDB_PYSYS_SETPATH_CHAR

#define GDB_PYSYS_SETPATH_CHAR char

Definition at line 284 of file python-internal.h.

## ◆ Py_DECREF

#define Py_DECREF | ( |  | op | ) | gdb_Py_DECREF (op)

Definition at line 204 of file python-internal.h.

Referenced by cmdpy_init(), construct_visualizer(), gdbpy_ref_policy< T >::decref(), del_objfile_sal(), delete_thread_object(), fnpy_init(), gdb_Py_DECREF(), gdb_pymodule_addobject(), gdbpy_free_type_printers(), gdbpy_free_xmethod_worker_data(), gdbpy_run_events(), install_default_visualizer(), instantiate_pretty_printer(), ltpy_dealloc(), ltpy_iterator_dealloc(), parmpy_init(), py_free_inferior(), salpy_dealloc(), thpy_dealloc(), typy_fields_items(), typy_iterator_dealloc(), unwind_infopy_add_saved_register(), unwind_infopy_dealloc(), and valpy_dealloc().

## ◆ PY_SSIZE_T_CLEAN

#define PY_SSIZE_T_CLEAN

Definition at line 95 of file python-internal.h.

## ◆ Py_TYPE

#define Py_TYPE | ( |  | ob | ) | (((PyObject*)(ob))->ob_type)

Definition at line 140 of file python-internal.h.

Referenced by btpy_list_position(), btpy_list_richcompare(), btrace_func_from_recpy_func(), btrace_insn_from_recpy_insn(), evpy_dealloc(), evregpy_dealloc(), field_dealloc(), ltpy_dealloc(), mbpy_dealloc(), objfpy_dealloc(), pspy_dealloc(), recpy_bt_goto(), recpy_element_richcompare(), salpy_dealloc(), thpy_dealloc(), typy_dealloc(), unwind_infopy_dealloc(), and valpy_dealloc().

## ◆ PyErr_NewException

#define PyErr_NewException gdb_PyErr_NewException

Definition at line 263 of file python-internal.h.

Referenced by do_start_initialization(), and gdb_PyErr_NewException().

## ◆ PyEval_InitThreads

#define PyEval_InitThreads | ( |  | ) |

Definition at line 149 of file python-internal.h.

Referenced by do_start_initialization().

## ◆ PyEval_ReleaseLock

#define PyEval_ReleaseLock | ( |  | ) |

Definition at line 151 of file python-internal.h.

Referenced by do_start_initialization().

## ◆ PyGILState_Ensure

#define PyGILState_Ensure | ( |  | ) | ((PyGILState_STATE) 0)

Definition at line 147 of file python-internal.h.

Referenced by finalize_python(), gdbpy_breakpoint_created(), gdbpy_breakpoint_deleted(), gdbpy_breakpoint_modified(), and gdbpy_enter::gdbpy_enter().

## ◆ PyGILState_Release

#define PyGILState_Release | ( |  | ARG | ) | ((void)(ARG))

Definition at line 148 of file python-internal.h.

Referenced by gdbpy_breakpoint_created(), gdbpy_breakpoint_deleted(), gdbpy_breakpoint_modified(), and gdbpy_enter::~gdbpy_enter().

## ◆ PyMem_RawMalloc

#define PyMem_RawMalloc PyMem_Malloc

Definition at line 187 of file python-internal.h.

Referenced by gdbpy_readline_wrapper().

## ◆ PyObject_CallMethod

#define PyObject_CallMethod gdb_PyObject_CallMethod

Definition at line 251 of file python-internal.h.

Referenced by bpfinishpy_out_of_scope(), extract_sym(), extract_value(), gdb_PyObject_CallMethod(), gdbpy_breakpoint_cond_says_stop(), get_py_iter_from_func(), and py_print_frame().

## ◆ PyObject_GetAttrString

#define PyObject_GetAttrString | ( |  | obj,
|  |  | attr
| ) |  | gdb_PyObject_GetAttrString (obj, attr)

Definition at line 217 of file python-internal.h.

Referenced by bootstrap_python_frame_filters(), find_pretty_printer_from_gdb(), fnpy_call(), fnpy_init(), gdb_PyObject_GetAttrString(), gdbpy_apply_type_printers(), gdbpy_before_prompt_hook(), gdbpy_get_matching_xmethod_workers(), gdbpy_get_xmethod_arg_types(), gdbpy_get_xmethod_result_type(), gdbpy_rbreak(), gdbpy_start_type_printers(), get_field_flag(), get_field_type(), invoke_match_method(), pyuw_object_attribute_to_pointer(), pyuw_sniffer(), valpy_getitem(), and value_has_field().

## ◆ PyObject_HasAttrString

#define PyObject_HasAttrString | ( |  | obj,
|  |  | attr
| ) |  | gdb_PyObject_HasAttrString (obj, attr)

Definition at line 230 of file python-internal.h.

Referenced by bpfinishpy_out_of_scope(), extract_value(), find_pretty_printer_from_gdb(), fnpy_init(), gdb_PyObject_HasAttrString(), gdbpy_before_prompt_hook(), gdbpy_breakpoint_cond_says_stop(), gdbpy_breakpoint_has_cond(), gdbpy_get_matching_xmethod_workers(), get_py_iter_from_func(), py_print_frame(), pyuw_object_attribute_to_pointer(), pyuw_sniffer(), and valpy_getitem().

## ◆ PySys_GetObject

#define PySys_GetObject gdb_PySys_GetObject

Definition at line 275 of file python-internal.h.

Referenced by do_finish_initialization(), and gdb_PySys_GetObject().

## ◆ PySys_SetPath

#define PySys_SetPath gdb_PySys_SetPath

Definition at line 293 of file python-internal.h.

Referenced by do_finish_initialization(), and gdb_PySys_SetPath().

## ◆ PyThreadState_Swap

#define PyThreadState_Swap | ( |  | ARG | ) | ((void)(ARG))

Definition at line 150 of file python-internal.h.

Referenced by do_start_initialization().

## ◆ PyVarObject_HEAD_INIT

#define PyVarObject_HEAD_INIT | ( |  | type,
|  |  | size
| ) |  | PyObject_HEAD_INIT(type) size,

Definition at line 133 of file python-internal.h.

## Typedef Documentation

## ◆ gdb_py_longest

typedef long gdb_py_longest

Definition at line 171 of file python-internal.h.

## ◆ gdb_py_ulongest

typedef unsigned long gdb_py_ulongest

Definition at line 172 of file python-internal.h.

## ◆ gdbpy_breakpoint_object

typedef struct gdbpy_breakpoint_object gdbpy_breakpoint_object

## ◆ Py_hash_t

typedef long Py_hash_t

Definition at line 180 of file python-internal.h.

## Enumeration Type Documentation

## ◆ gdbpy_iter_kind

enum gdbpy_iter_kind

Enumerator
iter_keys |
iter_values |
iter_items |

Definition at line 361 of file python-internal.h.

## Function Documentation

## ◆ apply_varobj_pretty_printer()

PyObject* apply_varobj_pretty_printer | ( | PyObject * | print_obj,
|  | struct value ** | replacement,
|  | struct ui_file * | stream
| ) |  |

Definition at line 723 of file py-prettyprint.c.

References pretty_print_one_value(), and print_stack_unless_memory_error().

Referenced by varobj_value_get_print_value().

## ◆ arch_object_to_gdbarch()

struct gdbarch* arch_object_to_gdbarch | ( | PyObject * | obj | ) |

Definition at line 69 of file py-arch.c.

References arch_object_type_object::gdbarch.

## ◆ block_object_to_block()

const struct block* block_object_to_block | ( | PyObject * | obj | ) |

Definition at line 285 of file py-block.c.

References block_object_type.

Referenced by blpy_is_valid(), frapy_read_var(), gdbpy_lookup_symbol(), gdbpy_lookup_type(), and typy_template_argument().

## ◆ block_to_block_object()

PyObject* block_to_block_object | ( | const struct block * | block,
|  | struct objfile * | objfile
| ) |  |

Definition at line 272 of file py-block.c.

References block_object_type, and set_block().

Referenced by blpy_get_global_block(), blpy_get_static_block(), blpy_get_superblock(), frapy_block(), gdbpy_block_for_pc(), stpy_global_block(), and stpy_static_block().

## ◆ bpfinishpy_post_stop_hook()

void bpfinishpy_post_stop_hook | ( | struct gdbpy_breakpoint_object * | bp_obj | ) |

Definition at line 137 of file py-finishbreakpoint.c.

References gdbpy_breakpoint_object::bp, CATCH, disable_breakpoint(), disp_del, breakpoint::disposition, END_CATCH, gdb_assert, gdbpy_convert_exception(), gdbpy_print_stack(), RETURN_MASK_ALL, and TRY.

Referenced by gdbpy_breakpoint_cond_says_stop().

## ◆ bpfinishpy_pre_stop_hook()

void bpfinishpy_pre_stop_hook | ( | struct gdbpy_breakpoint_object * | bp_obj | ) |

Definition at line 94 of file py-finishbreakpoint.c.

References CATCH, END_CATCH, finish_breakpoint_object::function_value, gdb_assert, gdbpy_convert_exception(), gdbpy_print_stack(), get_return_value(), RETURN_MASK_ALL, finish_breakpoint_object::return_type, finish_breakpoint_object::return_value, TRY, type_object_to_type(), value_object_to_value(), value_to_value_object(), and value_type().

Referenced by gdbpy_breakpoint_cond_says_stop().

## ◆ convert_value_from_python()

struct value* convert_value_from_python | ( | PyObject * | obj | ) |

Definition at line 1615 of file py-value.c.

References _, allocate_value(), builtin_type_pybool, builtin_type_pychar, builtin_type_pyfloat, builtin_type_pyint, builtin_type_pylong, builtin_type_upylong, CATCH, END_CATCH, gdb_assert, gdbpy_is_lazy_string(), gdbpy_is_string(), gdbpy_value_cst, gdb::ref_ptr< T, Policy >::get(), python_string_to_target_string(), RETURN_MASK_ALL, RETURN_QUIT, target_float_from_host_double(), TRY, value_contents_raw(), value_copy(), value_cstring(), value_from_longest(), value_from_ulongest(), value_object_type, and value_type().

Referenced by extract_value(), fnpy_call(), gdbpy_invoke_xmethod(), pretty_print_one_value(), print_children(), py_varobj_iter_next(), valpy_binop_throw(), valpy_call(), valpy_getitem(), valpy_new(), and valpy_richcompare_throw().

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [1/7]

PyTypeObject value_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "value_object" |  | ) |

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [2/7]

PyTypeObject block_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "block_object" |  | ) |

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [3/7]

PyTypeObject symbol_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "symbol_object" |  | ) |

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [4/7]

PyTypeObject event_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "event_object" |  | ) |

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [5/7]

PyTypeObject breakpoint_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "breakpoint_object" |  | ) |

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [6/7]

PyTypeObject frame_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "frame_object" |  | ) |

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [7/7]

PyTypeObject thread_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "thread_object" |  | ) |

## ◆ create_thread_object()

thread_object* create_thread_object | ( | struct thread_info * | tp | ) |

Definition at line 40 of file py-infthread.c.

References find_inferior_object(), thread_object::inf_obj, thread_info::ptid, ptid_get_pid(), thread_object::thread, threadlist_entry::thread_obj, and thread_object_type.

Referenced by add_thread_object().

## ◆ find_inferior_object()

PyObject* find_inferior_object | ( | int | pid | ) |

Definition at line 296 of file py-inferior.c.

References find_inferior_pid(), inferior_to_inferior_object(), and pid.

Referenced by create_thread_object(), delete_thread_object(), and find_thread_object().

## ◆ find_thread_object()

thread_object* find_thread_object | ( | ptid_t | ptid | ) |

Definition at line 307 of file py-inferior.c.

References find_inferior_object(), gdb::ref_ptr< T, Policy >::get(), threadlist_entry::next, pid, thread_info::ptid, ptid_equal(), ptid_get_pid(), thread_object::thread, and threadlist_entry::thread_obj.

Referenced by gdbpy_selected_thread(), get_event_thread(), and infpy_thread_from_thread_handle().

## ◆ frame_info_to_frame_object()

PyObject* frame_info_to_frame_object | ( | struct frame_info * | frame | ) |

Definition at line 359 of file py-frame.c.

References CATCH, END_CATCH, frame_object_type, gdbpy_convert_exception(), get_frame_arch(), get_frame_id(), get_frame_unwind_stop_reason(), get_next_frame(), get_prev_frame(), gdb::ref_ptr< T, Policy >::release(), RETURN_MASK_ALL, and TRY.

Referenced by bootstrap_python_frame_filters(), create_register_changed_event_object(), frapy_newer(), frapy_older(), gdbpy_newest_frame(), and gdbpy_selected_frame().

## ◆ frame_object_to_frame_info()

struct frame_info* frame_object_to_frame_info | ( | PyObject * | frame_obj | ) |

Definition at line 63 of file py-frame.c.

References frame_find_by_id(), frame_object::frame_id, frame_object::frame_id_is_next, and get_prev_frame().

Referenced by bpfinishpy_init(), frapy_is_valid(), py_print_frame(), and sympy_value().

## ◆ gdb_Py_DECREF()

static void gdb_Py_DECREF | ( | void * | op | ) |
| inline static

Definition at line 195 of file python-internal.h.

References Py_DECREF.

## ◆ gdb_py_generic_dict()

PyObject* gdb_py_generic_dict | ( | PyObject * | self,
|  | void * | closure
| ) |  |

Definition at line 359 of file py-utils.c.

## ◆ gdb_py_int_as_long()

int gdb_py_int_as_long | ( | PyObject * | ,
|  | long * |
| ) |  |

Definition at line 346 of file py-utils.c.

Referenced by bppy_set_hit_count(), bppy_set_ignore_count(), bppy_set_task(), bppy_set_thread(), cmdpy_completer(), cmdpy_completer_handle_brkchars(), pyuw_parse_register_id(), set_parameter_value(), typy_array_1(), and valpy_getitem().

## ◆ gdb_py_object_from_longest()

PyObject* gdb_py_object_from_longest | ( | LONGEST | l | ) |

Definition at line 299 of file py-utils.c.

Referenced by ltpy_entry_get_line(), ltpy_entry_get_pc(), ltpy_get_all_source_lines(), and valpy_int().

## ◆ gdb_py_object_from_ulongest()

PyObject* gdb_py_object_from_ulongest | ( | ULONGEST | l | ) |

Definition at line 321 of file py-utils.c.

Referenced by blpy_get_end(), and blpy_get_start().

## ◆ gdb_PyArg_ParseTupleAndKeywords()

static int gdb_PyArg_ParseTupleAndKeywords | ( | PyObject * | args,
|  | PyObject * | kw,
|  | const char * | format,
|  | const char ** | keywords,
|  |  | ...
| ) |  |
| inline static

Definition at line 338 of file python-internal.h.

Referenced by archpy_disassemble(), bpfinishpy_init(), bppy_init(), cmdpy_init(), execute_gdb_command(), gdbpy_flush(), gdbpy_lookup_global_symbol(), gdbpy_lookup_objfile(), gdbpy_lookup_symbol(), gdbpy_lookup_type(), gdbpy_rbreak(), gdbpy_write(), infpy_read_memory(), infpy_search_memory(), infpy_thread_from_thread_handle(), infpy_write_memory(), objfpy_add_separate_debug_file(), valpy_lazy_string(), and valpy_string().

## ◆ gdb_PyErr_NewException()

static PyObject* gdb_PyErr_NewException | ( | const char * | name,
|  | PyObject * | base,
|  | PyObject * | dict
| ) |  |
| inline static

Definition at line 258 of file python-internal.h.

References name, and PyErr_NewException.

## ◆ gdb_pymodule_addobject()

int gdb_pymodule_addobject | ( | PyObject * | module,
|  | const char * | name,
|  | PyObject * | object
| ) |  |

Definition at line 376 of file py-utils.c.

References name, and Py_DECREF.

Referenced by add_new_registry(), do_finish_initialization(), do_start_initialization(), gdbpy_initialize_arch(), gdbpy_initialize_blocks(), gdbpy_initialize_breakpoints(), gdbpy_initialize_commands(), gdbpy_initialize_event_generic(), gdbpy_initialize_eventregistry(), gdbpy_initialize_finishbreakpoints(), gdbpy_initialize_frames(), gdbpy_initialize_functions(), gdbpy_initialize_inferior(), gdbpy_initialize_linetable(), gdbpy_initialize_objfile(), gdbpy_initialize_parameters(), gdbpy_initialize_pspace(), gdbpy_initialize_py_events(), gdbpy_initialize_symbols(), gdbpy_initialize_symtabs(), gdbpy_initialize_thread(), gdbpy_initialize_types(), gdbpy_initialize_unwind(), and gdbpy_initialize_values().

## ◆ gdb_PyObject_CallMethod()

template<typename... Args>

static PyObject* gdb_PyObject_CallMethod | ( | PyObject * | o,
|  | const char * | method,
|  | const char * | format,
|  | Args... | args
| ) |  |
| inline static

Definition at line 241 of file python-internal.h.

References PyObject_CallMethod.

## ◆ gdb_PyObject_GetAttrString()

static PyObject* gdb_PyObject_GetAttrString | ( | PyObject * | obj,
|  | const char * | attr
| ) |  |
| inline static

Definition at line 211 of file python-internal.h.

References PyObject_GetAttrString.

## ◆ gdb_PyObject_HasAttrString()

static int gdb_PyObject_HasAttrString | ( | PyObject * | obj,
|  | const char * | attr
| ) |  |
| inline static

Definition at line 224 of file python-internal.h.

References PyObject_HasAttrString.

## ◆ gdb_PySys_GetObject()

static PyObject* gdb_PySys_GetObject | ( | const char * | name | ) |
| inline static

Definition at line 270 of file python-internal.h.

References name, and PySys_GetObject.

## ◆ gdb_PySys_SetPath()

static void gdb_PySys_SetPath | ( | const GDB_PYSYS_SETPATH_CHAR * | path | ) |
| inline static

Definition at line 288 of file python-internal.h.

References PySys_SetPath.

## ◆ gdbarch_to_arch_object()

PyObject* gdbarch_to_arch_object | ( | struct gdbarch * | gdbarch | ) |

Definition at line 81 of file py-arch.c.

References arch_object_data.

Referenced by frapy_arch().

## ◆ gdbpy_apply_frame_filter()

enum ext_lang_bt_status gdbpy_apply_frame_filter | ( | const struct extension_language_defn * | ,
|  | struct frame_info * | frame,
|  | int | flags,
|  | enum ext_lang_frame_args | args_type,
|  | struct ui_out * | out,
|  | int | frame_low,
|  | int | frame_high
| ) |  |

Definition at line 1334 of file py-framefilter.c.

References bootstrap_python_frame_filters(), CATCH, current_language, END_CATCH, EXT_LANG_BT_ERROR, EXT_LANG_BT_NO_FILTERS, flags, gdb_python_initialized, gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), get_frame_arch(), py_print_frame(), RETURN_MASK_ALL, and TRY.

## ◆ gdbpy_apply_val_pretty_printer()

enum ext_lang_rc gdbpy_apply_val_pretty_printer | ( | const struct extension_language_defn * | ,
|  | struct type * | type,
|  | LONGEST | embedded_offset,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | val,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |

Definition at line 654 of file py-prettyprint.c.

References value::embedded_offset, EXT_LANG_RC_ERROR, EXT_LANG_RC_NOP, EXT_LANG_RC_OK, find_pretty_printer(), gdb_python_initialized, gdbpy_get_display_hint(), gdb::ref_ptr< T, Policy >::get(), get_type_arch(), print_children(), print_stack_unless_memory_error(), print_string_repr(), string_repr_error, string_repr_none, TYPE_LENGTH, value_bytes_available(), value_contents_for_printing(), value_from_component(), and value_to_value_object().

## ◆ gdbpy_auto_load_enabled()

int gdbpy_auto_load_enabled | ( | const struct extension_language_defn * |  | ) |

Definition at line 47 of file py-auto-load.c.

References auto_load_python_scripts.

## ◆ gdbpy_block_for_pc()

PyObject* gdbpy_block_for_pc | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 372 of file py-block.c.

References _, block_for_pc(), block_to_block_object(), CATCH, COMPUNIT_OBJFILE, END_CATCH, find_pc_compunit_symtab(), GDB_PY_HANDLE_EXCEPTION, GDB_PY_LLU_ARG, RETURN_MASK_ALL, and TRY.

## ◆ gdbpy_breakpoint_cond_says_stop()

enum ext_lang_bp_stop gdbpy_breakpoint_cond_says_stop | ( | const struct extension_language_defn * | ,
|  | struct breakpoint * |
| ) |  |

Definition at line 890 of file py-breakpoint.c.

References bpfinishpy_post_stop_hook(), bpfinishpy_pre_stop_hook(), current_language, EXT_LANG_BP_STOP_NO, EXT_LANG_BP_STOP_UNSET, EXT_LANG_BP_STOP_YES, breakpoint::gdbarch, gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), get_current_arch(), gdbpy_breakpoint_object::is_finish_bp, breakpoint::py_bp_object, PyObject_CallMethod, PyObject_HasAttrString, and stop_func.

## ◆ gdbpy_breakpoint_has_cond()

int gdbpy_breakpoint_has_cond | ( | const struct extension_language_defn * | ,
|  | struct breakpoint * | b
| ) |  |

Definition at line 943 of file py-breakpoint.c.

References current_language, breakpoint::gdbarch, get_current_arch(), breakpoint::py_bp_object, PyObject_HasAttrString, and stop_func.

## ◆ gdbpy_breakpoints()

PyObject* gdbpy_breakpoints | ( | PyObject * | ,
|  | PyObject * |
| ) |  |

Definition at line 866 of file py-breakpoint.c.

References bppy_live, build_bp_list(), gdb::ref_ptr< T, Policy >::get(), and iterate_over_breakpoints().

## ◆ gdbpy_clone_xmethod_worker_data()

void* gdbpy_clone_xmethod_worker_data | ( | const struct extension_language_defn * | extlang,
|  | void * | data
| ) |  |

Definition at line 70 of file py-xmethods.c.

References current_language, gdb_assert, get_current_arch(), gdbpy_worker_data::this_type, gdbpy_worker_data::worker, and XCNEW.

## ◆ gdbpy_convert_exception()

void gdbpy_convert_exception | ( | struct gdb_exception |  | ) |

Definition at line 235 of file py-utils.c.

References gdb_exception::error, gdbpy_gdb_error, gdbpy_gdb_memory_error, MEMORY_ERROR, gdb_exception::message, gdb_exception::reason, and RETURN_QUIT.

Referenced by archpy_disassemble(), bpfinishpy_detect_out_scope_cb(), bpfinishpy_init(), bpfinishpy_post_stop_hook(), bpfinishpy_pre_stop_hook(), bppy_get_commands(), enumerate_args(), enumerate_locals(), frame_info_to_frame_object(), frapy_read_var(), gdbpy_decode_line(), gdbpy_readline_wrapper(), gdbpy_start_recording(), gdbpy_stop_recording(), py_print_args(), py_print_frame(), py_print_single_arg(), py_print_type(), py_print_value(), pyuw_value_obj_to_pointer(), and recpy_bt_insn_decoded().

## ◆ gdbpy_create_lazy_string_object()

PyObject* gdbpy_create_lazy_string_object | ( | CORE_ADDR | address,
|  | long | length,
|  | const char * | encoding,
|  | struct type * | type
| ) |  |

Definition at line 169 of file py-lazy-string.c.

References _, lazy_string_object::address, check_typedef(), lazy_string_object::encoding, gdbpy_gdb_memory_error, get_array_bounds(), lazy_string_object_type, lazy_string_object::length, type::length, lazy_string_object::type, TYPE_CODE, TYPE_CODE_ARRAY, and type_to_type_object().

Referenced by valpy_lazy_string().

## ◆ gdbpy_create_ptid_object()

PyObject* gdbpy_create_ptid_object | ( | ptid_t | ptid | ) |

Definition at line 259 of file py-infthread.c.

References selftests::ptid::lwp, pid, ptid_get_lwp(), ptid_get_pid(), ptid_get_tid(), and selftests::ptid::tid.

Referenced by create_inferior_call_event_object(), and thpy_get_ptid().

## ◆ gdbpy_current_recording()

PyObject* gdbpy_current_recording | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 621 of file py-record.c.

References find_record_target(), inferior_ptid, recpy_record_object::method, recpy_record_object::ptid, recpy_record_type, and target_record_method().

Referenced by gdbpy_start_recording().

## ◆ gdbpy_default_visualizer()

PyObject* gdbpy_default_visualizer | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 767 of file py-prettyprint.c.

References _, find_pretty_printer(), and value_object_to_value().

## ◆ gdbpy_exception_to_string()

gdb::unique_xmalloc_ptr<char> gdbpy_exception_to_string | ( | PyObject * | ptype,
|  | PyObject * | pvalue
| ) |  |

Definition at line 212 of file py-utils.c.

References gdbpy_obj_to_string().

Referenced by cmdpy_function(), fnpy_call(), gdbpy_print_stack(), print_stack_unless_memory_error(), and py_varobj_iter_next().

## ◆ gdbpy_extract_lazy_string()

void gdbpy_extract_lazy_string | ( | PyObject * | string,
|  | CORE_ADDR * | addr,
|  | struct type ** | str_type,
|  | long * | length,
|  | gdb::unique_xmalloc_ptr< char > * | encoding
| ) |  |

Definition at line 277 of file py-lazy-string.c.

References lazy_string_object::address, lazy_string_object::encoding, gdb_assert, gdbpy_is_lazy_string(), lazy_string_object::length, type::length, and stpy_lazy_string_elt_type().

Referenced by print_children(), print_string_repr(), and varobj_value_get_print_value().

## ◆ gdbpy_frame_stop_reason_string()

PyObject* gdbpy_frame_stop_reason_string | ( | PyObject * | ,
|  | PyObject * |
| ) |  |

Definition at line 643 of file py-frame.c.

References _, host_charset(), and unwind_stop_reason_to_string().

## ◆ gdbpy_free_xmethod_worker_data()

void gdbpy_free_xmethod_worker_data | ( | const struct extension_language_defn * | extlang,
|  | void * | data
| ) |  |

Definition at line 52 of file py-xmethods.c.

References current_language, gdb_assert, get_current_arch(), Py_DECREF, gdbpy_worker_data::this_type, gdbpy_worker_data::worker, and xfree().

## ◆ gdbpy_get_display_hint()

gdb::unique_xmalloc_ptr<char> gdbpy_get_display_hint | ( | PyObject * | printer | ) |

Definition at line 226 of file py-prettyprint.c.

References gdbpy_display_hint_cst, gdbpy_is_string(), gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), and python_string_to_host_string().

Referenced by gdbpy_apply_val_pretty_printer(), varobj_get_display_hint(), and varobj_value_get_print_value().

## ◆ gdbpy_get_matching_xmethod_workers()

enum ext_lang_rc gdbpy_get_matching_xmethod_workers | ( | const struct extension_language_defn * | extlang,
|  | struct type * | obj_type,
|  | const char * | method_name,
|  | xmethod_worker_vec ** | dm_vec
| ) |  |

Definition at line 131 of file py-xmethods.c.

References ALL_OBJFILES, current_language, current_program_space, EXT_LANG_RC_ERROR, EXT_LANG_RC_OK, gdb_assert, gdb_python_module, gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), get_current_arch(), invoke_match_method(), matchers_attr_str, new_python_xmethod_worker(), objfile::objfile(), objfile_to_objfile_object(), objfpy_get_xmethods(), pspace_to_pspace_object(), pspy_get_xmethods(), PyObject_GetAttrString, PyObject_HasAttrString, type_to_type_object(), VEC, and VEC_safe_push.

## ◆ gdbpy_get_varobj_pretty_printer()

PyObject* gdbpy_get_varobj_pretty_printer | ( | struct value * | value | ) |

Definition at line 743 of file py-prettyprint.c.

References CATCH, END_CATCH, find_pretty_printer(), GDB_PY_HANDLE_EXCEPTION, RETURN_MASK_ALL, TRY, value_copy(), and value_to_value_object().

Referenced by install_default_visualizer().

## ◆ gdbpy_get_xmethod_arg_types()

enum ext_lang_rc gdbpy_get_xmethod_arg_types | ( | const struct extension_language_defn * | extlang,
|  | struct xmethod_worker * | worker,
|  | int * | nargs,
|  | struct type *** | arg_types
| ) |  |

Definition at line 308 of file py-xmethods.c.

References _, current_language, EXT_LANG_RC_ERROR, EXT_LANG_RC_OK, gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), get_arg_types_method_name, get_current_arch(), lookup_pointer_type(), make_cv_type(), py_get_arg_types_method_name, PyObject_GetAttrString, gdbpy_worker_data::this_type, type_object_to_type(), gdbpy_worker_data::worker, and XCNEWVEC.

## ◆ gdbpy_get_xmethod_result_type()

enum ext_lang_rc gdbpy_get_xmethod_result_type | ( | const struct extension_language_defn * | extlang,
|  | struct xmethod_worker * | worker,
|  | struct value * | object,
|  | struct value ** | args,
|  | int | nargs,
|  | struct type ** | result_type
| ) |  |

Definition at line 433 of file py-xmethods.c.

References _, check_typedef(), current_language, EXT_LANG_RC_ERROR, EXT_LANG_RC_OK, gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), get_current_arch(), get_result_type_method_name, lookup_pointer_type(), lookup_reference_type(), PyObject_GetAttrString, gdb::ref_ptr< T, Policy >::release(), gdbpy_worker_data::this_type, TYPE_CODE, TYPE_CODE_PTR, TYPE_IS_REFERENCE, type_object_to_type(), types_equal(), value_cast(), value_to_value_object(), value_type(), and gdbpy_worker_data::worker.

## ◆ gdbpy_history()

PyObject* gdbpy_history | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 1730 of file py-value.c.

References access_value_history(), CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, RETURN_MASK_ALL, TRY, and value_to_value_object().

## ◆ gdbpy_inferiors()

PyObject* gdbpy_inferiors | ( | PyObject * | unused,
|  | PyObject * | unused2
| ) |  |

Definition at line 480 of file py-inferior.c.

References build_inferior_list(), gdb::ref_ptr< T, Policy >::get(), and iterate_over_inferiors().

## ◆ gdbpy_initialize_arch()

int gdbpy_initialize_arch | ( | void |  | ) |

Definition at line 237 of file py-arch.c.

References arch_object_data, arch_object_data_init(), arch_object_type, gdb_module, gdb_pymodule_addobject(), and gdbarch_data_register_post_init().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_auto_load()

int gdbpy_initialize_auto_load | ( | void |  | ) |

Definition at line 61 of file py-auto-load.c.

References _, add_cmd(), add_info(), add_setshow_boolean_cmd(), auto_load_info_cmdlist_get(), auto_load_python_scripts, auto_load_set_cmdlist_get(), auto_load_show_cmdlist_get(), class_info, class_support, deprecate_cmd(), info_auto_load_python_scripts(), lookup_cmd(), setlist, show_auto_load_python_scripts(), and showlist.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_blocks()

int gdbpy_initialize_blocks | ( | void |  | ) |

Definition at line 431 of file py-block.c.

References block_object_type, block_syms_iterator_object_type, blpy_objfile_data_key, del_objfile_blocks(), gdb_module, and gdb_pymodule_addobject().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_breakpoints()

int gdbpy_initialize_breakpoints | ( | void |  | ) |

Definition at line 1077 of file py-breakpoint.c.

References breakpoint_object_type, code, gdb_module, gdb_pymodule_addobject(), gdbpy_breakpoint_created(), gdbpy_breakpoint_deleted(), gdbpy_breakpoint_modified(), pybp_code::name, name, observer_attach_breakpoint_created(), observer_attach_breakpoint_deleted(), observer_attach_breakpoint_modified(), pybp_codes, and pybp_watch_types.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_btrace()

int gdbpy_initialize_btrace | ( | void |  | ) |

Definition at line 834 of file py-record-btrace.c.

References btpy_list_contains(), btpy_list_item(), btpy_list_length(), btpy_list_mapping_methods, btpy_list_methods, btpy_list_richcompare(), btpy_list_sequence_methods, btpy_list_slice(), and btpy_list_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_commands()

int gdbpy_initialize_commands | ( | void |  | ) |

Definition at line 650 of file py-cmd.c.

References class_breakpoint, class_files, class_info, class_maintenance, class_obscure, class_run, class_stack, class_support, class_trace, class_user, class_vars, cmdpy_object_type, complete_cst, completers, gdb_module, gdb_pymodule_addobject(), invoke_cst, N_COMPLETERS, name, and no_class.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_event()

int gdbpy_initialize_event | ( | void |  | ) |

Definition at line 58 of file py-event.c.

References event_object_type, and gdbpy_initialize_event_generic().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_eventregistry()

int gdbpy_initialize_eventregistry | ( | void |  | ) |

Definition at line 107 of file py-evtregistry.c.

References eventregistry_object_type, gdb_module, and gdb_pymodule_addobject().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_finishbreakpoints()

int gdbpy_initialize_finishbreakpoints | ( | void |  | ) |

Definition at line 410 of file py-finishbreakpoint.c.

References bpfinishpy_handle_exit(), bpfinishpy_handle_stop(), finish_breakpoint_object_type, gdb_module, gdb_pymodule_addobject(), observer_attach_inferior_exit(), and observer_attach_normal_stop().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_frames()

int gdbpy_initialize_frames | ( | void |  | ) |

Definition at line 692 of file py-frame.c.

References ARCH_FRAME, DUMMY_FRAME, frame_object_type, gdb_module, gdb_pymodule_addobject(), INLINE_FRAME, NORMAL_FRAME, SENTINEL_FRAME, SIGTRAMP_FRAME, and TAILCALL_FRAME.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_functions()

int gdbpy_initialize_functions | ( | void |  | ) |

Definition at line 186 of file py-function.c.

References fnpy_object_type, gdb_module, and gdb_pymodule_addobject().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_gdb_readline()

void gdbpy_initialize_gdb_readline | ( | void |  | ) |

Definition at line 89 of file py-gdb-readline.c.

References gdbpy_readline_wrapper().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_inferior()

int gdbpy_initialize_inferior | ( | void |  | ) |

Definition at line 917 of file py-inferior.c.

References add_thread_object(), delete_thread_object(), gdb_module, gdb_pymodule_addobject(), inferior_object_type, infpy_inf_data_key, membuf_object_type, observer_attach_inferior_added(), observer_attach_inferior_call_post(), observer_attach_inferior_call_pre(), observer_attach_inferior_exit(), observer_attach_inferior_removed(), observer_attach_memory_changed(), observer_attach_new_objfile(), observer_attach_new_thread(), observer_attach_normal_stop(), observer_attach_register_changed(), observer_attach_target_resumed(), observer_attach_thread_exit(), py_free_inferior(), python_inferior_deleted(), python_inferior_exit(), python_new_inferior(), python_new_objfile(), python_on_inferior_call_post(), python_on_inferior_call_pre(), python_on_memory_change(), python_on_normal_stop(), python_on_register_change(), and python_on_resume().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_instruction()

int gdbpy_initialize_instruction | ( | void |  | ) |

Definition at line 57 of file py-instruction.c.

References py_insn_getset, and py_insn_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_lazy_string()

int gdbpy_initialize_lazy_string | ( | void |  | ) |

Definition at line 233 of file py-lazy-string.c.

References lazy_string_object_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_linetable()

int gdbpy_initialize_linetable | ( | void |  | ) |

Definition at line 292 of file py-linetable.c.

References gdb_module, gdb_pymodule_addobject(), linetable_entry_object_type, linetable_object_type, and ltpy_iterator_object_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_objfile()

int gdbpy_initialize_objfile | ( | void |  | ) |

Definition at line 645 of file py-objfile.c.

References gdb_module, gdb_pymodule_addobject(), objfile_object_type, objfpy_objfile_data_key, and py_free_objfile().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_parameters()

int gdbpy_initialize_parameters | ( | void |  | ) |

Definition at line 729 of file py-param.c.

References gdb_module, gdb_pymodule_addobject(), parm_constant::name, name, parm_constants, parmpy_object_type, set_doc_cst, and show_doc_cst.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_pspace()

int gdbpy_initialize_pspace | ( | void |  | ) |

Definition at line 367 of file py-progspace.c.

References gdb_module, gdb_pymodule_addobject(), pspace_object_type, pspy_pspace_data_key, and py_free_pspace().

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_py_events()

int gdbpy_initialize_py_events | ( | void |  | ) |

Definition at line 54 of file py-evts.c.

References gdb_module, gdb_py_events, gdb_pymodule_addobject(), and events_object::module.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_record()

int gdbpy_initialize_record | ( | void |  | ) |

Definition at line 547 of file py-record.c.

References py_insn_type, recpy_element_hash(), recpy_element_richcompare(), recpy_func_getset, recpy_func_type, recpy_gap_getset, recpy_gap_type, recpy_insn_getset, recpy_insn_type, recpy_record_getset, recpy_record_methods, and recpy_record_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_symbols()

int gdbpy_initialize_symbols | ( | void |  | ) |

Definition at line 502 of file py-symbol.c.

References del_objfile_symbols(), FUNCTIONS_DOMAIN, gdb_module, gdb_pymodule_addobject(), LABEL_DOMAIN, LOC_ARG, LOC_BLOCK, LOC_COMPUTED, LOC_CONST, LOC_CONST_BYTES, LOC_LABEL, LOC_LOCAL, LOC_OPTIMIZED_OUT, LOC_REF_ARG, LOC_REGISTER, LOC_REGPARM_ADDR, LOC_STATIC, LOC_TYPEDEF, LOC_UNDEF, LOC_UNRESOLVED, STRUCT_DOMAIN, symbol_object_type, sympy_objfile_data_key, TYPES_DOMAIN, UNDEF_DOMAIN, VAR_DOMAIN, and VARIABLES_DOMAIN.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_symtabs()

int gdbpy_initialize_symtabs | ( | void |  | ) |

Definition at line 518 of file py-symtab.c.

References del_objfile_sal(), del_objfile_symtab(), gdb_module, gdb_pymodule_addobject(), sal_object_type, salpy_objfile_data_key, stpy_objfile_data_key, and symtab_object_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_thread()

int gdbpy_initialize_thread | ( | void |  | ) |

Definition at line 299 of file py-infthread.c.

References gdb_module, gdb_pymodule_addobject(), and thread_object_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_types()

int gdbpy_initialize_types | ( | void |  | ) |

Definition at line 1374 of file py-type.c.

References code, field_object_type, gdb_module, gdb_pymodule_addobject(), name, pyty_code::name, pyty_codes, save_objfile_types(), type_iterator_object_type, type_object_type, and typy_objfile_data_key.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_unwind()

int gdbpy_initialize_unwind | ( | void |  | ) |

Definition at line 653 of file py-unwind.c.

References _, add_setshow_zuinteger_cmd(), class_maintenance, gdb_module, gdb_pymodule_addobject(), gdbarch_data_register_post_init(), observer_attach_architecture_changed(), pending_frame_object_type, pyuw_debug, pyuw_gdbarch_data, pyuw_gdbarch_data_init(), pyuw_on_new_gdbarch(), setdebuglist, showdebuglist, and unwind_info_object_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_values()

int gdbpy_initialize_values | ( | void |  | ) |

Definition at line 1760 of file py-value.c.

References gdb_module, gdb_pymodule_addobject(), and value_object_type.

Referenced by do_start_initialization().

## ◆ gdbpy_initialize_xmethods()

int gdbpy_initialize_xmethods | ( | void |  | ) |

Definition at line 647 of file py-xmethods.c.

References get_arg_types_method_name, match_method_name, py_get_arg_types_method_name, and py_match_method_name.

Referenced by do_start_initialization().

## ◆ gdbpy_invoke_xmethod()

struct value* gdbpy_invoke_xmethod | ( | const struct extension_language_defn * | extlang,
|  | struct xmethod_worker * | worker,
|  | struct value * | obj,
|  | struct value ** | args,
|  | int | nargs
| ) |  |

Definition at line 534 of file py-xmethods.c.

References _, allocate_value(), check_typedef(), convert_value_from_python(), current_language, error(), gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), get_current_arch(), lookup_pointer_type(), lookup_reference_type(), lookup_typename(), python_gdbarch, python_language, gdb::ref_ptr< T, Policy >::release(), gdbpy_worker_data::this_type, TYPE_CODE, TYPE_CODE_PTR, TYPE_IS_REFERENCE, type_object_to_type(), types_equal(), value_cast(), value_to_value_object(), value_type(), and gdbpy_worker_data::worker.

## ◆ gdbpy_is_field()

int gdbpy_is_field | ( | PyObject * | obj | ) |

Definition at line 151 of file py-type.c.

References field_object_type.

Referenced by valpy_getitem().

## ◆ gdbpy_is_lazy_string()

int gdbpy_is_lazy_string | ( | PyObject * | result | ) |

Definition at line 245 of file py-lazy-string.c.

References lazy_string_object_type.

Referenced by convert_value_from_python(), gdbpy_extract_lazy_string(), pretty_print_one_value(), print_children(), print_string_repr(), and varobj_value_get_print_value().

## ◆ gdbpy_is_string()

int gdbpy_is_string | ( | PyObject * | obj | ) |

Definition at line 173 of file py-utils.c.

Referenced by call_doc_function(), cmdpy_completer(), cmdpy_init(), compute_enum_values(), convert_value_from_python(), extract_sym(), fnpy_init(), frapy_read_var(), gdbpy_get_display_hint(), get_doc_string(), pretty_print_one_value(), print_children(), py_print_frame(), pyuw_parse_register_id(), set_parameter_value(), thpy_set_name(), and valpy_getitem().

## ◆ gdbpy_is_value_object()

int gdbpy_is_value_object | ( | PyObject * | obj | ) |

Definition at line 1754 of file py-value.c.

References value_object_type.

Referenced by get_addr_from_python(), and infpy_thread_from_thread_handle().

## ◆ gdbpy_lookup_global_symbol()

PyObject* gdbpy_lookup_global_symbol | ( | PyObject * | self,
|  | PyObject * | args,
|  | PyObject * | kw
| ) |  |

Definition at line 443 of file py-symbol.c.

References CATCH, symbol::domain, END_CATCH, GDB_PY_HANDLE_EXCEPTION, gdb_PyArg_ParseTupleAndKeywords(), lookup_global_symbol(), name, RETURN_MASK_ALL, block_symbol::symbol, symbol_to_symbol_object(), TRY, and VAR_DOMAIN.

## ◆ gdbpy_lookup_objfile()

PyObject* gdbpy_lookup_objfile | ( | PyObject * | self,
|  | PyObject * | args,
|  | PyObject * | kw
| ) |  |

Definition at line 560 of file py-objfile.c.

References _, gdb_PyArg_ParseTupleAndKeywords(), name, objfile::objfile(), objfile_to_objfile_object(), objfpy_build_id_ok(), objfpy_lookup_objfile_by_build_id(), and objfpy_lookup_objfile_by_name().

## ◆ gdbpy_lookup_symbol()

PyObject* gdbpy_lookup_symbol | ( | PyObject * | self,
|  | PyObject * | args,
|  | PyObject * | kw
| ) |  |

Definition at line 371 of file py-symbol.c.

References _, block_object_to_block(), block_object_type, CATCH, symbol::domain, END_CATCH, GDB_PY_HANDLE_EXCEPTION, gdb_PyArg_ParseTupleAndKeywords(), get_frame_block(), get_selected_frame(), lookup_symbol(), name, RETURN_MASK_ALL, selected_frame, block_symbol::symbol, symbol_to_symbol_object(), TRY, field_of_this_result::type, and VAR_DOMAIN.

## ◆ gdbpy_lookup_type()

PyObject* gdbpy_lookup_type | ( | PyObject * | self,
|  | PyObject * | args,
|  | PyObject * | kw
| ) |  |

Definition at line 1343 of file py-type.c.

References _, block_object_to_block(), gdb_PyArg_ParseTupleAndKeywords(), type_to_type_object(), and typy_lookup_typename().

## ◆ gdbpy_newest_frame()

PyObject* gdbpy_newest_frame | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 601 of file py-frame.c.

References CATCH, END_CATCH, frame_info_to_frame_object(), GDB_PY_HANDLE_EXCEPTION, get_current_frame(), RETURN_MASK_ALL, and TRY.

## ◆ gdbpy_obj_to_string()

gdb::unique_xmalloc_ptr<char> gdbpy_obj_to_string | ( | PyObject * | obj | ) |

Definition at line 186 of file py-utils.c.

References gdb::ref_ptr< T, Policy >::get(), and python_string_to_host_string().

Referenced by gdbpy_exception_to_string(), gdbpy_print_stack(), and pyuw_parse_register_id().

## ◆ gdbpy_parameter_value()

PyObject* gdbpy_parameter_value | ( | enum var_types | type,
|  | void * | var
| ) |  |

Definition at line 433 of file python.c.

References _, AUTO_BOOLEAN_FALSE, AUTO_BOOLEAN_TRUE, host_string_to_python_string(), INT_MAX, UINT_MAX, var_auto_boolean, var_boolean, var_enum, var_filename, var_integer, var_optional_filename, var_string, var_string_noescape, var_uinteger, and var_zinteger.

Referenced by gdbpy_parameter(), and get_attr().

## ◆ gdbpy_parse_command_name()

char* gdbpy_parse_command_name | ( | const char * | name,
|  | struct cmd_list_element *** | base_list,
|  | struct cmd_list_element ** | start_list
| ) |  |

Definition at line 405 of file py-cmd.c.

References _, CMD_LIST_AMBIGUOUS, lookup_cmd_1(), name, cmd_list_element::prefixlist, xfree(), and xmalloc().

Referenced by cmdpy_init(), and parmpy_init().

## ◆ gdbpy_preserve_values()

void gdbpy_preserve_values | ( | const struct extension_language_defn * | ,
|  | struct objfile * | objfile,
|  | htab_t | copied_types
| ) |  |

Definition at line 163 of file py-value.c.

References value_object::next, preserve_one_value(), value_object::value, and values_in_python.

## ◆ gdbpy_print_python_errors_p()

int gdbpy_print_python_errors_p | ( | void |  | ) |

Definition at line 1252 of file python.c.

References gdbpy_should_print_stack, and python_excp_none.

Referenced by print_children().

## ◆ gdbpy_print_stack()

void gdbpy_print_stack | ( | void |  | ) |

Definition at line 1262 of file python.c.

References _, begin_line(), CATCH, END_CATCH, fprintf_filtered(), gdb_stderr, gdbpy_exception_to_string(), gdbpy_obj_to_string(), gdbpy_should_print_stack, python_excp_full, python_excp_none, RETURN_MASK_ALL, TRY, and type.

Referenced by _initialize_python(), add_thread_object(), bpfinishpy_detect_out_scope_cb(), bpfinishpy_out_of_scope(), bpfinishpy_post_stop_hook(), bpfinishpy_pre_stop_hook(), cmdpy_function(), construct_visualizer(), do_finish_initialization(), evpy_emit_event(), fnpy_call(), gdbpy_apply_frame_filter(), gdbpy_apply_type_printers(), gdbpy_before_prompt_hook(), gdbpy_breakpoint_cond_says_stop(), gdbpy_breakpoint_created(), gdbpy_breakpoint_deleted(), gdbpy_breakpoint_modified(), gdbpy_finish_initialization(), gdbpy_get_display_hint(), gdbpy_get_matching_xmethod_workers(), gdbpy_get_xmethod_arg_types(), gdbpy_get_xmethod_result_type(), gdbpy_invoke_xmethod(), gdbpy_rbreak(), gdbpy_start_type_printers(), get_doc_string(), get_set_value(), get_show_value(), install_default_visualizer(), print_children(), print_stack_unless_memory_error(), py_varobj_get_iterator(), py_varobj_iter_next(), python_inferior_deleted(), python_inferior_exit(), python_interactive_command(), python_new_inferior(), python_new_objfile(), python_on_inferior_call_post(), python_on_inferior_call_pre(), python_on_memory_change(), python_on_normal_stop(), python_on_register_change(), python_on_resume(), python_run_simple_file(), pyuw_sniffer(), varobj_set_visualizer(), varobj_value_get_print_value(), and gdbpy_enter::~gdbpy_enter().

## ◆ gdbpy_selected_frame()

PyObject* gdbpy_selected_frame | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 622 of file py-frame.c.

References CATCH, END_CATCH, frame_info_to_frame_object(), GDB_PY_HANDLE_EXCEPTION, get_selected_frame(), RETURN_MASK_ALL, and TRY.

## ◆ gdbpy_selected_inferior()

PyObject* gdbpy_selected_inferior | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 911 of file py-inferior.c.

References current_inferior(), and inferior_to_inferior_object().

## ◆ gdbpy_selected_thread()

PyObject* gdbpy_selected_thread | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 284 of file py-infthread.c.

References find_thread_object(), inferior_ptid, and threadlist_entry::thread_obj.

## ◆ gdbpy_start_recording()

PyObject* gdbpy_start_recording | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 595 of file py-record.c.

References CATCH, END_CATCH, gdbpy_convert_exception(), gdbpy_current_recording(), record_start(), RETURN_MASK_ALL, and TRY.

## ◆ gdbpy_stop_recording()

PyObject* gdbpy_stop_recording | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 638 of file py-record.c.

References CATCH, END_CATCH, gdbpy_convert_exception(), record_stop(), RETURN_MASK_ALL, and TRY.

## ◆ gdbpy_string_to_argv()

PyObject* gdbpy_string_to_argv | ( | PyObject * | self,
|  | PyObject * | args
| ) |  |

Definition at line 760 of file py-cmd.c.

References gdb::ref_ptr< T, Policy >::get(), and gdb::ref_ptr< T, Policy >::release().

## ◆ get_addr_from_python()

int get_addr_from_python | ( | PyObject * | obj,
|  | CORE_ADDR * | addr
| ) |  |

Definition at line 255 of file py-utils.c.

References _, CATCH, END_CATCH, gdb_py_long_as_ulongest, GDB_PY_SET_HANDLE_EXCEPTION, gdbpy_is_value_object(), gdb::ref_ptr< T, Policy >::get(), RETURN_MASK_ALL, TRY, value_as_address(), and value_object_to_value().

Referenced by infpy_read_memory(), infpy_search_memory(), infpy_write_memory(), and py_print_frame().

## ◆ host_string_to_python_string()

PyObject* host_string_to_python_string | ( | const char * | str | ) |

Definition at line 164 of file py-utils.c.

References host_charset().

Referenced by bppy_get_commands(), bppy_get_condition(), bppy_get_expression(), bppy_get_location(), gdbpy_parameter_value(), gdbpy_solib_name(), objfpy_get_build_id(), objfpy_get_filename(), objfpy_get_username(), pspy_get_filename(), stpy_fullname(), stpy_get_filename(), and stpy_get_producer().

## ◆ inferior_to_inferior_object()

PyObject* inferior_to_inferior_object | ( | struct inferior * | inferior | ) |

Definition at line 211 of file py-inferior.c.

References inferior_object::inferior, inferior_object_type, infpy_inf_data_key, inferior_object::nthreads, and inferior_object::threads.

Referenced by build_inferior_list(), create_exited_event_object(), find_inferior_object(), gdbpy_selected_inferior(), python_inferior_deleted(), and python_new_inferior().

## ◆ objfile_to_objfile_object()

PyObject* objfile_to_objfile_object | ( | struct objfile * |  | ) |

Definition at line 624 of file py-objfile.c.

References objfile::objfile(), objfile_object_type, objfpy_initialize(), and objfpy_objfile_data_key.

Referenced by create_new_objfile_event_object(), find_pretty_printer_from_objfiles(), gdbpy_get_current_objfile(), gdbpy_get_matching_xmethod_workers(), gdbpy_lookup_objfile(), gdbpy_objfiles(), objfpy_get_owner(), and stpy_get_objfile().

## ◆ objfpy_get_frame_filters()

PyObject* objfpy_get_frame_filters | ( | PyObject * | ,
|  | void * |
| ) |  |

Definition at line 283 of file py-objfile.c.

## ◆ objfpy_get_frame_unwinders()

PyObject* objfpy_get_frame_unwinders | ( | PyObject * | ,
|  | void * |
| ) |  |

Definition at line 324 of file py-objfile.c.

## ◆ objfpy_get_printers()

PyObject* objfpy_get_printers | ( | PyObject * | ,
|  | void * |
| ) |  |

Definition at line 243 of file py-objfile.c.

Referenced by find_pretty_printer_from_objfiles().

## ◆ objfpy_get_xmethods()

PyObject* objfpy_get_xmethods | ( | PyObject * | ,
|  | void * |
| ) |  |

Definition at line 377 of file py-objfile.c.

Referenced by gdbpy_get_matching_xmethod_workers().

## ◆ pspace_to_pspace_object()

PyObject* pspace_to_pspace_object | ( | struct program_space * |  | ) |

Definition at line 346 of file py-progspace.c.

References pspace_object_type, pspy_initialize(), and pspy_pspace_data_key.

Referenced by create_clear_objfiles_event_object(), find_pretty_printer_from_progspace(), gdbpy_get_current_progspace(), gdbpy_get_matching_xmethod_workers(), gdbpy_progspaces(), and objfpy_get_progspace().

## ◆ pspy_get_frame_filters()

PyObject* pspy_get_frame_filters | ( | PyObject * | ,
|  | void * |
| ) |  |

Definition at line 184 of file py-progspace.c.

## ◆ pspy_get_frame_unwinders()

PyObject* pspy_get_frame_unwinders | ( | PyObject * | ,
|  | void * |
| ) |  |

Definition at line 225 of file py-progspace.c.

## ◆ pspy_get_printers()

PyObject* pspy_get_printers | ( | PyObject * | ,
|  | void * |
| ) |  |

Definition at line 144 of file py-progspace.c.

Referenced by find_pretty_printer_from_progspace().

## ◆ pspy_get_xmethods()

PyObject* pspy_get_xmethods | ( | PyObject * | ,
|  | void * |
| ) |  |

Definition at line 278 of file py-progspace.c.

Referenced by gdbpy_get_matching_xmethod_workers().

## ◆ py_varobj_get_iterator()

struct varobj_iter* py_varobj_get_iterator | ( | struct varobj * | var,
|  | PyObject * | printer
| ) |  |

Definition at line 162 of file py-varobj.c.

References _, py_varobj_iter::base, error(), gdbpy_children_cst, gdbpy_print_stack(), gdb::ref_ptr< T, Policy >::get(), and py_varobj_iter::iter.

Referenced by varobj_get_iterator().

## ◆ python_string_to_host_string()

gdb::unique_xmalloc_ptr<char> python_string_to_host_string | ( | PyObject * | obj | ) |

Definition at line 152 of file py-utils.c.

References gdb::ref_ptr< T, Policy >::get(), host_charset(), python_string_to_unicode(), and unicode_to_encoded_string().

Referenced by bppy_init(), bppy_set_condition(), call_doc_function(), cmdpy_completer(), cmdpy_init(), compute_enum_values(), extract_sym(), fnpy_init(), gdbpy_apply_type_printers(), gdbpy_before_prompt_hook(), gdbpy_get_display_hint(), gdbpy_obj_to_string(), get_doc_string(), local_setattro(), print_children(), py_print_frame(), set_parameter_value(), thpy_set_name(), typy_getitem(), and valpy_getitem().

## ◆ python_string_to_target_python_string()

PyObject* python_string_to_target_python_string | ( | PyObject * | obj | ) |

Definition at line 139 of file py-utils.c.

References gdb::ref_ptr< T, Policy >::get(), python_string_to_unicode(), and unicode_to_target_python_string().

Referenced by print_string_repr().

## ◆ python_string_to_target_string()

gdb::unique_xmalloc_ptr<char> python_string_to_target_string | ( | PyObject * | obj | ) |

Definition at line 124 of file py-utils.c.

References gdb::ref_ptr< T, Policy >::get(), python_string_to_unicode(), and unicode_to_target_string().

Referenced by convert_value_from_python(), frapy_read_var(), gdbpy_rbreak(), and varobj_value_get_print_value().

## ◆ python_string_to_unicode()

PyObject* python_string_to_unicode | ( | PyObject * | obj | ) |

Definition at line 38 of file py-utils.c.

References _, and host_charset().

Referenced by python_string_to_host_string(), python_string_to_target_python_string(), and python_string_to_target_string().

## ◆ sal_object_to_symtab_and_line()

struct symtab_and_line* sal_object_to_symtab_and_line | ( | PyObject * | obj | ) |

Definition at line 453 of file py-symtab.c.

References sal_object_type.

Referenced by salpy_is_valid().

## ◆ symbol_object_to_symbol()

struct symbol* symbol_object_to_symbol | ( | PyObject * | obj | ) |

Definition at line 338 of file py-symbol.c.

References symbol_object_type.

Referenced by extract_sym(), frapy_read_var(), and sympy_is_valid().

## ◆ symbol_to_symbol_object()

PyObject* symbol_to_symbol_object | ( | struct symbol * | sym | ) |

Definition at line 325 of file py-symbol.c.

References set_symbol(), and symbol_object_type.

Referenced by blpy_block_syms_iternext(), blpy_get_function(), frapy_function(), gdbpy_lookup_global_symbol(), gdbpy_lookup_symbol(), and recpy_bt_func_symbol().

## ◆ symtab_and_line_to_sal_object()

PyObject* symtab_and_line_to_sal_object | ( | struct symtab_and_line | sal | ) |

Definition at line 438 of file py-symtab.c.

References gdb::ref_ptr< T, Policy >::get(), gdb::ref_ptr< T, Policy >::release(), sal_object_type, and set_sal().

Referenced by frapy_find_sal(), gdbpy_decode_line(), gdbpy_find_pc_line(), and recpy_bt_insn_sal().

## ◆ symtab_object_to_symtab()

struct symtab* symtab_object_to_symtab | ( | PyObject * | obj | ) |

Definition at line 462 of file py-symtab.c.

References symtab_object_type.

Referenced by ltpy_is_valid(), ltpy_iter_is_valid(), and stpy_is_valid().

## ◆ symtab_to_linetable_object()

PyObject* symtab_to_linetable_object | ( | PyObject * | symtab | ) |

Definition at line 86 of file py-linetable.c.

References linetable_object_type, and linetable_object::symtab.

Referenced by stpy_get_linetable().

## ◆ symtab_to_symtab_object()

PyObject* symtab_to_symtab_object | ( | struct symtab * | symtab | ) |

Definition at line 424 of file py-symtab.c.

References set_symtab(), and symtab_object_type.

Referenced by set_sal(), and sympy_get_symtab().

## ◆ type_object_to_type()

struct type* type_object_to_type | ( | PyObject * | obj | ) |

Definition at line 1332 of file py-type.c.

References type_object_type.

Referenced by bpfinishpy_pre_stop_hook(), gdbpy_get_xmethod_arg_types(), gdbpy_get_xmethod_result_type(), gdbpy_invoke_xmethod(), get_field_type(), stpy_convert_to_value(), stpy_lazy_string_elt_type(), typy_richcompare(), typy_str(), valpy_do_cast(), and value_has_field().

## ◆ type_to_type_object()

PyObject* type_to_type_object | ( | struct type * |  | ) |

Definition at line 1320 of file py-type.c.

References set_type(), and type_object_type.

Referenced by bpfinishpy_init(), convert_field(), gdbpy_apply_type_printers(), gdbpy_create_lazy_string_object(), gdbpy_get_matching_xmethod_workers(), gdbpy_lookup_type(), sympy_get_type(), typy_array_1(), typy_const(), typy_fields_items(), typy_legacy_template_argument(), typy_pointer(), typy_reference(), typy_strip_typedefs(), typy_target(), typy_template_argument(), typy_unqualified(), typy_volatile(), valpy_get_dynamic_type(), and valpy_get_type().

## ◆ unicode_to_target_string()

gdb::unique_xmalloc_ptr<char> unicode_to_target_string | ( | PyObject * | unicode_str | ) |

Definition at line 103 of file py-utils.c.

References python_gdbarch, target_charset(), and unicode_to_encoded_string().

Referenced by python_string_to_target_string().

## ◆ value_object_to_value()

struct value* value_object_to_value | ( | PyObject * | self | ) |

Definition at line 1600 of file py-value.c.

References value_object::value, and value_object_type.

Referenced by bpfinishpy_pre_stop_hook(), gdbpy_default_visualizer(), get_addr_from_python(), infpy_thread_from_thread_handle(), pyuw_sniffer(), pyuw_value_obj_to_pointer(), unwind_infopy_add_saved_register(), and unwind_infopy_str().

## ◆ value_to_value_object()

PyObject* value_to_value_object | ( | struct value * | v | ) |

Definition at line 1579 of file py-value.c.

References value_object::address, value_object::dynamic_type, note_value(), release_value_or_incref(), value_object::type, value_object::value, and value_object_type.

Referenced by bpfinishpy_init(), bpfinishpy_pre_stop_hook(), convert_values_to_python(), frapy_read_register(), frapy_read_var(), gdbpy_apply_val_pretty_printer(), gdbpy_get_varobj_pretty_printer(), gdbpy_get_xmethod_result_type(), gdbpy_history(), gdbpy_invoke_xmethod(), gdbpy_parse_and_eval(), instantiate_pretty_printer(), pending_framepy_read_register(), stpy_convert_to_value(), sympy_value(), typy_optimized_out(), typy_template_argument(), valpy_binop_throw(), valpy_call(), valpy_const_value(), valpy_dereference(), valpy_do_cast(), valpy_get_address(), valpy_getitem(), valpy_invert(), valpy_negative(), valpy_positive(), valpy_reference_value(), and valpy_referenced_value().

## Variable Documentation

## ◆ bppy_pending_object

gdbpy_breakpoint_object* bppy_pending_object

Definition at line 42 of file py-breakpoint.c.

Referenced by bpfinishpy_init(), bppy_init(), and gdbpy_breakpoint_created().

## ◆ gdb_module

PyObject* gdb_module

Definition at line 116 of file python.c.

Referenced by do_start_initialization(), gdbpy_initialize_arch(), gdbpy_initialize_blocks(), gdbpy_initialize_breakpoints(), gdbpy_initialize_commands(), gdbpy_initialize_event_generic(), gdbpy_initialize_eventregistry(), gdbpy_initialize_finishbreakpoints(), gdbpy_initialize_frames(), gdbpy_initialize_functions(), gdbpy_initialize_inferior(), gdbpy_initialize_linetable(), gdbpy_initialize_objfile(), gdbpy_initialize_parameters(), gdbpy_initialize_pspace(), gdbpy_initialize_py_events(), gdbpy_initialize_symbols(), gdbpy_initialize_symtabs(), gdbpy_initialize_thread(), gdbpy_initialize_types(), gdbpy_initialize_unwind(), and gdbpy_initialize_values().

## ◆ gdb_python_initialized

int gdb_python_initialized

Definition at line 108 of file python.c.

Referenced by add_thread_object(), delete_thread_object(), do_start_initialization(), dynamic_varobj_has_child_method(), gdbpy_apply_frame_filter(), gdbpy_apply_type_printers(), gdbpy_apply_val_pretty_printer(), gdbpy_before_prompt_hook(), gdbpy_enter::gdbpy_enter(), gdbpy_execute_objfile_script(), gdbpy_free_type_printers(), gdbpy_initialized(), gdbpy_source_objfile_script(), gdbpy_start_type_printers(), install_new_value_visualizer(), py_free_inferior(), py_varobj_iter_next(), python_inferior_deleted(), python_inferior_exit(), python_new_inferior(), python_new_objfile(), python_on_normal_stop(), python_on_resume(), save_objfile_types(), varobj_get_display_hint(), varobj_set_visualizer(), and varobj_value_get_print_value().

## ◆ gdb_python_module

PyObject* gdb_python_module

Definition at line 117 of file python.c.

Referenced by do_finish_initialization(), find_pretty_printer_from_gdb(), gdbpy_before_prompt_hook(), gdbpy_get_matching_xmethod_workers(), and pyuw_sniffer().

## ◆ gdbpy_children_cst

PyObject* gdbpy_children_cst

Definition at line 121 of file python.c.

Referenced by do_start_initialization(), dynamic_varobj_has_child_method(), print_children(), and py_varobj_get_iterator().

## ◆ gdbpy_display_hint_cst

PyObject* gdbpy_display_hint_cst

Definition at line 122 of file python.c.

Referenced by do_start_initialization(), and gdbpy_get_display_hint().

## ◆ gdbpy_doc_cst

PyObject* gdbpy_doc_cst

Definition at line 123 of file python.c.

Referenced by cmdpy_init(), do_start_initialization(), and parmpy_init().

## ◆ gdbpy_enabled_cst

PyObject* gdbpy_enabled_cst

Definition at line 124 of file python.c.

Referenced by do_start_initialization(), and search_pp_list().

## ◆ gdbpy_gdb_error

PyObject* gdbpy_gdb_error

Definition at line 131 of file python.c.

Referenced by btrace_func_from_recpy_func(), btrace_insn_from_recpy_insn(), do_start_initialization(), gdbpy_convert_exception(), and recpy_bt_goto().

## ◆ gdbpy_gdb_memory_error

PyObject* gdbpy_gdb_memory_error

Definition at line 134 of file python.c.

Referenced by do_start_initialization(), gdbpy_convert_exception(), gdbpy_create_lazy_string_object(), print_stack_unless_memory_error(), py_varobj_iter_next(), and stpy_convert_to_value().

## ◆ gdbpy_gdberror_exc

PyObject* gdbpy_gdberror_exc

Definition at line 128 of file python.c.

Referenced by cmdpy_function(), do_start_initialization(), and fnpy_call().

## ◆ gdbpy_to_string_cst

PyObject* gdbpy_to_string_cst

Definition at line 120 of file python.c.

Referenced by do_start_initialization(), pretty_print_one_value(), and varobj_value_get_print_value().

## ◆ gdbpy_value_cst

PyObject* gdbpy_value_cst

Definition at line 125 of file python.c.

Referenced by convert_value_from_python(), and do_start_initialization().

## ◆ python_gdbarch

struct gdbarch* python_gdbarch

Definition at line 203 of file python.c.

Referenced by add_thread_object(), bpfinishpy_init(), bppy_init(), delete_thread_object(), finalize_python(), gdbpy_enter::gdbpy_enter(), gdbpy_invoke_xmethod(), gdbpy_target_charset(), gdbpy_target_wide_charset(), mbpy_str(), py_free_inferior(), python_inferior_deleted(), python_new_inferior(), typy_lookup_typename(), unicode_to_target_python_string(), unicode_to_target_string(), and gdbpy_enter::~gdbpy_enter().

## ◆ python_language

const struct language_defn* python_language

Definition at line 204 of file python.c.

Referenced by add_thread_object(), delete_thread_object(), extract_sym(), finalize_python(), gdbpy_decode_line(), gdbpy_enter::gdbpy_enter(), gdbpy_invoke_xmethod(), py_free_inferior(), python_inferior_deleted(), python_new_inferior(), typy_lookup_typename(), valpy_str(), and gdbpy_enter::~gdbpy_enter().

## ◆ set_python_list

struct cmd_list_element* set_python_list

## ◆ show_python_list

struct cmd_list_element* show_python_list