| OLD | NEW |
| 1 # Copyright 2002-2005, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2002-2005, 2007-2012 Free Software Foundation, Inc. |
| 2 | 2 |
| 3 # This program is free software; you can redistribute it and/or modify | 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 | 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 | 5 # the Free Software Foundation; either version 3 of the License, or |
| 6 # (at your option) any later version. | 6 # (at your option) any later version. |
| 7 # | 7 # |
| 8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
| 12 # | 12 # |
| 13 # You should have received a copy of the GNU General Public License | 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/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | 15 |
| 16 # This file tests that GDB's console can be accessed via the MI. | 16 # This file tests that GDB's console can be accessed via the MI. |
| 17 # Specifically, we are testing the "interpreter-exec" command and that | 17 # Specifically, we are testing the "interpreter-exec" command and that |
| 18 # the commands that are executed via this command are properly executed. | 18 # the commands that are executed via this command are properly executed. |
| 19 # Console commands executed via MI should use MI output wrappers, MI event | 19 # Console commands executed via MI should use MI output wrappers, MI event |
| 20 # handlers, etc. | 20 # handlers, etc. |
| 21 | 21 |
| 22 load_lib mi-support.exp | 22 load_lib mi-support.exp |
| 23 set MIFLAGS "-i=mi" | 23 set MIFLAGS "-i=mi" |
| 24 | 24 |
| 25 gdb_exit | 25 gdb_exit |
| 26 if [mi_gdb_start] { | 26 if [mi_gdb_start] { |
| 27 continue | 27 continue |
| 28 } | 28 } |
| 29 | 29 |
| 30 set testfile "basics" | 30 standard_testfile basics.c |
| 31 set srcfile ${testfile}.c | 31 |
| 32 set binfile ${objdir}/${subdir}/mi-cli | 32 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
| 33 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug additional_flags=-DFAKEARGV}] != "" } { | |
| 34 untested mi-cli.exp | 33 untested mi-cli.exp |
| 35 return -1 | 34 return -1 |
| 36 } | 35 } |
| 37 | 36 |
| 38 mi_gdb_test "-interpreter-exec" \ | 37 mi_gdb_test "-interpreter-exec" \ |
| 39 {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \ | 38 {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \ |
| 40 "-interpreter-exec with no arguments" | 39 "-interpreter-exec with no arguments" |
| 41 | 40 |
| 42 mi_gdb_test "-interpreter-exec console" \ | 41 mi_gdb_test "-interpreter-exec console" \ |
| 43 {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \ | 42 {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \ |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 mi_gdb_test "888-interpreter-exec console \"set \$pc=0x0\"" \ | 206 mi_gdb_test "888-interpreter-exec console \"set \$pc=0x0\"" \ |
| 208 {888\^done} \ | 207 {888\^done} \ |
| 209 "-interpreter-exec console \"set \$pc=0x0\"" | 208 "-interpreter-exec console \"set \$pc=0x0\"" |
| 210 | 209 |
| 211 #mi_gdb_test "-interpreter-exec console \"\"" \ | 210 #mi_gdb_test "-interpreter-exec console \"\"" \ |
| 212 {} \ | 211 {} \ |
| 213 "-interpreter-exec console \"\"" | 212 "-interpreter-exec console \"\"" |
| 214 | 213 |
| 215 mi_gdb_exit | 214 mi_gdb_exit |
| 216 return 0 | 215 return 0 |
| OLD | NEW |