From: Tom Tromey <tromey@adacore.com>
To: Simon Marchi <simark@simark.ca>
Cc: "Tom Tromey" <tromey@adacore.com>,
gdb-patches@sourceware.org,
"Kévin Le Gouguec" <legouguec@adacore.com>
Subject: Re: [PP?] [PATCH] Strip trailing newlines from input string
Date: Mon, 15 Apr 2024 12:28:31 -0600 [thread overview]
Message-ID: <87wmoy1nw0.fsf@tromey.com> (raw)
In-Reply-To: <67ad3a03-2904-4bdd-b297-91c0ecd6fa4b@simark.ca> (Simon Marchi's message of "Mon, 15 Apr 2024 14:21:07 -0400")
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> 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>
Simon> This caused a regression when quitting gdb with ctrl-D:
Simon> $ ./gdb -nx -q --data-directory=data-directory
Simon> (gdb) quit <--- hit ctrl-D
Simon> /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
Simon> Here, I have UBSan (I think?) that prints me a nice message, but
Simon> otherwise it segfaults.
Simon> I think this is caught by gdb.base/eof-exit.exp, I now see this test
Simon> failing on my CI.
Huh, I see it too.
I'll fix this, sorry about the breakage.
Tom
prev parent reply other threads:[~2024-04-15 18:28 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 ` [PP?] " Simon Marchi
2024-04-15 18:28 ` Tom Tromey [this message]
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=87wmoy1nw0.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=legouguec@adacore.com \
--cc=simark@simark.ca \
/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).