GDB (xrefs)
Classes | Functions | Variables
/home/stan/gdb/src/gdb/python/py-breakpoint.c File Reference
#include "defs.h"
#include "value.h"
#include "exceptions.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 PyObjectbppy_is_valid (PyObject *self, PyObject *args)
static PyObjectbppy_get_enabled (PyObject *self, void *closure)
static PyObjectbppy_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 PyObjectbppy_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 PyObjectbppy_get_location (PyObject *self, void *closure)
static PyObjectbppy_get_expression (PyObject *self, void *closure)
static PyObjectbppy_get_condition (PyObject *self, void *closure)
static int bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
static PyObjectbppy_get_commands (PyObject *self, void *closure)
static PyObjectbppy_get_type (PyObject *self, void *closure)
static PyObjectbppy_get_visibility (PyObject *self, void *closure)
static PyObjectbppy_get_number (PyObject *self, void *closure)
static PyObjectbppy_get_thread (PyObject *self, void *closure)
static PyObjectbppy_get_task (PyObject *self, void *closure)
static PyObjectbppy_get_hit_count (PyObject *self, void *closure)
static PyObjectbppy_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)
PyObjectgdbpy_breakpoints (PyObject *self, PyObject *args)
int gdbpy_should_stop (struct breakpoint_object *bp_obj)
int gdbpy_breakpoint_has_py_cond (struct breakpoint_object *bp_obj)
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
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]

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

References breakpoint_object::bp, BPPY_REQUIRE_VALID, and breakpoint::hit_count.

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

References BPPY_REQUIRE_VALID, and breakpoint_object::number.

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

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

References breakpoint_object::bp, BPPY_REQUIRE_VALID, and breakpoint::silent.

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

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

References breakpoint_object::bp, BPPY_REQUIRE_VALID, and breakpoint::task.

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

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

References breakpoint_object::bp, BPPY_REQUIRE_VALID, and breakpoint::thread.

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

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

References breakpoint_object::bp, BPPY_REQUIRE_VALID, and breakpoint::type.

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

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

References breakpoint_object::bp, BPPY_REQUIRE_VALID, and breakpoint::number.

static int bppy_init ( PyObject self,
PyObject args,
PyObject kwargs 
) [static]
static PyObject* bppy_is_valid ( PyObject self,
PyObject args 
) [static]

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

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

References cleanup::arg, and breakpoint::py_bp_object.

Referenced by gdbpy_breakpoints().

static void gdbpy_breakpoint_created ( struct breakpoint bp) [static]
static void gdbpy_breakpoint_deleted ( struct breakpoint b) [static]

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

Referenced by condition_command().

PyObject* gdbpy_breakpoints ( PyObject self,
PyObject args 
)

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

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

int gdbpy_should_stop ( struct breakpoint_object bp_obj)

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

Referenced by bpstat_check_breakpoint_conditions().

static int local_setattro ( PyObject self,
PyObject name,
PyObject v 
) [static]

Variable Documentation

int bppy_live [static]

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

Referenced by bpfinishpy_init(), and gdbpy_breakpoint_created().

PyGetSetDef breakpoint_object_getset[] [static]

Definition at line 939 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 } 
}

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

PyTypeObject breakpoint_object_type

Definition at line 988 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 55 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 67 of file py-breakpoint.c.

char* const stop_func = "stop" [static]

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

Referenced by gdbpy_breakpoint_has_py_cond(), gdbpy_should_stop(), and local_setattro().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines