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: Thu, 08 Dec 2011 07:56:31 -0700
- Subject: Re: [RFC] Python Finish Breakpoints
- References: <BANLkTim+YH64zkWvdz2_kVUUj=AJ7v4LKw@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> <m3ehx6fxnf.fsf@fleche.redhat.com> <CAPftXUJwtGJhqFyfX6LVK87QH2xeLkvv5kx=yaEnYJMv0YR_rw@mail.gmail.com> <CAPftXUKD3Oy_jbZaUFDTbGt3w9XqrSq5O2d_cv5ZGrUyeREx7g@mail.gmail.com> <CAPftXUK2K6JhC1u=XeySa_Wr2hzKxq-eWVJoCpT0oodQA4vEzw@mail.gmail.com> <m3iply7ign.fsf@fleche.redhat.com> <CAPftXUJw2qd6kTy4o285bwch78S5NSTLxUiVseLB1MKd4hDfUg@mail.gmail.com> <m3k469l999.fsf@fleche.redhat.com> <CAPftXU+hqUybnsjD3WO11V1fpeXXBns50cYHWRgYW0JkDsnXZQ@mail.gmail.com>
>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:
Kevin> and we're .... not ready!
Kevin> there are some regressions this morning, certainly due to your
Kevin> ambiguous linespec patch!
Kevin> first one is quite obvious:
Kevin> a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
Kevin> -if ![runto "getpid"] then {
Kevin> - fail "Cannot run to getpid."
Kevin> +if ![runto_main] then {
Kevin> + fail "Cannot run to main." return 0 }
Kevin> +gdb_breakpoint "getpid" {temporary}
Kevin> +gdb_test "continue" "Temporary breakpoint .*in getpid.*" "continue to getpid"
Kevin> +
Kevin> "break getpid" used to work before actually starting the inferior, but
Kevin> now it's unresolved
This test assumes that there is no debuginfo for getpid -- but in my
case, I have glibc debuginfo installed. This isn't unheard of for gdb
developers :)
The test would be more robust if you put a new function in a new file
and arranged for that file to be compiled without debuginfo.
Sorry I didn't notice this before.
Kevin> bpfinishpy_out_of_scope can't be triggered anymore because you set
Kevin> b-> pspace to NULL. I hesitated about how to fix it, but I think that
Kevin> FinishBP have to be bound to the pspace in which they were set, so I
Kevin> added this line:
It seems to me that one of these breakpoints has to be thread-specific
as well. Maybe the code to set b->pspace should notice thread-specific
breakpoints and allow pspace to be set there.
I'd rather this be done in breakpoint.c than have other modules modify
struct breakpoint directly.
Tom