1258057Sbr# Copyright 2013-2020 Free Software Foundation, Inc. 2258057Sbr 3258057Sbr# This program is free software; you can redistribute it and/or modify 4258057Sbr# it under the terms of the GNU General Public License as published by 5258057Sbr# the Free Software Foundation; either version 3 of the License, or 6258057Sbr# (at your option) any later version. 7258057Sbr# 8258057Sbr# This program is distributed in the hope that it will be useful, 9258057Sbr# but WITHOUT ANY WARRANTY; without even the implied warranty of 10258057Sbr# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11258057Sbr# GNU General Public License for more details. 12258057Sbr# 13258057Sbr# You should have received a copy of the GNU General Public License 14258057Sbr# along with this program. If not, see <http://www.gnu.org/licenses/>. 15258057Sbr 16258057Sbrload_lib mi-support.exp 17258057Sbrset MIFLAGS "-i=mi" 18258057Sbr 19258057Sbrgdb_exit 20258057Sbrif [mi_gdb_start] { 21258057Sbr continue 22258057Sbr} 23258057Sbr 24258057Sbr# First, verify that the debugger correctly advertises support 25258057Sbr# for the -info-gdb-mi-command command. 26258057Sbrmi_gdb_test "-list-features" \ 27258057Sbr "\\^done,features=\\\[.*\"info-gdb-mi-command\".*\\\]" \ 28258057Sbr "-list-features includes \"info-gdb-mi-command\"" 29258057Sbr 30258057Sbrmi_gdb_test "-info-gdb-mi-command unsupported-command" \ 31258057Sbr "\\^done,command=\\\{exists=\"false\"\\\}" \ 32258057Sbr "-info-gdb-mi-command unsupported-command" 33258057Sbr 34258057Sbr# Same test as above, but including the leading '-' in the command name. 35258057Sbrmi_gdb_test "-info-gdb-mi-command -unsupported-command" \ 36258057Sbr "\\^done,command=\\\{exists=\"false\"\\\}" \ 37258057Sbr "-info-gdb-mi-command -unsupported-command" 38258057Sbr 39258057Sbrmi_gdb_test "-info-gdb-mi-command symbol-list-lines" \ 40258057Sbr "\\^done,command=\\\{exists=\"true\"\\\}" \ 41258057Sbr "-info-gdb-mi-command symbol-list-lines" 42258057Sbr 43258057Sbr# Same test as above, but including the leading '-' in the command name. 44258057Sbrmi_gdb_test "-info-gdb-mi-command -symbol-list-lines" \ 45258057Sbr "\\^done,command=\\\{exists=\"true\"\\\}" \ 46258057Sbr "-info-gdb-mi-command -symbol-list-lines" 47258057Sbr