aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2024-02-21 17:06:41 +0000
committerMarkus Metzger <markus.t.metzger@intel.com>2024-09-13 10:25:27 +0000
commit97e2c4e49c77b5ee2b160098196f3a0698c2737e (patch)
treefda61599bce233d26f51b313fd463ca287bb90f9
parentc285d01489ea270fe5b30c97515705868109a2db (diff)
downloadgdb-97e2c4e49c77b5ee2b160098196f3a0698c2737e.zip
gdb-97e2c4e49c77b5ee2b160098196f3a0698c2737e.tar.gz
gdb-97e2c4e49c77b5ee2b160098196f3a0698c2737e.tar.bz2
gdb, btrace: set wait status to ignore if nothing is moving
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.
-rw-r--r--gdb/record-btrace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 2713976..c91e3ad 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2326,14 +2326,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;
}
@@ -2638,7 +2638,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 ());