Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Guinevere Larsen <guinevere@redhat.com>, gdb-patches@sourceware.org
Cc: Guinevere Larsen <guinevere@redhat.com>
Subject: Re: [PATCH v2] gdb/record-full: fix stop status when inferior isn't resumed
Date: Mon, 19 Oct 2026 15:11:16 +0100	[thread overview]
Message-ID: <87ld7t93wb.fsf@redhat.com> (raw)
In-Reply-To: <20261009143916.47983-1-guinevere@redhat.com>

Guinevere Larsen <guinevere@redhat.com> writes:

> 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
> until 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. The commit does not include a test because almost nothing
> works with multi-threaded programs, and my upcoming series will
> exercise this code path plenty of times, when testing it makes more
> sense.

Thanks for updating the commit message.  One tiny nit...

> @@ -1187,8 +1187,8 @@ record_full_wait_1 (struct target_ops *ops,
>      {
>        gdb_assert ((options & TARGET_WNOHANG) != 0);
>  
> -      /* No interesting event.  */
> -      status->set_ignore ();
> +      /* No thread was reusmed at all.  */

Typo: reusmed -> resumed

With that fixed:

Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks,
Andrew


  reply	other threads:[~2026-10-19 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 14:39 Guinevere Larsen
2026-10-19 14:11 ` Andrew Burgess [this message]
2026-10-19 18:48   ` 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=87ld7t93wb.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=guinevere@redhat.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