public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <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: Fri, 08 Apr 2022 13:17:26 +0000	[thread overview]
Message-ID: <bug-29032-4717-Ys6WAI4iK6@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 #11 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Andrew Burgess from comment #8)
> 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);
> 

FWIW, I've tested this, and ran into:
...
$ egrep '(UNRESOLVED|ERROR):' gdb.sum 
ERROR: : spawn id exp49 not open
UNRESOLVED: gdb.tui/basic.exp: scroll up
ERROR: : spawn id exp49 not open
UNRESOLVED: gdb.tui/basic.exp: scroll right
ERROR: : spawn id exp49 not open
UNRESOLVED: gdb.tui/basic.exp: scroll down
ERROR: : spawn id exp49 not open
UNRESOLVED: gdb.tui/basic.exp: asm window shows main
ERROR: : spawn id exp49 not open
UNRESOLVED: gdb.tui/basic.exp: split layout contents
ERROR: : spawn id exp49 not open
UNRESOLVED: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll
failed)
...

Specifically:
...
PASS: gdb.tui/basic.exp: list -q main
^[[14;13H^[[2;16H^[[36mMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
See the^[[3;13H   GNU General Public License for more
details.^[[4;13H^[[39m^[[0;10m^[[67X^[[5;16H^[[36mYou should have received a
copy of the GNU General Public Licens^[[6;13H   along with this program.  If
not, see
^[[34m<http://www.gnu.org/licens^[[7;13H^[[39m^[[0;10m^[[25X^[[B^[[32mint^[[39m^[[0;10m
^[[0;10;1m^[[30mmain^[[39m^[[0;10m ^[[31m()^[[39m^[[0;10m ^[[31m{^[[39m^[[0;10m
^[[0;10;1m^[[34mreturn^[[39m^[[0;10m ^[[35m0^[[31m;^[[39m^[[0;10m
^[[31m}^[[14;13H^[[39m^[[0;10m^[[2;10H2^[[B^[[D3^[[B^[[D4^[[B^[[D5^[[B^[[D6^[[B^[[D7^[[B^[[D8^[[9;9H19^[[B^[[D0^[[B^[[D1^[[B^[[D2^[[B^[[D3^[[B^[[D4
 ^M^[[18d^[[Jquit^M^[[B^[[24;1H^MERROR: : spawn id exp9 not open
...

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

  parent reply	other threads:[~2022-04-08 13:17 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
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 [this message]
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-Ys6WAI4iK6@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).