From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Cc: "Kévin Le Gouguec" <legouguec@adacore.com>
Subject: Re: [PP?] [PATCH] Strip trailing newlines from input string
Date: Mon, 15 Apr 2024 14:21:07 -0400 [thread overview]
Message-ID: <67ad3a03-2904-4bdd-b297-91c0ecd6fa4b@simark.ca> (raw)
In-Reply-To: <20240408171818.1856529-1-tromey@adacore.com>
On 4/8/24 1:18 PM, Tom Tromey wrote:
> A co-worker noticed a strange situation where "target remote" would
> fail due to a trailing newline in the address part of the command.
> Eventually he tracked this down to the fact that he was pasting the
> command into the terminal, and due to bracketed paste mode, the
> newline was being preserved by readline.
>
> It seems to me that we basically never want a trailing newline on a
> gdb command, so this patch removes it when handling the readline
> result.
>
> Co-Authored-By: Kévin Le Gouguec <legouguec@adacore.com>
This caused a regression when quitting gdb with ctrl-D:
$ ./gdb -nx -q --data-directory=data-directory
(gdb) quit <--- hit ctrl-D
/home/smarchi/src/binutils-gdb/gdb/event-top.c:257:23: runtime error: null pointer passed as argument 1, which is declared to never be null
Here, I have UBSan (I think?) that prints me a nice message, but
otherwise it segfaults.
I think this is caught by gdb.base/eof-exit.exp, I now see this test
failing on my CI.
Simon
next prev parent reply other threads:[~2024-04-15 18:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 17:18 Tom Tromey
2024-04-09 22:36 ` Luis Machado
2024-04-11 13:45 ` Tom Tromey
2024-04-11 14:45 ` Luis Machado
2024-04-11 16:17 ` Thiago Jung Bauermann
2024-04-15 15:04 ` Tom Tromey
2024-04-15 18:21 ` Simon Marchi [this message]
2024-04-15 18:28 ` [PP?] " Tom Tromey
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=67ad3a03-2904-4bdd-b297-91c0ecd6fa4b@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=legouguec@adacore.com \
--cc=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).