public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "aburgess at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29032] [gdb][test-case failure, taskset] FAIL: gdb.base/eof-exit.exp: with non-dump terminal: close GDB with eof (timeout)
Date: Thu, 07 Apr 2022 12:44:33 +0000	[thread overview]
Message-ID: <bug-29032-4717-5ndtdHAX9A@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29032-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29032

--- Comment #8 from Andrew Burgess <aburgess at redhat dot com> ---
This also feels like an issue with readline's callback api.  I wonder if we
should (in parallel) be reporting this issue upstream?

Pretty much untested, this patch seems to "fix" readline:

diff --git a/readline/readline/readline.c b/readline/readline/readline.c
index e61d188bbe9..1306ac7873d 100644
--- a/readline/readline/readline.c
+++ b/readline/readline/readline.c
@@ -630,7 +630,7 @@ readline_internal_charloop (void)
         previous character is interpreted as EOF.  This doesn't work when
         READLINE_CALLBACKS is defined, so hitting a series of ^Ds will
         erase all the chars on the line and then return EOF. */
-      if (((c == _rl_eof_char && lastc != c) || c == EOF) && rl_end == 0)
+      if (((c == _rl_eof_char && lastc != c) || c == EOF || c == 0) && rl_end
== 0)
        {
 #if defined (READLINE_CALLBACKS)
          RL_SETSTATE(RL_STATE_DONE);


But I understand that we might want a solution in GDB (as well) that doesn't
tie us to a particular readline release.  I happy to take this to the readline
list, but I'd value your thoughts before I did.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-04-07 12:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 11:36 [Bug gdb/29032] New: " vries at gcc dot gnu.org
2022-04-06 11:36 ` [Bug gdb/29032] " vries at gcc dot gnu.org
2022-04-06 11:41 ` vries at gcc dot gnu.org
2022-04-07  8:02 ` vries at gcc dot gnu.org
2022-04-07  9:10 ` vries at gcc dot gnu.org
2022-04-07 10:00 ` vries at gcc dot gnu.org
2022-04-07 10:08 ` vries at gcc dot gnu.org
2022-04-07 10:32 ` vries at gcc dot gnu.org
2022-04-07 11:56 ` vries at gcc dot gnu.org
2022-04-07 12:44 ` aburgess at redhat dot com [this message]
2022-04-07 13:18 ` vries at gcc dot gnu.org
2022-04-07 14:44 ` vries at gcc dot gnu.org
2022-04-08 13:17 ` vries at gcc dot gnu.org
2022-04-08 15:37 ` vries at gcc dot gnu.org
2022-05-09 14:01 ` cvs-commit at gcc dot gnu.org
2022-05-25  8:20 ` [Bug gdb/29032] [gdb] ^D while not at prompt doesn't trigger quit vries at gcc dot gnu.org

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=bug-29032-4717-5ndtdHAX9A@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).