This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] btrace: avoid tp != NULL assertion
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 3 Mar 2015 14:44:29 +0000
- Subject: RE: [PATCH] btrace: avoid tp != NULL assertion
- Authentication-results: sourceware.org; auth=none
- References: <1423473902-2286-1-git-send-email-markus dot t dot metzger at intel dot com> <54F4DF9D dot 3060400 at redhat dot com> <A78C989F6D9628469189715575E55B231E6EEF71 at IRSMSX104 dot ger dot corp dot intel dot com> <54F5A12F dot 9000702 at redhat dot com> <A78C989F6D9628469189715575E55B231E6EF176 at IRSMSX104 dot ger dot corp dot intel dot com> <54F5BA0B dot 2000106 at redhat dot com> <A78C989F6D9628469189715575E55B231E6EF452 at IRSMSX104 dot ger dot corp dot intel dot com> <54F5BF28 dot 5030108 at redhat dot com>
> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Tuesday, March 3, 2015 3:03 PM
> To: Metzger, Markus T
> Cc: gdb-patches@sourceware.org
> Subject: Re: [PATCH] btrace: avoid tp != NULL assertion
> >>> No, that wasn't the reason for replacing the assert. There are no such
> >>> errors in the gdb.btrace suite (which is mostly single-threaded) with my
> >>> patch and I have not seen any such errors otherwise, either.
> >>
> >> Then it sounds like we're either lacking basic tests, or the threaded tests
> >> are somehow not running correctly when gdb is a 32-bit program. I think
> >> that if you step any non-leader thread, you should see it happen.
> >> Grepping the tests, I think gdb.btrace/multi-thread-step.exp should have
> >> caught it. My machine doesn't do btrace, so I can't try it myself...
> >>
> >> BTW, did any existing test in the testsuite catch the assertion we're
> >> fixing?
> >
> > Almost all of them when run on 32-bit systems; -m32 on 64-bit systems
> does
> > not catch this.
>
> Right, that's why I said "when gdb is a 32-bit program". Sounds like
> no existing test tries a "step" when not replaying then. It'd be very
> nice to have one. Can I convince you to add one? :-)
The multi-thread-step.exp test does not catch it because it uses "cont",
which works fine. When I add a "step" before the "cont", I get the
"No thread" error when using my old patch instead of your new patch.
Or I get the assert when using neither my old nor your new patch.
But then, I got the assert already on other tests.
With my patch dropped and your patch committed, what is the new
test expected to catch?
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052