[RFC v2] fix regressions with target-async

Pedro Alves palves@redhat.com
Wed Mar 5 20:38:00 GMT 2014


On 03/05/2014 06:30 PM, Tom Tromey wrote:
> 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.

OK.

> 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.

Yes, I can't imagine this being related.

-- 
Pedro Alves



More information about the Gdb-patches mailing list