2010-11-29 Phil Muldoon <pmuldoon@redhat.com>
PR python/12199 * python/py-breakpoint.c (bppy_delete_breakpoint): New function. 2010-11-29 Phil Muldoon <pmuldoon@redhat.com> PR python/12199 * gdb.python/py-breakpoint.exp: Test the delete method. 2010-11-29 Phil Muldoon <pmuldoon@redhat.com> PR python/12199 * gdb.texinfo (Breakpoints In Python): Document "delete" method.
This commit is contained in:
parent
950386c651
commit
94b6973efe
6 changed files with 66 additions and 0 deletions
|
@ -283,6 +283,23 @@ bppy_set_task (PyObject *self, PyObject *newvalue, void *closure)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Python function which deletes the underlying GDB breakpoint. This
|
||||
triggers the breakpoint_deleted observer which will call
|
||||
gdbpy_breakpoint_deleted; that function cleans up the Python
|
||||
sections. */
|
||||
|
||||
static PyObject *
|
||||
bppy_delete_breakpoint (PyObject *self, PyObject *args)
|
||||
{
|
||||
breakpoint_object *self_bp = (breakpoint_object *) self;
|
||||
|
||||
BPPY_REQUIRE_VALID (self_bp);
|
||||
|
||||
delete_breakpoint (self_bp->bp);
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
/* Python function to set the ignore count of a breakpoint. */
|
||||
static int
|
||||
|
@ -843,6 +860,8 @@ static PyMethodDef breakpoint_object_methods[] =
|
|||
{
|
||||
{ "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 } /* Sentinel. */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue