This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC v2] fix regressions with target-async


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]