aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-breakpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-breakpoint.c')
-rw-r--r--gdb/python/py-breakpoint.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 513a02d..f2d4385 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -563,6 +563,24 @@ bppy_get_temporary (PyObject *self, void *closure)
Py_RETURN_FALSE;
}
+/* Python function to determine if the breakpoint is a pending
+ breakpoint. */
+
+static PyObject *
+bppy_get_pending (PyObject *self, void *closure)
+{
+ gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
+
+ BPPY_REQUIRE_VALID (self_bp);
+
+ if (is_watchpoint (self_bp->bp))
+ Py_RETURN_FALSE;
+ if (pending_breakpoint_p (self_bp->bp))
+ Py_RETURN_TRUE;
+
+ Py_RETURN_FALSE;
+}
+
/* Python function to get the breakpoint's number. */
static PyObject *
bppy_get_number (PyObject *self, void *closure)
@@ -1054,6 +1072,8 @@ or None if no condition set."},
"Whether the breakpoint is visible to the user."},
{ "temporary", bppy_get_temporary, NULL,
"Whether this breakpoint is a temporary breakpoint."},
+ { "pending", bppy_get_pending, NULL,
+ "Whether this breakpoint is a pending breakpoint."},
{ NULL } /* Sentinel. */
};