[RFC] Python Finish Breakpoints

Tom Tromey tromey@redhat.com
Fri Dec 2 21:49:00 GMT 2011


>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:

Sorry about the delay on this.
I got kind of distracted this week.

Kevin> I noticed a bug in the previous version of the patch, which led to
Kevin> `out_of_scope' callback being triggered when it was not supposed to be
Kevin> (namely, when the breakpoint was hit, the execution continued, and
Kevin> then the callback was triggered before the temporary breakpoint could
Kevin> be deleted.

Looking close now.

Kevin> +      if (ret)
Kevin> +        self_finishbp->return_value = value_to_value_object (ret);

If this fails then the error is never cleared or handled.

I think checking == NULL and then calling gdbpy_print_stack is appropriate.

Kevin> +                  /* Ignore Python errors at this stage.  */
Kevin> +                  self_bpfinish->return_type = type_to_type_object (ret_type);
Kevin> +                  PyErr_Clear ();
Kevin> +                  self_bpfinish->function_type =
Kevin> +                      type_to_type_object (SYMBOL_TYPE (function));
Kevin> +                  PyErr_Clear ();

This looked a little weird, but I verified from the docs that it is ok.

I think this still needs a NEWS entry.

Tom



More information about the Gdb-patches mailing list