public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] All threads not stopped when a process exits
@ 2020-02-06  8:30 Tankut Baris Aktemur
  2020-02-06  8:30 ` [PATCH 2/2] gdb/infrun: stop all threads if there exists a non-stop target Tankut Baris Aktemur
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Tankut Baris Aktemur @ 2020-02-06  8:30 UTC (permalink / raw)
  To: gdb-patches; +Cc: palves

Hi All,

This is a 2-part series that aims to fix the problem of all threads
not being stopped when a process exits.  The problem is, if we are in
all-stop mode with multiple inferiors, and an exit event is received
from an inferior, target_mourn_inferior() unpushes the process target
and leaves exec_ops as the top target of the current inferior.  This
new top target is not non-stop.  Hence, stop_all_threads() is skipped.
If there are other inferiors, they remain running instead of being
stopped.

Thanks,
Baris


Tankut Baris Aktemur (2):
  gdb: define convenience function 'exists_non_stop_target'
  gdb/infrun: stop all threads if there exists a non-stop target

 gdb/infrun.c                                 | 19 ++++--
 gdb/target.c                                 | 20 ++++++
 gdb/target.h                                 |  3 +
 gdb/testsuite/gdb.multi/stop-all-on-exit.c   | 27 +++++++++
 gdb/testsuite/gdb.multi/stop-all-on-exit.exp | 64 ++++++++++++++++++++
 5 files changed, 129 insertions(+), 4 deletions(-)
 create mode 100644 gdb/testsuite/gdb.multi/stop-all-on-exit.c
 create mode 100644 gdb/testsuite/gdb.multi/stop-all-on-exit.exp

-- 
2.17.1

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

end of thread, other threads:[~2020-04-01 19:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06  8:30 [PATCH 0/2] All threads not stopped when a process exits Tankut Baris Aktemur
2020-02-06  8:30 ` [PATCH 2/2] gdb/infrun: stop all threads if there exists a non-stop target Tankut Baris Aktemur
2020-04-01 18:10   ` Pedro Alves
2020-04-01 19:35     ` Aktemur, Tankut Baris
2020-02-06  8:30 ` [PATCH 1/2] gdb: define convenience function 'exists_non_stop_target' Tankut Baris Aktemur
2020-03-03  8:35 ` [PING][PATCH 0/2] All threads not stopped when a process exits Tankut Baris Aktemur
2020-03-17 13:02 ` [PING^2][PATCH " Tankut Baris Aktemur
2020-04-01 13:34 ` [PING^3][PATCH " Tankut Baris Aktemur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).