GDB (xrefs)
Classes | Functions | Variables
py-breakpoint.c File Reference
#include "defs.h"
#include "value.h"
#include "python-internal.h"
#include "python.h"
#include "charset.h"
#include "breakpoint.h"
#include "gdbcmd.h"
#include "gdbthread.h"
#include "observer.h"
#include "cli/cli-script.h"
#include "ada-lang.h"
#include "arch-utils.h"
#include "language.h"

Go to the source code of this file.

Classes

struct  pybp_code
 

Functions

static PyObject * bppy_is_valid (PyObject *self, PyObject *args)
 
static PyObject * bppy_get_enabled (PyObject *self, void *closure)
 
static PyObject * bppy_get_silent (PyObject *self, void *closure)
 
static int bppy_set_enabled (PyObject *self, PyObject *newvalue, void *closure)
 
static int bppy_set_silent (PyObject *self, PyObject *newvalue, void *closure)
 
static int bppy_set_thread (PyObject *self, PyObject *newvalue, void *closure)
 
static int bppy_set_task (PyObject *self, PyObject *newvalue, void *closure)
 
static PyObject * bppy_delete_breakpoint (PyObject *self, PyObject *args)
 
static int bppy_set_ignore_count (PyObject *self, PyObject *newvalue, void *closure)
 
static int bppy_set_hit_count (PyObject *self, PyObject *newvalue, void *closure)
 
static PyObject * bppy_get_location (PyObject *self, void *closure)
 
static PyObject * bppy_get_expression (PyObject *self, void *closure)
 
static PyObject * bppy_get_condition (PyObject *self, void *closure)
 
static int bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
 
static PyObject * bppy_get_commands (PyObject *self, void *closure)
 
static PyObject * bppy_get_type (PyObject *self, void *closure)
 
static PyObject * bppy_get_visibility (PyObject *self, void *closure)
 
static PyObject * bppy_get_temporary (PyObject *self, void *closure)
 
static PyObject * bppy_get_number (PyObject *self, void *closure)
 
static PyObject * bppy_get_thread (PyObject *self, void *closure)
 
static PyObject * bppy_get_task (PyObject *self, void *closure)
 
static PyObject * bppy_get_hit_count (PyObject *self, void *closure)
 
static PyObject * bppy_get_ignore_count (PyObject *self, void *closure)
 
static int bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
 
static int build_bp_list (struct breakpoint *b, void *arg)
 
PyObject * gdbpy_breakpoints (PyObject *self, PyObject *args)
 
enum ext_lang_bp_stop gdbpy_breakpoint_cond_says_stop (const struct extension_language_defn *extlang, struct breakpoint *b)
 
int gdbpy_breakpoint_has_cond (const struct extension_language_defn *extlang, struct breakpoint *b)
 
static void gdbpy_breakpoint_created (struct breakpoint *bp)
 
static void gdbpy_breakpoint_deleted (struct breakpoint *b)
 
int gdbpy_initialize_breakpoints (void)
 
static int local_setattro (PyObject *self, PyObject *name, PyObject *v)
 

Variables

static int bppy_live
 
gdbpy_breakpoint_objectbppy_pending_object
 
static char *const stop_func = "stop"
 
static struct pybp_code pybp_codes []
 
static struct pybp_code pybp_watch_types []
 
static PyGetSetDef breakpoint_object_getset []
 
static PyMethodDef breakpoint_object_methods []
 
PyTypeObject breakpoint_object_type
 

Function Documentation

static PyObject* bppy_delete_breakpoint ( PyObject *  self,
PyObject *  args 
)
static
static PyObject* bppy_get_commands ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_condition ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_enabled ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_expression ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_hit_count ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_ignore_count ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_location ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_number ( PyObject *  self,
void *  closure 
)
static

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

References BPPY_REQUIRE_VALID, and gdbpy_breakpoint_object::number.

static PyObject* bppy_get_silent ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_task ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_temporary ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_thread ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_type ( PyObject *  self,
void *  closure 
)
static
static PyObject* bppy_get_visibility ( PyObject *  self,
void *  closure 
)
static
static int bppy_init ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* bppy_is_valid ( PyObject *  self,
PyObject *  args 
)
static

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

References gdbpy_breakpoint_object::bp.

static int bppy_set_condition ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static
static int bppy_set_enabled ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static
static int bppy_set_hit_count ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static
static int bppy_set_ignore_count ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static
static int bppy_set_silent ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static
static int bppy_set_task ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static
static int bppy_set_thread ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static
static int build_bp_list ( struct breakpoint b,
void *  arg 
)
static

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

References cleanup::arg, if(), and breakpoint::py_bp_object.

Referenced by gdbpy_breakpoints().

enum ext_lang_bp_stop gdbpy_breakpoint_cond_says_stop ( const struct extension_language_defn extlang,
struct breakpoint b 
)
static void gdbpy_breakpoint_created ( struct breakpoint bp)
static
static void gdbpy_breakpoint_deleted ( struct breakpoint b)
static
int gdbpy_breakpoint_has_cond ( const struct extension_language_defn extlang,
struct breakpoint b 
)
PyObject* gdbpy_breakpoints ( PyObject *  self,
PyObject *  args 
)

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

References bppy_live, build_bp_list(), iterate_over_breakpoints(), and Py_DECREF.

int gdbpy_initialize_breakpoints ( void  )
static int local_setattro ( PyObject *  self,
PyObject *  name,
PyObject *  v 
)
static

Variable Documentation

int bppy_live
static
gdbpy_breakpoint_object* bppy_pending_object

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

Referenced by bpfinishpy_init(), and gdbpy_breakpoint_created().

PyGetSetDef breakpoint_object_getset[]
static

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

PyMethodDef breakpoint_object_methods[]
static
Initial value:
=
{
{ "is_valid", bppy_is_valid, METH_NOARGS,
"Return true if this breakpoint is valid, false if not." },
{ "delete", bppy_delete_breakpoint, METH_NOARGS,
"Delete the underlying GDB breakpoint." },
{ NULL }
}
static PyObject * bppy_is_valid(PyObject *self, PyObject *args)
Definition: py-breakpoint.c:76
static PyObject * bppy_delete_breakpoint(PyObject *self, PyObject *args)

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

PyTypeObject breakpoint_object_type

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

Referenced by gdbpy_breakpoint_created(), and gdbpy_initialize_breakpoints().

struct pybp_code pybp_codes[]
static
Initial value:
=
{
{ "BP_NONE", bp_none},
{ "BP_BREAKPOINT", bp_breakpoint},
{ "BP_WATCHPOINT", bp_watchpoint},
{ "BP_HARDWARE_WATCHPOINT", bp_hardware_watchpoint},
{ "BP_READ_WATCHPOINT", bp_read_watchpoint},
{ "BP_ACCESS_WATCHPOINT", bp_access_watchpoint},
{NULL}
}

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

struct pybp_code pybp_watch_types[]
static
Initial value:
=
{
{ "WP_READ", hw_read},
{ "WP_WRITE", hw_write},
{ "WP_ACCESS", hw_access},
{NULL}
}

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

char* const stop_func = "stop"
static