aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/python/py-breakpoint.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index be4c5a5..8be8efb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * python/py-finishbreakpoint.c (gdbpy_breakpoint_created):
+ only call Py_INCREF (newbp) in the bppy_pending_object case.
+
2019-11-13 Tom Tromey <tromey@adacore.com>
PR build/25182:
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 65cb29f..4170737 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -1017,6 +1017,7 @@ gdbpy_breakpoint_created (struct breakpoint *bp)
if (bppy_pending_object)
{
newbp = bppy_pending_object;
+ Py_INCREF (newbp);
bppy_pending_object = NULL;
}
else
@@ -1027,7 +1028,6 @@ gdbpy_breakpoint_created (struct breakpoint *bp)
newbp->bp = bp;
newbp->bp->py_bp_object = newbp;
newbp->is_finish_bp = 0;
- Py_INCREF (newbp);
++bppy_live;
}
else