GDB (xrefs)

Classes | Macros | Enumerations | Functions
py-event.h File Reference
`#include "py-events.h"`
`#include "command.h"`
`#include "python-internal.h"`
`#include "inferior.h"`
`#include "py-ref.h"`
`#include "py-event-types.def"`

Go to the source code of this file.

## Classes
struct | event_object

## Macros
#define | GDB_PY_DEFINE_EVENT_TYPE(name, py_name, doc, base)

## Enumerations
enum | inferior_call_kind { INFERIOR_CALL_PRE, INFERIOR_CALL_POST }

## Functions
int | emit_continue_event (ptid_t ptid)
int | emit_exited_event (const LONGEST *exit_code, struct inferior *inf)
int | emit_inferior_call_event (inferior_call_kind kind, ptid_t thread, CORE_ADDR addr)
int | emit_register_changed_event (struct frame_info *frame, int regnum)
int | emit_memory_changed_event (CORE_ADDR addr, ssize_t len)
int | evpy_emit_event (PyObject *event, eventregistry_object *registry)
gdbpy_ref | create_event_object (PyTypeObject *py_type)
gdbpy_ref | create_thread_event_object (PyTypeObject *py_type, PyObject *thread=nullptr)
int | emit_new_objfile_event (struct objfile *objfile)
int | emit_clear_objfiles_event (void)
void | evpy_dealloc (PyObject *self)
int | evpy_add_attribute (PyObject *event, const char *name, PyObject *attr) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
int | gdbpy_initialize_event_generic (PyTypeObject *type, const char *name) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION

## Macro Definition Documentation

## ◆ GDB_PY_DEFINE_EVENT_TYPE

#define GDB_PY_DEFINE_EVENT_TYPE | ( |  | name,
|  |  | py_name,
|  |  | doc,
|  |  | base
| ) |  |

Value:
extern PyTypeObject name##_event_object_type \
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
name
const char *const name
Definition: aarch64-tdep.c:76
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF
#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG)
Definition: python-internal.h:43

Definition at line 30 of file py-event.h.

## Enumeration Type Documentation

## ◆ inferior_call_kind

enum inferior_call_kind

Enumerator
INFERIOR_CALL_PRE |
INFERIOR_CALL_POST |

Definition at line 49 of file py-event.h.

## Function Documentation

## ◆ create_event_object()

gdbpy_ref create_event_object | ( | PyTypeObject * | py_type | ) |

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

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

Referenced by create_clear_objfiles_event_object(), create_exited_event_object(), create_inferior_call_event_object(), create_memory_changed_event_object(), create_new_objfile_event_object(), create_register_changed_event_object(), create_thread_event_object(), python_inferior_deleted(), and python_new_inferior().

## ◆ create_thread_event_object()

gdbpy_ref create_thread_event_object | ( | PyTypeObject * | py_type,
|  | PyObject * | thread = `nullptr`
| ) |  |

Definition at line 51 of file py-threadevent.c.

References create_event_object(), evpy_add_attribute(), gdb::ref_ptr< T, Policy >::get(), and get_event_thread().

Referenced by add_thread_object(), create_continue_event_object(), and create_stop_event_object().

## ◆ emit_clear_objfiles_event()

int emit_clear_objfiles_event | ( | void |  | ) |

Definition at line 90 of file py-newobjfileevent.c.

References create_clear_objfiles_event_object(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, and gdb::ref_ptr< T, Policy >::get().

Referenced by python_new_objfile().

## ◆ emit_continue_event()

int emit_continue_event | ( | ptid_t | ptid | ) |

Definition at line 35 of file py-continueevent.c.

References create_continue_event_object(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, and gdb::ref_ptr< T, Policy >::get().

Referenced by python_on_resume().

## ◆ emit_exited_event()

int emit_exited_event | ( | const LONGEST * | exit_code,
|  | struct inferior * | inf
| ) |  |

Definition at line 55 of file py-exitedevent.c.

References create_exited_event_object(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, and gdb::ref_ptr< T, Policy >::get().

Referenced by python_inferior_exit().

## ◆ emit_inferior_call_event()

int emit_inferior_call_event | ( | inferior_call_kind | kind,
|  | ptid_t | thread,
|  | CORE_ADDR | addr
| ) |  |

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

References create_inferior_call_event_object(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, and gdb::ref_ptr< T, Policy >::get().

Referenced by python_on_inferior_call_post(), and python_on_inferior_call_pre().

## ◆ emit_memory_changed_event()

int emit_memory_changed_event | ( | CORE_ADDR | addr,
|  | ssize_t | len
| ) |  |

Definition at line 140 of file py-infevents.c.

References create_memory_changed_event_object(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, and gdb::ref_ptr< T, Policy >::get().

Referenced by python_on_memory_change().

## ◆ emit_new_objfile_event()

int emit_new_objfile_event | ( | struct objfile * | objfile | ) |

Definition at line 49 of file py-newobjfileevent.c.

References create_new_objfile_event_object(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, and gdb::ref_ptr< T, Policy >::get().

Referenced by python_new_objfile().

## ◆ emit_register_changed_event()

int emit_register_changed_event | ( | struct frame_info * | frame,
|  | int | regnum
| ) |  |

Definition at line 155 of file py-infevents.c.

References create_register_changed_event_object(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, gdb::ref_ptr< T, Policy >::get(), and regnum.

Referenced by python_on_register_change().

## ◆ evpy_add_attribute()

int evpy_add_attribute | ( | PyObject * | event,
|  | const char * | name,
|  | PyObject * | attr
| ) |  |

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

References name.

Referenced by create_breakpoint_event_object(), create_clear_objfiles_event_object(), create_exited_event_object(), create_inferior_call_event_object(), create_memory_changed_event_object(), create_new_objfile_event_object(), create_register_changed_event_object(), create_signal_event_object(), create_thread_event_object(), python_inferior_deleted(), and python_new_inferior().

## ◆ evpy_dealloc()

void evpy_dealloc | ( | PyObject * | self | ) |

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

References Py_TYPE.

## ◆ evpy_emit_event()

int evpy_emit_event | ( | PyObject * | event,
|  | eventregistry_object * | registry
| ) |  |

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

References eventregistry_object::callbacks, func, gdbpy_print_stack(), and gdb::ref_ptr< T, Policy >::get().

Referenced by add_thread_object(), emit_clear_objfiles_event(), emit_continue_event(), emit_exited_event(), emit_inferior_call_event(), emit_memory_changed_event(), emit_new_objfile_event(), emit_register_changed_event(), emit_stop_event(), gdbpy_before_prompt_hook(), gdbpy_breakpoint_created(), gdbpy_breakpoint_deleted(), gdbpy_breakpoint_modified(), python_inferior_deleted(), and python_new_inferior().

## ◆ gdbpy_initialize_event_generic()

int gdbpy_initialize_event_generic | ( | PyTypeObject * | type,
|  | const char * | name
| ) |  |

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

References gdb_module, gdb_pymodule_addobject(), and name.

Referenced by gdbpy_initialize_event().