This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] PR python/15620, PR python/18620 - breakpoint events in Python


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 (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]