Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen <guinevere@redhat.com>
To: gdb-patches@sourceware.org
Cc: Guinevere Larsen <guinevere@redhat.com>
Subject: [PATCH] gdb/record-full: fix stop status when inferior isn't resumed
Date: Wed,  7 Oct 2026 17:40:14 -0300	[thread overview]
Message-ID: <20261007204014.893637-1-guinevere@redhat.com> (raw)

The wait function for the record-full target has a check for whether
or not the inferior should be resumed. However, when we correctly
identified that it shouldn't be resumed, we incorrectly set the exit
status as "ignore", as though the inferior had resumed and had an
uninteresting stop.

This would cause a problem when - for example - GDB has to wait for
all threads to actually be stopped, because we do that by waiting all
threads have a wait status of "no_resumed", and the "ignore" status
would make us iterate over them and wait more.

This commit fixes that by setting the status correctly to not_resumed.
---
 gdb/record-full.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/record-full.c b/gdb/record-full.c
index 26bd85d34f6..f56b3dfc7fd 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -1188,7 +1188,7 @@ record_full_wait_1 (struct target_ops *ops,
       gdb_assert ((options & TARGET_WNOHANG) != 0);
 
       /* No interesting event.  */
-      status->set_ignore ();
+      status->set_no_resumed ();
       return minus_one_ptid;
     }
 

base-commit: ca0665335ff67af94f9ded026d7ef2405a68c453
-- 
2.55.0


             reply	other threads:[~2026-10-07 20:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 20:40 Guinevere Larsen [this message]
2026-10-09 10:44 ` Andrew Burgess
2026-10-09 14:32   ` Guinevere Larsen

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=20261007204014.893637-1-guinevere@redhat.com \
    --to=guinevere@redhat.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