public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Lancelot SIX <lancelot.six@amd.com>
To: <gdb-patches@sourceware.org>
Cc: <lsix@lancelotsix.com>, Lancelot SIX <lancelot.six@amd.com>
Subject: [PATCH v6 0/3] interrupt all threads to generate core in non-stop targets
Date: Wed, 22 Mar 2023 16:35:01 +0000	[thread overview]
Message-ID: <20230322163504.560986-1-lancelot.six@amd.com> (raw)
In-Reply-To: <2daa1736-57cb-3c5a-f1cd-48f5aa03d010@simark.ca>

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
-- 
2.34.1


  reply	other threads:[~2023-03-22 16:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 16:51 [PATCH v5] gdb/gcore: interrupt all threads before generating the corefile Lancelot SIX
2023-02-10 14:36 ` [PING] " Lancelot SIX
2023-02-10 21:46 ` Simon Marchi
2023-03-22 16:35   ` Lancelot SIX [this message]
2023-03-22 16:35     ` [PATCH v6 1/3] gdb: add inferior parameter to target_is_non_stop_p Lancelot SIX
2023-03-22 16:35     ` [PATCH v6 2/3] gdb/infrun: Improve assertion in stop_all_threads Lancelot SIX
2023-03-22 16:35     ` [PATCH v6 3/3] gdb/gcore: interrupt all threads to generate core in non-stop targets Lancelot SIX
2023-03-22 16:44       ` Eli Zaretskii
2023-03-22 16:59         ` Lancelot SIX
2023-05-10 18:46       ` Lancelot SIX
2023-05-10 19:05         ` Eli Zaretskii
2023-05-10 19:08           ` Lancelot SIX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230322163504.560986-1-lancelot.six@amd.com \
    --to=lancelot.six@amd.com \
    --cc=gdb-patches@sourceware.org \
    --cc=lsix@lancelotsix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).