1 # Copyright 2016-2024 Free Software Foundation, Inc. 2 3 # This program is free software; you can redistribute it and/or modify 4 # it under the terms of the GNU General Public License as published by 5 # the Free Software Foundation; either version 3 of the License, or 6 # (at your option) any later version. 7 # 8 # This program is distributed in the hope that it will be useful, 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # GNU General Public License for more details. 12 # 13 # You should have received a copy of the GNU General Public License 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 16 # Regression test for PR mi/20034. Trying to turn on "set editing" 17 # when the top-level interpreter is MI would result in GDB/readline 18 # aborting with: 19 # 20 # readline: readline_callback_read_char() called with no handler! 21 # Aborted (core dumped) 22 23 load_lib mi-support.exp 24 set MIFLAGS "-i=mi" 25 26 if {[mi_clean_restart]} { 27 return 28 } 29 30 mi_gdb_test "-interpreter-exec console \"set editing on\"" \ 31 {=cmd-param-changed,param=\"editing\",.*\^done} \ 32 "-interpreter-exec console \"set editing on\"" 33 34 mi_gdb_test "-interpreter-exec console \"show editing\"" \ 35 ".*Editing of command lines as they are typed is off.*" \ 36 "-interpreter-exec console \"show editing\"" 37