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]

[PATCH 0/3] Fix fork bugs


My intention was to fix PR 19461 (strange "info thread" behavior in
non-stop), which looked like an easy one-liner.  As usual, the tests
are the hardest part, and reveal other problems...

In this case, the test I wrote for PR 19461 tripped on a gdb hang,
which I filed as PR 19494 (hang when killing unfollowed fork
children), and fixed.  I then decided to write a test specific for
that bug too, for better coverage.

Since I was going to add two more copies of foreach_with_prefix, one
per test, I instead thought I'd finally propose moving it to common
code.

Pedro Alves (3):
  Move foreach_with_prefix to lib/gdb.exp
  Fix PR 19494: hang when killing unfollowed fork children
  Fix PR 19461: strange "info thread" behavior in non-stop

 gdb/infrun.c                                       |  11 ++
 gdb/linux-nat.c                                    | 104 ++++++++-----
 gdb/testsuite/gdb.base/catch-fork-kill.c           |  97 ++++++++++++
 gdb/testsuite/gdb.base/catch-fork-kill.exp         |  99 +++++++++++++
 gdb/testsuite/gdb.base/fork-running-state.c        |  83 +++++++++++
 gdb/testsuite/gdb.base/fork-running-state.exp      | 163 +++++++++++++++++++++
 .../gdb.base/step-sw-breakpoint-adjust-pc.exp      |  12 --
 .../forking-threads-plus-breakpoint.exp            |  12 --
 .../gdb.threads/process-dies-while-handling-bp.exp |  12 --
 gdb/testsuite/lib/gdb.exp                          |  12 ++
 10 files changed, 534 insertions(+), 71 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/catch-fork-kill.c
 create mode 100644 gdb/testsuite/gdb.base/catch-fork-kill.exp
 create mode 100644 gdb/testsuite/gdb.base/fork-running-state.c
 create mode 100644 gdb/testsuite/gdb.base/fork-running-state.exp

-- 
1.9.3


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