public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mikhail Terekhov <Mikhail.Terekhov@dell.com>
To: gdb-patches@sourceware.org
Cc: Mikhail Terekhov <Mikhail.Terekhov@dell.com>
Subject: [PATCH] [PR gdb/30630] Fix internal-error in remote_target::wait
Date: Tue,  3 Oct 2023 13:26:28 -0400	[thread overview]
Message-ID: <20231003172627.23077-1-Mikhail.Terekhov@dell.com> (raw)

From: Mikhail Terekhov <mikhail.terekhov@emc.com>

[PR gdb/30630] Assert inroduced in 32b1f5e8d6b8ddd3be6e471c26dd85a1dac31dda
causes gdb to fail when connecting to remote server in async
nonstop mode. This fix replaces call to target_can_async_p()
by target_is_async_p() in remote_target::queued_stop_reply()
as suggested by Christian Prochaska in comment6 to this PR.
---
 gdb/remote.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/remote.c b/gdb/remote.c
index 9bb4f1de598..a3221b6b5d1 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -7625,7 +7625,7 @@ remote_target::queued_stop_reply (ptid_t ptid)
   remote_state *rs = get_remote_state ();
   struct stop_reply *r = remote_notif_remove_queued_reply (ptid);
 
-  if (!rs->stop_reply_queue.empty () && target_can_async_p ())
+  if (!rs->stop_reply_queue.empty () && target_is_async_p ())
     {
       /* There's still at least an event left.  */
       mark_async_event_handler (rs->remote_async_inferior_event_token);
-- 
2.35.3


             reply	other threads:[~2023-10-03 17:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 17:26 Mikhail Terekhov [this message]
2023-10-03 19:02 ` Simon Marchi

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=20231003172627.23077-1-Mikhail.Terekhov@dell.com \
    --to=mikhail.terekhov@dell.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).