/* Variables used to pass information between the Breakpoint
constructor and the breakpoint-created hook function. */
-breakpoint_object *bppy_pending_object;
+gdbpy_breakpoint_object *bppy_pending_object;
/* Function that is called when a Python condition is evaluated. */
static char * const stop_func = "stop";
static PyObject *
bppy_is_valid (PyObject *self, PyObject *args)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
if (self_bp->bp)
Py_RETURN_TRUE;
static PyObject *
bppy_get_enabled (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
if (! self_bp->bp)
static PyObject *
bppy_get_silent (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
if (self_bp->bp->silent)
static int
bppy_set_enabled (PyObject *self, PyObject *newvalue, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
int cmp;
volatile struct gdb_exception except;
static int
bppy_set_silent (PyObject *self, PyObject *newvalue, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
int cmp;
BPPY_SET_REQUIRE_VALID (self_bp);
static int
bppy_set_thread (PyObject *self, PyObject *newvalue, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
long id;
BPPY_SET_REQUIRE_VALID (self_bp);
static int
bppy_set_task (PyObject *self, PyObject *newvalue, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
long id;
int valid_id = 0;
volatile struct gdb_exception except;
static PyObject *
bppy_delete_breakpoint (PyObject *self, PyObject *args)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
volatile struct gdb_exception except;
BPPY_REQUIRE_VALID (self_bp);
static int
bppy_set_ignore_count (PyObject *self, PyObject *newvalue, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
long value;
volatile struct gdb_exception except;
static int
bppy_set_hit_count (PyObject *self, PyObject *newvalue, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_SET_REQUIRE_VALID (self_bp);
bppy_get_location (PyObject *self, void *closure)
{
char *str;
- breakpoint_object *obj = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (obj);
bppy_get_expression (PyObject *self, void *closure)
{
char *str;
- breakpoint_object *obj = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
struct watchpoint *wp;
BPPY_REQUIRE_VALID (obj);
bppy_get_condition (PyObject *self, void *closure)
{
char *str;
- breakpoint_object *obj = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (obj);
bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
{
char *exp;
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
volatile struct gdb_exception except;
BPPY_SET_REQUIRE_VALID (self_bp);
static PyObject *
bppy_get_commands (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
struct breakpoint *bp = self_bp->bp;
long length;
volatile struct gdb_exception except;
static PyObject *
bppy_get_type (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
static PyObject *
bppy_get_visibility (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
static PyObject *
bppy_get_temporary (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
static PyObject *
bppy_get_number (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
static PyObject *
bppy_get_thread (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
static PyObject *
bppy_get_task (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
static PyObject *
bppy_get_hit_count (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
static PyObject *
bppy_get_ignore_count (PyObject *self, void *closure)
{
- breakpoint_object *self_bp = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
BPPY_REQUIRE_VALID (self_bp);
return -1;
}
- bppy_pending_object = (breakpoint_object *) self;
+ bppy_pending_object = (gdbpy_breakpoint_object *) self;
bppy_pending_object->number = -1;
bppy_pending_object->bp = NULL;
return -1;
}
- BPPY_SET_REQUIRE_VALID ((breakpoint_object *) self);
+ BPPY_SET_REQUIRE_VALID ((gdbpy_breakpoint_object *) self);
return 0;
}
allowed to continue. */
int
-gdbpy_should_stop (struct breakpoint_object *bp_obj)
+gdbpy_should_stop (struct gdbpy_breakpoint_object *bp_obj)
{
int stop = 1;
conditions. */
int
-gdbpy_breakpoint_has_py_cond (struct breakpoint_object *bp_obj)
+gdbpy_breakpoint_has_py_cond (struct gdbpy_breakpoint_object *bp_obj)
{
int has_func = 0;
PyObject *py_bp = (PyObject *) bp_obj;
static void
gdbpy_breakpoint_created (struct breakpoint *bp)
{
- breakpoint_object *newbp;
+ gdbpy_breakpoint_object *newbp;
PyGILState_STATE state;
if (bp->number < 0 && bppy_pending_object == NULL)
bppy_pending_object = NULL;
}
else
- newbp = PyObject_New (breakpoint_object, &breakpoint_object_type);
+ newbp = PyObject_New (gdbpy_breakpoint_object, &breakpoint_object_type);
if (newbp)
{
newbp->number = bp->number;
int num = b->number;
PyGILState_STATE state;
struct breakpoint *bp = NULL;
- breakpoint_object *bp_obj;
+ gdbpy_breakpoint_object *bp_obj;
state = PyGILState_Ensure ();
bp = get_breakpoint (num);
static int
local_setattro (PyObject *self, PyObject *name, PyObject *v)
{
- breakpoint_object *obj = (breakpoint_object *) self;
+ gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
char *attr = python_string_to_host_string (name);
if (attr == NULL)
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Breakpoint", /*tp_name*/
- sizeof (breakpoint_object), /*tp_basicsize*/
+ sizeof (gdbpy_breakpoint_object), /*tp_basicsize*/
0, /*tp_itemsize*/
0, /*tp_dealloc*/
0, /*tp_print*/