Commit bdcd50f9 authored by Tom Tromey's avatar Tom Tromey
Browse files

Strip trailing newlines from input string



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: default avatarKévin Le Gouguec <legouguec@adacore.com>
Approved-By: default avatarLuis Machado <luis.machado@arm.com>
Tested-By: default avatarLuis Machado <luis.machado@arm.com>
parent 34d5ac92
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment