This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC v2] fix regressions with target-async
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Joel Brobecker <brobecker at adacore dot com>
- Date: Wed, 05 Mar 2014 11:30:03 -0700
- Subject: Re: [RFC v2] fix regressions with target-async
- Authentication-results: sourceware.org; auth=none
- References: <1393609699-26407-1-git-send-email-tromey at redhat dot com> <5310D2F9 dot 2090507 at redhat dot com> <87mwh7cks4 dot fsf at fleche dot redhat dot com> <5314AFEA dot 8020705 at redhat dot com> <87y50q9h3e dot fsf at fleche dot redhat dot com> <531644AE dot 1070404 at redhat dot com> <53166C73 dot 2070308 at redhat dot com>
Pedro> Confirmed, building with expat makes threaded debugging work:
...
Pedro> (You can find an expat build at ~palves:/home/palves/opt/)
Thanks. With this I was able to verify that your theory about the AIX
to_attach method was correct -- I could make my patched gdb crash by
debugging a multi-threaded inferior and then "attach"ing to a new
process.
The patch to aix-thread is pretty simple. It regression tests
reasonably well, but not perfectly... the test suite on AIX provokes a
number of internal errors, and with my patch they can be reported
against different tests. I suspect this is timing sensitive though,
perhaps latent races in the existing code, as the internal errors in
question are all preceded by a failing call to
aix-thread.c:ptrace_check.
For example:
(gdb) next
thread_function (arg=0x0) at ../../../gdb/gdb/testsuite/gdb.threads/pending-step
.c:57
57 (*myp) ++; /* insert breakpoint here */
aix-thread: ptrace (50, 38011047) returned -1 (errno = 22 Invalid argument)
(gdb) next
../../gdb/gdb/breakpoint.c:15064: internal-error: insert_single_step_breakpoint:
Assertion `single_step_breakpoints[1] == NULL' failed.
I wonder whether this is good enough.
Tom