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"
#include "location.h"
#include "py-event.h"
#include "linespec.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_pending (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_validate_args (const char *spec, char *source, char *function, char *label, char *line, enum bptype type)
 
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)
 
static void gdbpy_breakpoint_modified (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 const char stop_func [] = "stop"
 
static struct pybp_code pybp_codes []
 
static struct pybp_code pybp_watch_types []
 
static gdb_PyGetSetDef breakpoint_object_getset []
 
static PyMethodDef breakpoint_object_methods []
 
PyTypeObject breakpoint_object_type
 

Function Documentation

◆ bppy_delete_breakpoint()

static PyObject* bppy_delete_breakpoint ( PyObject *  self,
PyObject *  args 
)
static

◆ bppy_get_commands()

static PyObject* bppy_get_commands ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_condition()

static PyObject* bppy_get_condition ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_enabled()

static PyObject* bppy_get_enabled ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_expression()

static PyObject* bppy_get_expression ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_hit_count()

static PyObject* bppy_get_hit_count ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_ignore_count()

static PyObject* bppy_get_ignore_count ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_location()

static PyObject* bppy_get_location ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_number()

static PyObject* bppy_get_number ( PyObject *  self,
void *  closure 
)
static

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

References BPPY_REQUIRE_VALID, and gdbpy_breakpoint_object::number.

◆ bppy_get_pending()

static PyObject* bppy_get_pending ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_silent()

static PyObject* bppy_get_silent ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_task()

static PyObject* bppy_get_task ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_temporary()

static PyObject* bppy_get_temporary ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_thread()

static PyObject* bppy_get_thread ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_type()

static PyObject* bppy_get_type ( PyObject *  self,
void *  closure 
)
static

◆ bppy_get_visibility()

static PyObject* bppy_get_visibility ( PyObject *  self,
void *  closure 
)
static

◆ bppy_init()

static int bppy_init ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static

◆ bppy_init_validate_args()

static int bppy_init_validate_args ( const char *  spec,
char *  source,
char *  function,
char *  label,
char *  line,
enum bptype  type 
)
static

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

References _, and bp_watchpoint.

Referenced by bppy_init().

◆ bppy_is_valid()

static PyObject* bppy_is_valid ( PyObject *  self,
PyObject *  args 
)
static

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

References gdbpy_breakpoint_object::bp.

◆ bppy_set_condition()

static int bppy_set_condition ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static

◆ bppy_set_enabled()

static int bppy_set_enabled ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static

◆ bppy_set_hit_count()

static int bppy_set_hit_count ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static

◆ bppy_set_ignore_count()

static int bppy_set_ignore_count ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static

◆ bppy_set_silent()

static int bppy_set_silent ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static

◆ bppy_set_task()

static int bppy_set_task ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static

◆ bppy_set_thread()

static int bppy_set_thread ( PyObject *  self,
PyObject *  newvalue,
void *  closure 
)
static

◆ build_bp_list()

static int build_bp_list ( struct breakpoint b,
void *  arg 
)
static

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

References bp, if(), and breakpoint::py_bp_object.

Referenced by gdbpy_breakpoints().

◆ gdbpy_breakpoint_cond_says_stop()

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

◆ gdbpy_breakpoint_created()

static void gdbpy_breakpoint_created ( struct breakpoint bp)
static

◆ gdbpy_breakpoint_deleted()

static void gdbpy_breakpoint_deleted ( struct breakpoint b)
static

◆ gdbpy_breakpoint_has_cond()

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

◆ gdbpy_breakpoint_modified()

static void gdbpy_breakpoint_modified ( struct breakpoint b)
static

◆ gdbpy_breakpoints()

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

◆ gdbpy_initialize_breakpoints()

int gdbpy_initialize_breakpoints ( void  )

◆ local_setattro()

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

Variable Documentation

◆ bppy_live

int bppy_live
static

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

◆ breakpoint_object_getset

gdb_PyGetSetDef breakpoint_object_getset[]
static

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

◆ breakpoint_object_methods

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:79
static PyObject * bppy_delete_breakpoint(PyObject *self, PyObject *args)

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

◆ breakpoint_object_type

PyTypeObject breakpoint_object_type

◆ pybp_codes

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 57 of file py-breakpoint.c.

Referenced by gdbpy_initialize_breakpoints().

◆ pybp_watch_types

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 69 of file py-breakpoint.c.

Referenced by gdbpy_initialize_breakpoints().

◆ stop_func

const char stop_func[] = "stop"
static