From: Markus Metzger <markus.t.metzger@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 4/6] gdb, btrace: set wait status to ignore if nothing is moving
Date: Thu, 7 Mar 2024 13:28:43 +0000 [thread overview]
Message-ID: <20240307132845.2909415-5-markus.t.metzger@intel.com> (raw)
In-Reply-To: <20240307132845.2909415-1-markus.t.metzger@intel.com>
When record_btrace::wait() is called and no threads are moving, we set the
wait status to no_resumed. Change that to ignore.
This helps with enabling per-inferior run-control for the record btrace
target as it avoids breaking out of do_target_wait() too early with
no_resumed when there would have been an event on another thread.
---
gdb/record-btrace.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 9f2999268d8..8b20ab53ca7 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2280,14 +2280,14 @@ btrace_step_spurious (void)
return status;
}
-/* Return a target_waitstatus indicating that the thread was not resumed. */
+/* Return a target_waitstatus indicating that nothing is moving. */
static struct target_waitstatus
-btrace_step_no_resumed (void)
+btrace_step_no_moving_threads (void)
{
struct target_waitstatus status;
- status.set_no_resumed ();
+ status.set_ignore ();
return status;
}
@@ -2556,7 +2556,7 @@ record_btrace_target::wait (ptid_t ptid, struct target_waitstatus *status,
if (moving.empty ())
{
- *status = btrace_step_no_resumed ();
+ *status = btrace_step_no_moving_threads ();
DEBUG ("wait ended by %s: %s", null_ptid.to_string ().c_str (),
status->to_string ().c_str ());
--
2.34.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2024-03-07 13:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 13:28 [PATCH 0/6] pr gdb/19340 Markus Metzger
2024-03-07 13:28 ` [PATCH 1/6] gdb, btrace: fix pr19340 Markus Metzger
2024-03-07 13:28 ` [PATCH 2/6] gdb, btrace: simplify gdb.btrace/multi-inferior.exp Markus Metzger
2024-03-07 13:28 ` [PATCH 3/6] gdb, btrace: remove record_btrace_target::supports_*() Markus Metzger
2024-03-07 13:28 ` Markus Metzger [this message]
2024-03-07 13:28 ` [PATCH 5/6] gdb, infrun: wait for single inferior Markus Metzger
2024-03-07 13:28 ` [PATCH 6/6] gdb, btrace, infrun: per-inferior run-control Markus Metzger
2024-03-08 10:50 ` Guinevere Larsen
2024-03-08 10:57 ` Metzger, Markus T
2024-03-08 11:02 ` Guinevere Larsen
2024-03-08 11:11 ` Metzger, Markus T
2024-03-08 11:25 ` Guinevere Larsen
2024-03-11 13:51 ` Metzger, Markus T
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=20240307132845.2909415-5-markus.t.metzger@intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
/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).