aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/event-top.c3
-rw-r--r--gdb/testsuite/gdb.base/eof-exit.exp2
2 files changed, 3 insertions, 2 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index b628f03..6261020 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -780,7 +780,8 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
we first print '\n' to move to the next line, and then print the
quit. This isn't ideal, but avoids corrupting the prompt. */
const char *value = rl_variable_value ("enable-bracketed-paste");
- if (value != nullptr && strcmp (value, "on") == 0)
+ if (value != nullptr && strcmp (value, "on") == 0
+ && ((rl_readline_version >> 8) & 0xff) > 0x07)
printf_unfiltered ("\n");
printf_unfiltered ("quit\n");
execute_command ("quit", 1);
diff --git a/gdb/testsuite/gdb.base/eof-exit.exp b/gdb/testsuite/gdb.base/eof-exit.exp
index 2d9530c..ad5f33d 100644
--- a/gdb/testsuite/gdb.base/eof-exit.exp
+++ b/gdb/testsuite/gdb.base/eof-exit.exp
@@ -49,7 +49,7 @@ proc run_test {} {
# line after the 'quit', this catches that case.
fail $gdb_test_name
}
- -re "$::gdb_prompt quit\[^\n\]*\r\n\[^\n\]*$" {
+ -re "$::gdb_prompt \[^\n\r\]*quit\[^\n\]*\r\n\[^\n\]*$" {
pass $gdb_test_name
}
eof {