Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/8] Fix removing inferiors from within "thread apply" commands
@ 2017-04-11 23:51 Pedro Alves
  2017-04-11 23:51 ` [PATCH 3/8] C++fy thread_apply_all_command Pedro Alves
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Pedro Alves @ 2017-04-11 23:51 UTC (permalink / raw)
  To: gdb-patches

It took a bit more work than I envisioned, but ...

... this series aims at fixing the issues mentioned here:
  https://sourceware.org/ml/gdb-patches/2017-04/msg00137.html

Those are addressed by the last patch in this series (patch 8).

That patch however exposed a couple other latent problems, which are
fixed by the first two patches in this series.

Patch 3 ("C++fy thread_apply_all_command"), I wrote because I first
thought we'd also have to bump the refcounts of all inferiors in
"thread apply all".  That's actually not necessary, but still that's a
useful patch for getting rid of cleanups, so I included it here.

Patch 4 increases coverage of a regression test for a related bug.  I
had noticed that we weren't making sure that GDB reverts back to no
thread selected in that test.  And patch 3 made me realize that that
test also didn't exercise "thread apply $some_thread", which goes via
a different path, so I fixed it too.

Patches 5-7 are preparatory/cleanup work for patch 8.

Tested on x86_64 Fedora 23, native and gdbserver.

Pedro Alves (8):
  watch_command_1: Fix dangling frame access
  Fix follow-fork latent bug
  C++fy thread_apply_all_command
  Improve coverage of the PR threads/13217 regression test
  GC inferior.c:init_inferior_list
  Make inferior a class with cdtors, and use new/delete
  Make inferior::detaching a bool, and introduce
    scoped_restore::release()
  Fix removing inferiors from within "thread apply" commands

 gdb/Makefile.in                           |   6 +-
 gdb/breakpoint.c                          |  34 +++--
 gdb/common/scoped_restore.h               |  36 +++--
 gdb/inferior.c                            |  52 ++-----
 gdb/inferior.h                            | 110 +++++++++------
 gdb/infrun.c                              |  13 +-
 gdb/testsuite/gdb.threads/threadapply.exp | 166 +++++++++++++++++++++-
 gdb/testsuite/lib/gdb.exp                 |  19 +++
 gdb/thread.c                              | 222 ++++++++++++++++--------------
 gdb/unittests/scoped_restore-selftests.c  | 110 +++++++++++++++
 10 files changed, 556 insertions(+), 212 deletions(-)
 create mode 100644 gdb/unittests/scoped_restore-selftests.c

-- 
2.5.5


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2017-04-19 12:20 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 23:51 [PATCH 0/8] Fix removing inferiors from within "thread apply" commands Pedro Alves
2017-04-11 23:51 ` [PATCH 3/8] C++fy thread_apply_all_command Pedro Alves
2017-04-13 10:06   ` Yao Qi
2017-04-11 23:51 ` [PATCH 7/8] Make inferior::detaching a bool, and introduce scoped_restore::release() Pedro Alves
2017-04-11 23:51 ` [PATCH 6/8] Make inferior a class with cdtors, and use new/delete Pedro Alves
2017-04-13 10:24   ` Yao Qi
2017-04-11 23:51 ` [PATCH 8/8] Fix removing inferiors from within "thread apply" commands Pedro Alves
2017-04-13 11:33   ` Yao Qi
2017-04-13 12:22     ` Pedro Alves
2017-04-13 14:49       ` Pedro Alves
2017-04-19  8:23         ` Yao Qi
2017-04-19 12:15           ` Pedro Alves
2017-04-19 12:20             ` Pedro Alves
2017-04-13 15:31       ` Yao Qi
2017-04-11 23:51 ` [PATCH 2/8] Fix follow-fork latent bug Pedro Alves
2017-04-13  9:58   ` Yao Qi
2017-04-13 12:09     ` Pedro Alves
2017-04-13 15:33       ` Yao Qi
2017-04-11 23:51 ` [PATCH 1/8] watch_command_1: Fix dangling frame access Pedro Alves
2017-04-13  9:34   ` Yao Qi
2017-04-13 15:26     ` Pedro Alves
2017-04-11 23:56 ` [PATCH 4/8] Improve coverage of the PR threads/13217 regression test Pedro Alves
2017-04-13 10:09   ` Yao Qi
2017-04-11 23:56 ` [PATCH 5/8] GC inferior.c:init_inferior_list Pedro Alves
2017-04-13 10:10   ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox