[v2,0/1] Fix detach bug when lwp has exited/terminated

Message ID 20231115195458.2938701-1-kevinb@redhat.com
Headers
Series Fix detach bug when lwp has exited/terminated |

Message

Kevin Buettner Nov. 15, 2023, 7:41 p.m. UTC
  This v2 patch addresses Andrew's concerns from his review of the v1
series.  In particular, it does the following:

- Restores the order of the '#include" statements in linux-fork.c, using
  'extern struct lwpinfo;' in linux-fork.h instead.
- Fixes a whitespace problem.
- Adds a call to to delete_lwp() prior to the early return added in v1.
- Combines the test case and the fix into a single commit.  (For
  largish changes, I prefer them to be separate, but I have no
  objection to grouping them into a single commit for something
  like this.)

Kevin Buettner (1):
  Fix detach bug when lwp has exited/terminated

 gdb/linux-fork.c                              |  20 ++-
 gdb/linux-fork.h                              |   3 +-
 gdb/linux-nat.c                               |  18 ++-
 gdb/testsuite/gdb.base/kill-during-detach.c   |  32 +++++
 gdb/testsuite/gdb.base/kill-during-detach.exp | 132 ++++++++++++++++++
 5 files changed, 197 insertions(+), 8 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/kill-during-detach.c
 create mode 100644 gdb/testsuite/gdb.base/kill-during-detach.exp