]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb, btrace: set wait status to ignore if nothing is moving
authorMarkus Metzger <markus.t.metzger@intel.com>
Wed, 21 Feb 2024 17:06:41 +0000 (17:06 +0000)
committerMarkus Metzger <markus.t.metzger@intel.com>
Mon, 3 Nov 2025 06:28:35 +0000 (06:28 +0000)
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

index bb4952d3349162535e2393d7d189fa374a2b63b6..f80cfccc7cd93f53a4c2a3fb9b6260f41efbd2cc 100644 (file)
@@ -2346,14 +2346,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;
 }
@@ -2658,7 +2658,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 ());