GDB (xrefs)

Classes | Functions | Variables
py-progspace.c File Reference
`#include "defs.h"`
`#include "python-internal.h"`
`#include "charset.h"`
`#include "progspace.h"`
`#include "objfiles.h"`
`#include "language.h"`
`#include "arch-utils.h"`
`#include "py-ref.h"`

Go to the source code of this file.

## Classes
struct | pspace_object

## Functions
PyTypeObject pspace_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("pspace_object")
static PyObject * | pspy_get_filename (PyObject *self, void *closure)
static void | pspy_dealloc (PyObject *self)
static int | pspy_initialize (pspace_object *self)
static PyObject * | pspy_new (PyTypeObject *type, PyObject *args, PyObject *keywords)
PyObject * | pspy_get_printers (PyObject *o, void *ignore)
static int | pspy_set_printers (PyObject *o, PyObject *value, void *ignore)
PyObject * | pspy_get_frame_filters (PyObject *o, void *ignore)
static int | pspy_set_frame_filters (PyObject *o, PyObject *frame, void *ignore)
PyObject * | pspy_get_frame_unwinders (PyObject *o, void *ignore)
static int | pspy_set_frame_unwinders (PyObject *o, PyObject *unwinders, void *ignore)
static PyObject * | pspy_get_type_printers (PyObject *o, void *ignore)
PyObject * | pspy_get_xmethods (PyObject *o, void *ignore)
static int | pspy_set_type_printers (PyObject *o, PyObject *value, void *ignore)
static void | py_free_pspace (struct program_space *pspace, void *datum)
PyObject * | pspace_to_pspace_object (struct program_space *pspace)
int | gdbpy_initialize_pspace (void)

## Variables
static const struct program_space_data * | pspy_pspace_data_key
static gdb_PyGetSetDef | pspace_getset []
PyTypeObject | pspace_object_type

## Function Documentation

## ◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF()

PyTypeObject pspace_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "pspace_object" |  | ) |

## ◆ 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().

## ◆ pspace_to_pspace_object()

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

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_dealloc()

static void pspy_dealloc | ( | PyObject * | self | ) |
| static

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

References pspace_object::dict, pspace_object::frame_filters, pspace_object::frame_unwinders, pspace_object::printers, Py_TYPE, pspace_object::type_printers, and pspace_object::xmethods.

## ◆ pspy_get_filename()

static PyObject* pspy_get_filename | ( | PyObject * | self,
|  | void * | closure
| ) |  |
| static

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

References host_string_to_python_string(), objfile_name(), pspace_object::pspace, and program_space::symfile_object_file.

## ◆ pspy_get_frame_filters()

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

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

## ◆ pspy_get_frame_unwinders()

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

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

## ◆ pspy_get_printers()

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

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

Referenced by find_pretty_printer_from_progspace().

## ◆ pspy_get_type_printers()

static PyObject* pspy_get_type_printers | ( | PyObject * | o,
|  | void * | ignore
| ) |  |
| static

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

## ◆ pspy_get_xmethods()

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

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

Referenced by gdbpy_get_matching_xmethod_workers().

## ◆ pspy_initialize()

static int pspy_initialize | ( | pspace_object * | self | ) |
| static

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

Referenced by pspace_to_pspace_object(), and pspy_new().

## ◆ pspy_new()

static PyObject* pspy_new | ( | PyTypeObject * | type,
|  | PyObject * | args,
|  | PyObject * | keywords
| ) |  |
| static

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

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

## ◆ pspy_set_frame_filters()

static int pspy_set_frame_filters | ( | PyObject * | o,
|  | PyObject * | frame,
|  | void * | ignore
| ) |  |
| static

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

## ◆ pspy_set_frame_unwinders()

static int pspy_set_frame_unwinders | ( | PyObject * | o,
|  | PyObject * | unwinders,
|  | void * | ignore
| ) |  |
| static

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

## ◆ pspy_set_printers()

static int pspy_set_printers | ( | PyObject * | o,
|  | PyObject * | value,
|  | void * | ignore
| ) |  |
| static

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

## ◆ pspy_set_type_printers()

static int pspy_set_type_printers | ( | PyObject * | o,
|  | PyObject * | value,
|  | void * | ignore
| ) |  |
| static

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

## ◆ py_free_pspace()

static void py_free_pspace | ( | struct program_space * | pspace,
|  | void * | datum
| ) |  |
| static

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

References current_language, and target_gdbarch().

Referenced by gdbpy_initialize_pspace().

## Variable Documentation

## ◆ pspace_getset

gdb_PyGetSetDef pspace_getset[]
| static

Initial value:
=
{
{ "__dict__", gdb_py_generic_dict, NULL,
"The __dict__ for this progspace.", &pspace_object_type },
{ "filename", pspy_get_filename, NULL,
"The progspace's main filename, or None.", NULL },
{ "pretty_printers", pspy_get_printers, pspy_set_printers,
"Pretty printers.", NULL },
{ "frame_filters", pspy_get_frame_filters, pspy_set_frame_filters,
"Frame filters.", NULL },
{ "frame_unwinders", pspy_get_frame_unwinders, pspy_set_frame_unwinders,
"Frame unwinders.", NULL },
{ "type_printers", pspy_get_type_printers, pspy_set_type_printers,
"Type printers.", NULL },
{ "xmethods", pspy_get_xmethods, NULL,
"Debug methods.", NULL },
{ NULL }
}
gdb_py_generic_dict
PyObject * gdb_py_generic_dict(PyObject *self, void *closure)
Definition: py-utils.c:359
pspy_set_printers
static int pspy_set_printers(PyObject *o, PyObject *value, void *ignore)
Definition: py-progspace.c:153
pspy_set_type_printers
static int pspy_set_type_printers(PyObject *o, PyObject *value, void *ignore)
Definition: py-progspace.c:289
pspy_get_frame_filters
PyObject * pspy_get_frame_filters(PyObject *o, void *ignore)
Definition: py-progspace.c:184
pspy_get_xmethods
PyObject * pspy_get_xmethods(PyObject *o, void *ignore)
Definition: py-progspace.c:278
pspy_set_frame_filters
static int pspy_set_frame_filters(PyObject *o, PyObject *frame, void *ignore)
Definition: py-progspace.c:194
pspace_object_type
PyTypeObject pspace_object_type
Definition: py-progspace.c:400
pspy_set_frame_unwinders
static int pspy_set_frame_unwinders(PyObject *o, PyObject *unwinders, void *ignore)
Definition: py-progspace.c:236
pspy_get_filename
static PyObject * pspy_get_filename(PyObject *self, void *closure)
Definition: py-progspace.c:66
pspy_get_frame_unwinders
PyObject * pspy_get_frame_unwinders(PyObject *o, void *ignore)
Definition: py-progspace.c:225
pspy_get_type_printers
static PyObject * pspy_get_type_printers(PyObject *o, void *ignore)
Definition: py-progspace.c:267
pspy_get_printers
PyObject * pspy_get_printers(PyObject *o, void *ignore)
Definition: py-progspace.c:144

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

## ◆ pspace_object_type

PyTypeObject pspace_object_type

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

Referenced by gdbpy_initialize_pspace(), and pspace_to_pspace_object().

## ◆ pspy_pspace_data_key

const struct program_space_data* pspy_pspace_data_key
| static

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

Referenced by gdbpy_initialize_pspace(), and pspace_to_pspace_object().