use user_breakpoint_p in python code
I noticed that bppy_get_visibility and gdbpy_breakpoint_created implemented their own visibility checks, but subtly different from user_breakpoint_p. I think the latter is more correct, and so changed the Python code to use it. I suspect there isn't a decent way to test this, so no new test. Built and regtested on x86-64 Fedora 23. 2016-07-13 Tom Tromey <tom@tromey.com> * python/py-breakpoint.c (bppy_get_visibility) (gdbpy_breakpoint_created): Use user_breakpoint_p.
This commit is contained in:
parent
cda75e7050
commit
43684a7b84
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2016-07-13 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* python/py-breakpoint.c (bppy_get_visibility)
|
||||||
|
(gdbpy_breakpoint_created): Use user_breakpoint_p.
|
||||||
|
|
||||||
2016-07-13 Tom Tromey <tom@tromey.com>
|
2016-07-13 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
PR cli/18053:
|
PR cli/18053:
|
||||||
|
|
|
@ -540,10 +540,10 @@ bppy_get_visibility (PyObject *self, void *closure)
|
||||||
|
|
||||||
BPPY_REQUIRE_VALID (self_bp);
|
BPPY_REQUIRE_VALID (self_bp);
|
||||||
|
|
||||||
if (self_bp->bp->number < 0)
|
if (user_breakpoint_p (self_bp->bp))
|
||||||
Py_RETURN_FALSE;
|
|
||||||
|
|
||||||
Py_RETURN_TRUE;
|
Py_RETURN_TRUE;
|
||||||
|
|
||||||
|
Py_RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Python function to determine if the breakpoint is a temporary
|
/* Python function to determine if the breakpoint is a temporary
|
||||||
|
@ -863,7 +863,7 @@ gdbpy_breakpoint_created (struct breakpoint *bp)
|
||||||
gdbpy_breakpoint_object *newbp;
|
gdbpy_breakpoint_object *newbp;
|
||||||
PyGILState_STATE state;
|
PyGILState_STATE state;
|
||||||
|
|
||||||
if (bp->number < 0 && bppy_pending_object == NULL)
|
if (!user_breakpoint_p (bp) && bppy_pending_object == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (bp->type != bp_breakpoint
|
if (bp->type != bp_breakpoint
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue