[v6,0/3] interrupt all threads to generate core in non-stop targets

Message ID 20230322163504.560986-1-lancelot.six@amd.com
Headers
Series interrupt all threads to generate core in non-stop targets |

Message

Lancelot SIX March 22, 2023, 4:35 p.m. UTC
  Hi,

Here is a follow-up to
https://sourceware.org/pipermail/gdb-patches/2023-January/196393.html.

Noticeable changes from last revision:

- Added patch #1  and #2 to improve the assertion at the beginning
  of stop-all-threads.

- With all-stop targets, just check if any thread is still marked as
  executing and error-out with a meaningful error message when
  appropriate.  This is not ideal as all-stop is not on par with
  non-stop, but this patch is still overall a step in the right
  direction in my opinion.

  This is because the previous implementation was most likely
  erroneous.  Among other things, It did rely on target_stop_on_wait,
  which internally calls target_wait and discards the resulting
  target_waitstatus.  This does not seem to be the right thing to
  do.

- Adjusted documentation/NEWS to distinguish all-stop/non-stop
  behaviors.


Lancelot SIX (3):
  gdb: add inferior parameter to target_is_non_stop_p
  gdb/infrun: Improve assertion in stop_all_threads
  gdb/gcore: interrupt all threads to generate core in non-stop targets

 gdb/NEWS                                 |  8 +++
 gdb/doc/gdb.texinfo                      |  5 ++
 gdb/gcore.c                              | 20 ++++++
 gdb/infrun.c                             | 21 +++----
 gdb/infrun.h                             |  9 +++
 gdb/target.c                             |  9 ++-
 gdb/target.h                             |  8 ++-
 gdb/testsuite/gdb.base/gcore-nonstop.c   | 44 +++++++++++++
 gdb/testsuite/gdb.base/gcore-nonstop.exp | 79 ++++++++++++++++++++++++
 9 files changed, 187 insertions(+), 16 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/gcore-nonstop.c
 create mode 100644 gdb/testsuite/gdb.base/gcore-nonstop.exp


base-commit: 6e7eef72164c00d6a5a7b0bce9fa01f5481f33cb