GDB (xrefs)
Loading...
Searching...
No Matches
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 "py-ref.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_initialize_file
 
class  gdbpy_err_fetch
 
class  gdbpy_enter
 
class  gdbpy_enter_varobj
 
class  gdbpy_allow_threads
 
struct  Py_buffer_deleter
 

Macros

#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG)
 
#define CPYCHECKER_SETS_EXCEPTION
 
#define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
 
#define PY_SSIZE_T_CLEAN
 
#define Py_TPFLAGS_CHECKTYPES   0
 
#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_as_ulongest   PyLong_AsUnsignedLong
 
#define gdb_py_long_as_long_and_overflow   PyLong_AsLongAndOverflow
 
#define PyMem_RawMalloc   PyMem_Malloc
 
#define PyObject_CallMethod   gdb_PyObject_CallMethod
 
#define PyErr_NewException   gdb_PyErr_NewException
 
#define PySys_GetObject   gdb_PySys_GetObject
 
#define GDB_PYSYS_SETPATH_CHAR   wchar_t
 
#define PySys_SetPath   gdb_PySys_SetPath
 
#define BPPY_REQUIRE_VALID(Breakpoint)
 
#define BPPY_SET_REQUIRE_VALID(Breakpoint)
 
#define GDBPY_INITIALIZE_FILE(INIT, ...)
 
#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 std::unique_ptr< Py_buffer, Py_buffer_deleterPy_buffer_up
 

Enumerations

enum  gdbpy_iter_kind { iter_keys , iter_values , iter_items }
 

Functions

template<typename... Args>
static PyObjectgdb_PyObject_CallMethod (PyObject *o, const char *method, const char *format, Args... args)
 
static PyObjectgdb_PyErr_NewException (const char *name, PyObject *base, PyObject *dict)
 
static PyObjectgdb_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")
 
bool gdbpy_breakpoint_init_breakpoint_type ()
 
bool gdbpy_auto_load_enabled (const struct extension_language_defn *)
 
enum ext_lang_rc gdbpy_apply_val_pretty_printer (const struct extension_language_defn *, struct value *value, struct ui_file *stream, int recurse, 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 *, frame_info_ptr frame, frame_filter_flags 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)
 
enum ext_lang_rc gdbpy_get_matching_xmethod_workers (const struct extension_language_defn *extlang, struct type *obj_type, const char *method_name, std::vector< xmethod_worker_up > *dm_vec)
 
PyObjectgdbpy_history (PyObject *self, PyObject *args)
 
PyObjectgdbpy_add_history (PyObject *self, PyObject *args)
 
PyObjectgdbpy_history_count (PyObject *self, PyObject *args)
 
PyObjectgdbpy_convenience_variable (PyObject *self, PyObject *args)
 
PyObjectgdbpy_set_convenience_variable (PyObject *self, PyObject *args)
 
PyObjectgdbpy_breakpoints (PyObject *, PyObject *)
 
PyObjectgdbpy_frame_stop_reason_string (PyObject *, PyObject *)
 
PyObjectgdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw)
 
PyObjectgdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw)
 
PyObjectgdbpy_lookup_static_symbol (PyObject *self, PyObject *args, PyObject *kw)
 
PyObjectgdbpy_lookup_static_symbols (PyObject *self, PyObject *args, PyObject *kw)
 
PyObjectgdbpy_start_recording (PyObject *self, PyObject *args)
 
PyObjectgdbpy_current_recording (PyObject *self, PyObject *args)
 
PyObjectgdbpy_stop_recording (PyObject *self, PyObject *args)
 
PyObjectgdbpy_newest_frame (PyObject *self, PyObject *args)
 
PyObjectgdbpy_selected_frame (PyObject *self, PyObject *args)
 
PyObjectgdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw)
 
int gdbpy_is_field (PyObject *obj)
 
PyObjectgdbpy_create_lazy_string_object (CORE_ADDR address, long length, const char *encoding, struct type *type)
 
PyObjectgdbpy_inferiors (PyObject *unused, PyObject *unused2)
 
PyObjectgdbpy_create_ptid_object (ptid_t ptid)
 
PyObjectgdbpy_selected_thread (PyObject *self, PyObject *args)
 
PyObjectgdbpy_selected_inferior (PyObject *self, PyObject *args)
 
PyObjectgdbpy_string_to_argv (PyObject *self, PyObject *args)
 
PyObjectgdbpy_parameter_value (const setting &var)
 
gdb::unique_xmalloc_ptr< char > gdbpy_parse_command_name (const char *name, struct cmd_list_element ***base_list, struct cmd_list_element **start_list)
 
PyObjectgdbpy_register_tui_window (PyObject *self, PyObject *args, PyObject *kw)
 
PyObjectsymtab_and_line_to_sal_object (struct symtab_and_line sal)
 
PyObjectsymtab_to_symtab_object (struct symtab *symtab)
 
PyObjectsymbol_to_symbol_object (struct symbol *sym)
 
PyObjectblock_to_block_object (const struct block *block, struct objfile *objfile)
 
PyObjectvalue_to_value_object (struct value *v)
 
PyObjecttype_to_type_object (struct type *)
 
PyObjectframe_info_to_frame_object (frame_info_ptr frame)
 
PyObjectsymtab_to_linetable_object (PyObject *symtab)
 
gdbpy_ref pspace_to_pspace_object (struct program_space *)
 
PyObjectpspy_get_printers (PyObject *, void *)
 
PyObjectpspy_get_frame_filters (PyObject *, void *)
 
PyObjectpspy_get_frame_unwinders (PyObject *, void *)
 
PyObjectpspy_get_xmethods (PyObject *, void *)
 
gdbpy_ref objfile_to_objfile_object (struct objfile *)
 
PyObjectobjfpy_get_printers (PyObject *, void *)
 
PyObjectobjfpy_get_frame_filters (PyObject *, void *)
 
PyObjectobjfpy_get_frame_unwinders (PyObject *, void *)
 
PyObjectobjfpy_get_xmethods (PyObject *, void *)
 
PyObjectgdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw)
 
PyObjectgdbarch_to_arch_object (struct gdbarch *gdbarch)
 
PyObjectgdbpy_all_architecture_names (PyObject *self, PyObject *args)
 
PyObjectgdbpy_new_register_descriptor_iterator (struct gdbarch *gdbarch, const char *group_name)
 
PyObjectgdbpy_new_reggroup_iterator (struct gdbarch *gdbarch)
 
gdbpy_ref< thread_objectcreate_thread_object (struct thread_info *tp)
 
gdbpy_ref thread_to_thread_object (thread_info *thr)
 
gdbpy_ref< inferior_objectinferior_to_inferior_object (inferior *inf)
 
PyObjectgdbpy_buffer_to_membuf (gdb::unique_xmalloc_ptr< gdb_byte > buffer, CORE_ADDR address, ULONGEST length)
 
gdbpy_ref target_to_connection_object (process_stratum_target *target)
 
PyObjectgdbpy_connections (PyObject *self, PyObject *args)
 
const struct blockblock_object_to_block (PyObject *obj)
 
struct symbolsymbol_object_to_symbol (PyObject *obj)
 
struct valuevalue_object_to_value (PyObject *self)
 
struct valueconvert_value_from_python (PyObject *obj)
 
struct typetype_object_to_type (PyObject *obj)
 
struct symtabsymtab_object_to_symtab (PyObject *obj)
 
struct symtab_and_linesal_object_to_symtab_and_line (PyObject *obj)
 
frame_info_ptr frame_object_to_frame_info (PyObject *frame_obj)
 
struct gdbarcharch_object_to_gdbarch (PyObject *obj)
 
PyObjectgdbpy_execute_mi_command (PyObject *self, PyObject *args, PyObject *kw)
 
struct program_spaceprogspace_object_to_program_space (PyObject *obj)
 
PyMODINIT_FUNC gdbpy_events_mod_func ()
 
int gdbpy_print_python_errors_p (void)
 
void gdbpy_print_stack (void)
 
void gdbpy_print_stack_or_quit ()
 
void gdbpy_handle_exception () ATTRIBUTE_NORETURN
 
void gdbpy_error (const char *fmt,...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(1
 
void gdbpy_ref 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)
 
gdbpy_ref python_string_to_target_python_string (PyObject *obj)
 
gdb::unique_xmalloc_ptr< char > python_string_to_host_string (PyObject *obj)
 
gdbpy_ref 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)
 
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)
 
gdbpy_ref apply_varobj_pretty_printer (PyObject *print_obj, struct value **replacement, struct ui_file *stream, const value_print_options *opts)
 
gdbpy_ref gdbpy_get_varobj_pretty_printer (struct value *value)
 
gdb::unique_xmalloc_ptr< char > gdbpy_get_display_hint (PyObject *printer)
 
PyObjectgdbpy_default_visualizer (PyObject *self, PyObject *args)
 
PyObjectgdbpy_print_options (PyObject *self, PyObject *args)
 
void gdbpy_get_print_options (value_print_options *opts)
 
void bpfinishpy_pre_stop_hook (struct gdbpy_breakpoint_object *bp_obj)
 
void bpfinishpy_post_stop_hook (struct gdbpy_breakpoint_object *bp_obj)
 
void bpfinishpy_pre_delete_hook (struct gdbpy_breakpoint_object *bp_obj)
 
void gdbpy_convert_exception (const struct gdb_exception &) CPYCHECKER_SETS_EXCEPTION
 
int get_addr_from_python (PyObject *obj, CORE_ADDR *addr) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
 
gdbpy_ref gdb_py_object_from_longest (LONGEST l)
 
gdbpy_ref gdb_py_object_from_ulongest (ULONGEST l)
 
int gdb_py_int_as_long (PyObject *, long *)
 
PyObjectgdb_py_generic_dict (PyObject *self, void *closure)
 
int gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
 
std::unique_ptr< varobj_iterpy_varobj_get_iterator (struct varobj *var, PyObject *printer, const value_print_options *opts)
 
bool gdbpy_parse_register_id (struct gdbarch *gdbarch, PyObject *pyo_reg_id, int *reg_num)
 
bool gdbpy_is_architecture (PyObject *obj)
 
bool gdbpy_is_progspace (PyObject *obj)
 
gdb::unique_xmalloc_ptr< char > gdbpy_fix_doc_string_indentation (gdb::unique_xmalloc_ptr< char > doc)
 
gdb::optional< int > gdbpy_print_insn (struct gdbarch *gdbarch, CORE_ADDR address, disassemble_info *info)
 

Variables

int gdb_python_initialized
 
PyObjectgdb_module
 
PyObjectgdb_python_module
 
gdbpy_breakpoint_objectbppy_pending_object
 
struct cmd_list_elementset_python_list
 
struct cmd_list_elementshow_python_list
 
const struct value_print_optionsgdbpy_current_print_options
 
PyObjectgdbpy_doc_cst
 
PyObjectgdbpy_children_cst
 
PyObjectgdbpy_to_string_cst
 
PyObjectgdbpy_display_hint_cst
 
PyObjectgdbpy_enabled_cst
 
PyObjectgdbpy_value_cst
 
PyObjectgdbpy_gdb_error
 
PyObjectgdbpy_gdb_memory_error
 
PyObjectgdbpy_gdberror_exc
 

Macro Definition Documentation

◆ BPPY_REQUIRE_VALID

#define BPPY_REQUIRE_VALID ( Breakpoint)

◆ 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)

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

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

◆ CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION

#define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION

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

◆ CPYCHECKER_SETS_EXCEPTION

#define CPYCHECKER_SETS_EXCEPTION

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

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF

#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( ARG)

Definition at line 38 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 759 of file python-internal.h.

Referenced by bppy_delete_breakpoint(), disasmpy_addr_part_str(), disasmpy_builtin_disassemble(), disasmpy_result_str(), frapy_arch(), frapy_block(), frapy_find_sal(), frapy_function(), frapy_is_valid(), frapy_language(), frapy_level(), frapy_name(), frapy_newer(), frapy_older(), frapy_pc(), frapy_read_register(), frapy_read_var(), frapy_select(), frapy_static_link(), frapy_type(), frapy_unwind_stop_reason(), gdbpy_add_history(), gdbpy_convenience_variable(), gdbpy_history(), gdbpy_lookup_global_symbol(), gdbpy_lookup_static_symbol(), gdbpy_lookup_static_symbols(), gdbpy_lookup_symbol(), gdbpy_newest_frame(), gdbpy_selected_frame(), gdbpy_set_convenience_variable(), gdbpy_stop_recording(), 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(), objfpy_lookup_global_symbol(), objfpy_lookup_static_symbol(), pending_framepy_block(), pending_framepy_find_sal(), pending_framepy_function(), pending_framepy_language(), pending_framepy_name(), pending_framepy_pc(), pending_framepy_read_register(), pending_framepy_repr(), pending_framepy_str(), pspy_block_for_pc(), pspy_find_pc_line(), recpy_bt_goto(), recpy_bt_insn_data(), recpy_bt_insn_sal(), stpy_convert_to_value(), stpy_str(), sympy_needs_frame(), sympy_value(), thpy_get_details(), thpy_switch(), thpy_thread_handle(), typy_array_1(), typy_const(), typy_fields_items(), typy_get_composite(), typy_is_array_like(), typy_is_string_like(), typy_legacy_template_argument(), typy_lookup_type(), typy_lookup_typename(), typy_pointer(), typy_reference(), typy_repr(), typy_richcompare(), typy_str(), typy_strip_typedefs(), typy_template_argument(), typy_unqualified(), typy_volatile(), unwind_infopy_str(), valpy_absolute(), valpy_assign(), valpy_binop(), valpy_call(), valpy_const_value(), valpy_dereference(), valpy_do_cast(), valpy_fetch_lazy(), valpy_float(), valpy_format_string(), valpy_get_dynamic_type(), valpy_get_is_lazy(), valpy_get_is_optimized_out(), valpy_getitem(), valpy_invert(), valpy_lazy_string(), valpy_long(), valpy_negative(), valpy_reference_value(), valpy_referenced_value(), valpy_richcompare(), valpy_str(), valpy_string(), and valpy_to_array().

◆ GDB_PY_LL_ARG

#define GDB_PY_LL_ARG   "L"

Definition at line 117 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 118 of file python-internal.h.

◆ gdb_py_long_as_long_and_overflow

#define gdb_py_long_as_long_and_overflow   PyLong_AsLongAndOverflow

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

Referenced by serialize_mi_result_1().

◆ gdb_py_long_as_ulongest

#define gdb_py_long_as_ulongest   PyLong_AsUnsignedLong

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

Referenced by get_addr_from_python().

◆ 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 770 of file python-internal.h.

Referenced by bpfinishpy_init(), bplocpy_set_enabled(), bppy_set_commands(), 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   wchar_t

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

Referenced by gdb_PySys_SetPath().

◆ GDBPY_INITIALIZE_FILE

#define GDBPY_INITIALIZE_FILE ( INIT,
... )
Value:
static gdbpy_initialize_file \
CONCAT(gdbpy_initialize_file_obj_, __LINE__) (INIT, ##__VA_ARGS__)

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

◆ PY_SSIZE_T_CLEAN

#define PY_SSIZE_T_CLEAN

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

◆ Py_TPFLAGS_CHECKTYPES

#define Py_TPFLAGS_CHECKTYPES   0

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

◆ PyErr_NewException

#define PyErr_NewException   gdb_PyErr_NewException

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

Referenced by gdb_PyErr_NewException().

◆ PyEval_InitThreads

#define PyEval_InitThreads ( )

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

◆ PyEval_ReleaseLock

#define PyEval_ReleaseLock ( )

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

◆ PyGILState_Ensure

#define PyGILState_Ensure ( )    ((PyGILState_STATE) 0)

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

◆ PyGILState_Release

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

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

◆ PyMem_RawMalloc

#define PyMem_RawMalloc   PyMem_Malloc

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

Referenced by gdbpy_readline_wrapper().

◆ PyObject_CallMethod

#define PyObject_CallMethod   gdb_PyObject_CallMethod

◆ PySys_GetObject

#define PySys_GetObject   gdb_PySys_GetObject

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

Referenced by gdb_PySys_GetObject().

◆ PySys_SetPath

#define PySys_SetPath   gdb_PySys_SetPath

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

Referenced by gdb_PySys_SetPath().

◆ PyThreadState_Swap

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

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

Typedef Documentation

◆ gdb_py_longest

typedef long gdb_py_longest

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

◆ gdb_py_ulongest

typedef unsigned long gdb_py_ulongest

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

◆ Py_buffer_up

typedef std::unique_ptr<Py_buffer, Py_buffer_deleter> Py_buffer_up

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

◆ Py_hash_t

typedef long Py_hash_t

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

Enumeration Type Documentation

◆ gdbpy_iter_kind

Enumerator
iter_keys 
iter_values 
iter_items 

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

Function Documentation

◆ apply_varobj_pretty_printer()

gdbpy_ref apply_varobj_pretty_printer ( PyObject * print_obj,
struct value ** replacement,
struct ui_file * stream,
const value_print_options * opts )

◆ arch_object_to_gdbarch()

struct gdbarch * arch_object_to_gdbarch ( PyObject * obj)

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

References arch_object::gdbarch, and gdbpy_is_architecture().

Referenced by archpy_repr().

◆ block_object_to_block()

const struct block * block_object_to_block ( PyObject * obj)

◆ block_to_block_object()

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

◆ bpfinishpy_post_stop_hook()

void bpfinishpy_post_stop_hook ( struct gdbpy_breakpoint_object * bp_obj)

◆ bpfinishpy_pre_delete_hook()

void bpfinishpy_pre_delete_hook ( struct gdbpy_breakpoint_object * bp_obj)

◆ bpfinishpy_pre_stop_hook()

void bpfinishpy_pre_stop_hook ( struct gdbpy_breakpoint_object * bp_obj)

◆ convert_value_from_python()

struct value * convert_value_from_python ( PyObject * obj)

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [1/7]

PyTypeObject block_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "block_object" )
extern

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [2/7]

PyTypeObject breakpoint_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "breakpoint_object" )
extern

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [3/7]

PyTypeObject event_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "event_object" )
extern

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [4/7]

PyTypeObject frame_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "frame_object" )
extern

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [5/7]

PyTypeObject symbol_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "symbol_object" )
extern

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [6/7]

PyTypeObject thread_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "thread_object" )
extern

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF() [7/7]

PyTypeObject value_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "value_object" )
extern

◆ create_thread_object()

gdbpy_ref< thread_object > create_thread_object ( struct thread_info * tp)

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

References thread_info::inf, inferior_to_inferior_object(), and thread_object_type.

Referenced by add_thread_object().

◆ frame_info_to_frame_object()

PyObject * frame_info_to_frame_object ( frame_info_ptr frame)

◆ frame_object_to_frame_info()

frame_info_ptr frame_object_to_frame_info ( PyObject * frame_obj)

◆ gdb_py_generic_dict()

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

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

◆ gdb_py_int_as_long()

int gdb_py_int_as_long ( PyObject * obj,
long * result )

◆ gdb_py_object_from_longest()

gdbpy_ref gdb_py_object_from_longest ( LONGEST l)

◆ gdb_py_object_from_ulongest()

gdbpy_ref gdb_py_object_from_ulongest ( ULONGEST l)

◆ gdb_PyArg_ParseTupleAndKeywords()

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

◆ gdb_PyErr_NewException()

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

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

References name, and PyErr_NewException.

◆ gdb_pymodule_addobject()

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

◆ gdb_PyObject_CallMethod()

template<typename... Args>
static PyObject * gdb_PyObject_CallMethod ( PyObject * o,
const char * method,
const char * format,
Args... args )
inlinestatic

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

References PyObject_CallMethod.

◆ gdb_PySys_GetObject()

static PyObject * gdb_PySys_GetObject ( const char * name)
inlinestatic

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

References name, and PySys_GetObject.

◆ gdb_PySys_SetPath()

static void gdb_PySys_SetPath ( const GDB_PYSYS_SETPATH_CHAR * path)
inlinestatic

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

References GDB_PYSYS_SETPATH_CHAR, and PySys_SetPath.

◆ gdbarch_to_arch_object()

PyObject * gdbarch_to_arch_object ( struct gdbarch * gdbarch)

◆ gdbpy_add_history()

PyObject * gdbpy_add_history ( PyObject * self,
PyObject * args )

◆ gdbpy_all_architecture_names()

PyObject * gdbpy_all_architecture_names ( PyObject * self,
PyObject * args )

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

References gdbarch_printable_names(), and name.

◆ gdbpy_apply_frame_filter()

enum ext_lang_bt_status gdbpy_apply_frame_filter ( const struct extension_language_defn * extlang,
frame_info_ptr frame,
frame_filter_flags flags,
enum ext_lang_frame_args args_type,
struct ui_out * out,
int frame_low,
int frame_high )
extern

◆ gdbpy_apply_val_pretty_printer()

enum ext_lang_rc gdbpy_apply_val_pretty_printer ( const struct extension_language_defn * extlang,
struct value * value,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
const struct language_defn * language )
extern

◆ gdbpy_auto_load_enabled()

bool gdbpy_auto_load_enabled ( const struct extension_language_defn * extlang)
extern

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

References auto_load_python_scripts.

◆ gdbpy_breakpoint_cond_says_stop()

enum ext_lang_bp_stop gdbpy_breakpoint_cond_says_stop ( const struct extension_language_defn * extlang,
struct breakpoint * b )
extern

◆ gdbpy_breakpoint_has_cond()

int gdbpy_breakpoint_has_cond ( const struct extension_language_defn * extlang,
struct breakpoint * b )
extern

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

References breakpoint::gdbarch, breakpoint::py_bp_object, and stop_func.

◆ gdbpy_breakpoint_init_breakpoint_type()

bool gdbpy_breakpoint_init_breakpoint_type ( )
extern

◆ gdbpy_breakpoints()

PyObject * gdbpy_breakpoints ( PyObject * self,
PyObject * args )

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

References all_breakpoints(), bp, bppy_live, and build_bp_list().

◆ gdbpy_buffer_to_membuf()

PyObject * gdbpy_buffer_to_membuf ( gdb::unique_xmalloc_ptr< gdb_byte > buffer,
CORE_ADDR address,
ULONGEST length )

Definition at line 44 of file py-membuf.c.

References membuf_object_type.

Referenced by disasmpy_info_read_memory(), and infpy_read_memory().

◆ gdbpy_connections()

PyObject * gdbpy_connections ( PyObject * self,
PyObject * args )

◆ gdbpy_convenience_variable()

PyObject * gdbpy_convenience_variable ( PyObject * self,
PyObject * args )

◆ gdbpy_convert_exception()

void gdbpy_convert_exception ( const struct gdb_exception & exception)
extern

◆ gdbpy_create_lazy_string_object()

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

◆ gdbpy_create_ptid_object()

PyObject * gdbpy_create_ptid_object ( ptid_t ptid)

◆ gdbpy_current_recording()

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

◆ gdbpy_default_visualizer()

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

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

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

◆ gdbpy_error()

void gdbpy_error ( const char * fmt,
... )

◆ gdbpy_events_mod_func()

PyMODINIT_FUNC gdbpy_events_mod_func ( )

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

References EventModuleDef, and gdb_py_events.

◆ gdbpy_execute_mi_command()

PyObject * gdbpy_execute_mi_command ( PyObject * self,
PyObject * args,
PyObject * kw )
extern

◆ 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 )

◆ gdbpy_fix_doc_string_indentation()

gdb::unique_xmalloc_ptr< char > gdbpy_fix_doc_string_indentation ( gdb::unique_xmalloc_ptr< char > doc)
extern

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

Referenced by cmdpy_init(), and get_doc_string().

◆ gdbpy_frame_stop_reason_string()

PyObject * gdbpy_frame_stop_reason_string ( PyObject * self,
PyObject * args )

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

References host_charset(), and unwind_stop_reason_to_string().

◆ gdbpy_get_display_hint()

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

◆ 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,
std::vector< xmethod_worker_up > * dm_vec )
extern

◆ gdbpy_get_print_options()

void gdbpy_get_print_options ( value_print_options * opts)

◆ gdbpy_get_varobj_pretty_printer()

gdbpy_ref gdbpy_get_varobj_pretty_printer ( struct value * value)

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

References find_pretty_printer(), and value_to_value_object().

◆ gdbpy_handle_exception()

void gdbpy_handle_exception ( )

◆ gdbpy_history()

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

◆ gdbpy_history_count()

PyObject * gdbpy_history_count ( PyObject * self,
PyObject * args )
extern

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

References gdb_py_object_from_ulongest(), and value_history_count().

◆ gdbpy_inferiors()

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

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

References all_inferiors(), and inferior_to_inferior_object().

◆ gdbpy_is_architecture()

bool gdbpy_is_architecture ( PyObject * obj)
extern

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

References arch_object_type.

Referenced by arch_object_to_gdbarch().

◆ gdbpy_is_field()

int gdbpy_is_field ( PyObject * obj)

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

References field_object_type.

Referenced by valpy_getitem().

◆ gdbpy_is_lazy_string()

int gdbpy_is_lazy_string ( PyObject * result)

◆ gdbpy_is_progspace()

bool gdbpy_is_progspace ( PyObject * obj)
extern

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

References pspace_object_type.

Referenced by progspace_object_to_program_space().

◆ gdbpy_is_string()

int gdbpy_is_string ( PyObject * obj)

◆ gdbpy_is_value_object()

int gdbpy_is_value_object ( PyObject * obj)

Definition at line 2122 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 )

◆ gdbpy_lookup_objfile()

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

◆ gdbpy_lookup_static_symbol()

PyObject * gdbpy_lookup_static_symbol ( PyObject * self,
PyObject * args,
PyObject * kw )

◆ gdbpy_lookup_static_symbols()

PyObject * gdbpy_lookup_static_symbols ( PyObject * self,
PyObject * args,
PyObject * kw )

◆ gdbpy_lookup_symbol()

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

◆ gdbpy_lookup_type()

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

◆ gdbpy_new_reggroup_iterator()

PyObject * gdbpy_new_reggroup_iterator ( struct gdbarch * gdbarch)

◆ gdbpy_new_register_descriptor_iterator()

PyObject * gdbpy_new_register_descriptor_iterator ( struct gdbarch * gdbarch,
const char * group_name )

◆ gdbpy_newest_frame()

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

◆ gdbpy_obj_to_string()

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

◆ gdbpy_parameter_value()

PyObject * gdbpy_parameter_value ( const setting & var)

Referenced by get_attr().

◆ gdbpy_parse_command_name()

gdb::unique_xmalloc_ptr< char > gdbpy_parse_command_name ( const char * name,
struct cmd_list_element *** base_list,
struct cmd_list_element ** start_list )

◆ gdbpy_parse_register_id()

bool gdbpy_parse_register_id ( struct gdbarch * gdbarch,
PyObject * pyo_reg_id,
int * reg_num )
extern

◆ gdbpy_preserve_values()

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

◆ gdbpy_print_insn()

gdb::optional< int > gdbpy_print_insn ( struct gdbarch * gdbarch,
CORE_ADDR address,
disassemble_info * info )
extern

◆ gdbpy_print_options()

PyObject * gdbpy_print_options ( PyObject * self,
PyObject * args )

◆ gdbpy_print_python_errors_p()

int gdbpy_print_python_errors_p ( void )

Referenced by print_children().

◆ gdbpy_print_stack()

void gdbpy_print_stack ( void )

◆ gdbpy_print_stack_or_quit()

void gdbpy_print_stack_or_quit ( )

◆ gdbpy_register_tui_window()

PyObject * gdbpy_register_tui_window ( PyObject * self,
PyObject * args,
PyObject * kw )

◆ gdbpy_selected_frame()

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

◆ gdbpy_selected_inferior()

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

Definition at line 990 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 356 of file py-infthread.c.

References inferior_ptid, inferior_thread(), and thread_to_thread_object().

◆ gdbpy_set_convenience_variable()

PyObject * gdbpy_set_convenience_variable ( PyObject * self,
PyObject * args )

◆ gdbpy_start_recording()

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

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

References gdbpy_convert_exception(), gdbpy_current_recording(), and record_start().

◆ gdbpy_stop_recording()

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

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

References GDB_PY_HANDLE_EXCEPTION, and record_stop().

◆ gdbpy_string_to_argv()

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

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

◆ get_addr_from_python()

int get_addr_from_python ( PyObject * obj,
CORE_ADDR * addr )

◆ host_string_to_python_string()

gdbpy_ref host_string_to_python_string ( const char * str)

◆ inferior_to_inferior_object()

gdbpy_ref< inferior_object > inferior_to_inferior_object ( inferior * inf)

◆ objfile_to_objfile_object()

gdbpy_ref objfile_to_objfile_object ( struct objfile * objfile)

◆ objfpy_get_frame_filters()

PyObject * objfpy_get_frame_filters ( PyObject * o,
void * ignore )

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

References objfile_object::frame_filters.

◆ objfpy_get_frame_unwinders()

PyObject * objfpy_get_frame_unwinders ( PyObject * o,
void * ignore )

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

References objfile_object::frame_unwinders.

◆ objfpy_get_printers()

PyObject * objfpy_get_printers ( PyObject * o,
void * ignore )

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

References objfile_object::printers.

Referenced by find_pretty_printer_from_objfiles().

◆ objfpy_get_xmethods()

PyObject * objfpy_get_xmethods ( PyObject * o,
void * ignore )

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

References objfile_object::xmethods.

Referenced by gdbpy_get_matching_xmethod_workers().

◆ progspace_object_to_program_space()

struct program_space * progspace_object_to_program_space ( PyObject * obj)
extern

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

References gdbpy_is_progspace().

◆ pspace_to_pspace_object()

gdbpy_ref pspace_to_pspace_object ( struct program_space * pspace)

◆ pspy_get_frame_filters()

PyObject * pspy_get_frame_filters ( PyObject * o,
void * ignore )

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

References pspace_object::frame_filters.

◆ pspy_get_frame_unwinders()

PyObject * pspy_get_frame_unwinders ( PyObject * o,
void * ignore )

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

References pspace_object::frame_unwinders.

◆ pspy_get_printers()

PyObject * pspy_get_printers ( PyObject * o,
void * ignore )

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

References pspace_object::printers.

Referenced by find_pretty_printer_from_progspace().

◆ pspy_get_xmethods()

PyObject * pspy_get_xmethods ( PyObject * o,
void * ignore )

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

References pspace_object::xmethods.

Referenced by gdbpy_get_matching_xmethod_workers().

◆ py_varobj_get_iterator()

std::unique_ptr< varobj_iter > py_varobj_get_iterator ( struct varobj * var,
PyObject * printer,
const value_print_options * opts )

◆ python_string_to_host_string()

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

◆ python_string_to_target_python_string()

gdbpy_ref python_string_to_target_python_string ( PyObject * obj)

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

References 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)

◆ python_string_to_unicode()

void gdbpy_ref python_string_to_unicode ( PyObject * obj)

◆ sal_object_to_symtab_and_line()

struct symtab_and_line * sal_object_to_symtab_and_line ( PyObject * obj)

Definition at line 496 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)

◆ symbol_to_symbol_object()

PyObject * symbol_to_symbol_object ( struct symbol * sym)

◆ symtab_and_line_to_sal_object()

PyObject * symtab_and_line_to_sal_object ( struct symtab_and_line sal)

◆ symtab_object_to_symtab()

struct symtab * symtab_object_to_symtab ( PyObject * obj)

◆ symtab_to_linetable_object()

PyObject * symtab_to_linetable_object ( PyObject * symtab)

Definition at line 85 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 467 of file py-symtab.c.

References set_symtab(), and symtab_object_type.

Referenced by set_sal(), and sympy_get_symtab().

◆ target_to_connection_object()

gdbpy_ref target_to_connection_object ( process_stratum_target * target)

◆ thread_to_thread_object()

gdbpy_ref thread_to_thread_object ( thread_info * thr)

◆ type_object_to_type()

struct type * type_object_to_type ( PyObject * obj)

◆ type_to_type_object()

PyObject * type_to_type_object ( struct type * type)

◆ unicode_to_target_string()

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

◆ value_object_to_value()

struct value * value_object_to_value ( PyObject * self)

◆ value_to_value_object()

PyObject * value_to_value_object ( struct value * v)

Variable Documentation

◆ bppy_pending_object

gdbpy_breakpoint_object* bppy_pending_object
extern

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

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

◆ gdb_module

PyObject* gdb_module
extern

◆ gdb_python_initialized

int gdb_python_initialized
extern

◆ gdb_python_module

PyObject* gdb_python_module
extern

◆ gdbpy_children_cst

PyObject* gdbpy_children_cst
extern

◆ gdbpy_current_print_options

const struct value_print_options* gdbpy_current_print_options
extern

◆ gdbpy_display_hint_cst

PyObject* gdbpy_display_hint_cst
extern

Referenced by gdbpy_get_display_hint().

◆ gdbpy_doc_cst

PyObject* gdbpy_doc_cst
extern

Referenced by cmdpy_init(), and get_doc_string().

◆ gdbpy_enabled_cst

PyObject* gdbpy_enabled_cst
extern

Referenced by search_pp_list().

◆ gdbpy_gdb_error

PyObject* gdbpy_gdb_error
extern

◆ gdbpy_gdb_memory_error

PyObject* gdbpy_gdb_memory_error
extern

◆ gdbpy_gdberror_exc

PyObject* gdbpy_gdberror_exc
extern

◆ gdbpy_to_string_cst

PyObject* gdbpy_to_string_cst
extern

◆ gdbpy_value_cst

PyObject* gdbpy_value_cst
extern

◆ set_python_list

struct cmd_list_element* set_python_list
extern

◆ show_python_list

struct cmd_list_element* show_python_list
extern