diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-03-14 07:58:01 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-03-14 07:58:01 +0000 |
commit | da6ec63a13ac3cd2cf6b8a8ea7e59ea1ee4f6cb9 (patch) | |
tree | 79bbd8dd4770d7556eea557986e49e80eadd08c8 /gdb/testsuite/gdb.mi | |
parent | 0067cc7c1ad992da92f1a4e8568c6e7990f5c6e4 (diff) | |
download | gdb-da6ec63a13ac3cd2cf6b8a8ea7e59ea1ee4f6cb9.tar.gz |
gdb/
Fix double prompt of 'interpreter-exec mi'.
* mi/mi-interp.c (mi_execute_command_input_handler): New prototype.
(mi_interpreter_resume): use it.
(mi_execute_command_input_handler): New function.
* mi/mi-main.c (mi_execute_command): Move prompt printing to
mi_execute_command_input_handler.
gdb/testsuite/
* gdb.mi/mi2-prompt.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi2-prompt.exp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/mi2-prompt.exp b/gdb/testsuite/gdb.mi/mi2-prompt.exp new file mode 100644 index 00000000000..6145c38fc1b --- /dev/null +++ b/gdb/testsuite/gdb.mi/mi2-prompt.exp @@ -0,0 +1,38 @@ +# Copyright 2011 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +load_lib mi-support.exp +set MIFLAGS "-i=mi2" + +gdb_exit +if [mi_gdb_start] { + continue +} + +# Check console 'set prompt' does not affect the MI output. + +mi_gdb_test {-interpreter-exec console "set prompt (banana) "} {\^done} \ + "console set prompt" +mi_gdb_test "-break-list" ".*}" "-break-list" + +gdb_exit +gdb_start + +# Check 'set prompt' affects console output even for "interpreter-exec mi". + +set gdb_prompt {\(banana\)} +gdb_test_no_output "set prompt (banana) " + +gdb_test "interpreter-exec mi -break-list" "\r\n\\^done,.*}" |