This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Python Finish Breakpoints
- From: Tom Tromey <tromey at redhat dot com>
- To: Kevin Pouget <kevin dot pouget at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 02 Dec 2011 14:48:56 -0700
- Subject: Re: [RFC] Python Finish Breakpoints
- References: <BANLkTim+YH64zkWvdz2_kVUUj=AJ7v4LKw@mail.gmail.com> <BANLkTi==bj50mZgFKq_qA-+3-2CQA3tBVw@mail.gmail.com> <BANLkTimmYEmvKT_984jYEVZnA5RGFpEgNw@mail.gmail.com> <m34o4qd5lh.fsf@fleche.redhat.com> <BANLkTinZ3DSVPRvSiFydCuYs71-DM5-aOg@mail.gmail.com> <m3vcwvubry.fsf@fleche.redhat.com> <BANLkTinBg76_-9i5n=VA2NXp+ZF978J=ig@mail.gmail.com> <m3y5wfl7ky.fsf@fleche.redhat.com> <CAPftXUKHxpww_pEcsMruR6rqo40xw9q9Jzn65-dXys_COt6JbQ@mail.gmail.com> <CAPftXUKsSSb=36CQ+ptGenkt4Q167TtJXuDD2fkU7KFYDu_tPQ@mail.gmail.com> <CAPftXUL0x7MG8NJtGxqVoEs4Z_D+ipQSnxCMEirQDa1ZPWC8Lw@mail.gmail.com> <m3hb2y5q8i.fsf@redhat.com> <m3y5w47szo.fsf@fleche.redhat.com> <CAPftXULH7STUB5-oSou7xb_Ww36bC1pDoKfzGvujSCM8PJyG=Q@mail.gmail.com> <CAPftXUKRH9fJVF9UyiHT4tngzT+59HDQGiMg+zti7ZMZDdwy1A@mail.gmail.com> <m3obwrppl4.fsf@fleche.redhat.com> <CAPftXU+y1YoqT7H6YwFKiqgmxhVSdpPTWQGek899utvPO2bmfw@mail.gmail.com> <m3ehx6fxnf.fsf@fleche.redhat.com> <CAPftXUJwtGJhqFyfX6LVK87QH2xeLkvv5kx=yaEnYJMv0YR_rw@mail.gmail.com> <CAPftXUKD3Oy_jbZaUFDTbGt3w9XqrSq5O2d_cv5ZGrUyeREx7g@mail.gmail.com> <CAPftXUK2K6JhC1u=XeySa_Wr2hzKxq-eWVJoCpT0oodQA4vEzw@mail.gmail.com>
>>>>> "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