1# Copyright 1999-2013 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# Test inferior console output, with MI. 17# 18# This test only works when talking to a target that routes its output 19# through GDB. Check that we're either talking to a simulator or a 20# remote target. 21 22load_lib mi-support.exp 23set MIFLAGS "-i=mi" 24 25gdb_exit 26if [mi_gdb_start separate-inferior-tty] { 27 continue 28} 29 30standard_testfile 31 32if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { 33 untested mi-console.exp 34 return -1 35} 36 37mi_run_to_main 38 39# Next over the hello() call which will produce lots of output 40mi_gdb_test "220-exec-next" \ 41 "220\\^running(\r\n\\*running,thread-id=\"all\")?" \ 42 "Testing console output" \ 43 "Hello \\\\\"!\[\r\n\]+" 44 45mi_expect_stop "end-stepping-range" "main" "" ".*mi-console.c" "14" "" \ 46 "finished step over hello" 47 48mi_gdb_exit 49return 0 50