This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] PR python/15620, PR python/18620 - breakpoint events in Python
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 13 Jul 2016 14:39:37 +0100
- Subject: Re: [RFA] PR python/15620, PR python/18620 - breakpoint events in Python
- Authentication-results: sourceware.org; auth=none
- References: <1463777131-7289-1-git-send-email-tom@tromey.com>
Tom Tromey <tom@tromey.com> writes:
Hi Tom,
Patch is good to me.
> @@ -917,6 +926,15 @@ gdbpy_breakpoint_deleted (struct breakpoint *b)
> bp_obj = bp->py_bp_object;
> if (bp_obj)
> {
> + if (!evregpy_no_listeners_p (gdb_py_events.breakpoint_deleted))
> + {
> + PyObject *bp_obj_alias = (PyObject *) bp_obj;
Nit: an empty line is needed here.
> + Py_INCREF (bp_obj_alias);
> + if (evpy_emit_event (bp_obj_alias,
> + gdb_py_events.breakpoint_deleted) < 0)
> + gdbpy_print_stack ();
> + }
> +
> bp_obj->bp = NULL;
> --bppy_live;
> Py_DECREF (bp_obj);
--
Yao (齐尧)