2007-02-26 20:10:18 +00:00
|
|
|
# This testcase is part of GDB, the GNU debugger.
|
|
|
|
|
2012-01-04 08:28:28 +00:00
|
|
|
# Copyright 2007-2012 Free Software Foundation, Inc.
|
2007-02-26 20:10:18 +00:00
|
|
|
|
|
|
|
# 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
|
2007-08-23 18:14:19 +00:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2007-02-26 20:10:18 +00:00
|
|
|
# (at your option) any later version.
|
2007-08-23 18:14:19 +00:00
|
|
|
#
|
2007-02-26 20:10:18 +00:00
|
|
|
# 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.
|
2007-08-23 18:14:19 +00:00
|
|
|
#
|
2007-02-26 20:10:18 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-08-23 18:14:19 +00:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2007-02-26 20:10:18 +00:00
|
|
|
|
|
|
|
# Test gdbserver monitor commands.
|
|
|
|
|
|
|
|
load_lib gdbserver-support.exp
|
|
|
|
|
2012-06-25 19:46:26 +00:00
|
|
|
standard_testfile server.c
|
2007-02-26 20:10:18 +00:00
|
|
|
|
|
|
|
if { [skip_gdbserver_tests] } {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2012-06-25 19:46:26 +00:00
|
|
|
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
2007-02-26 20:10:18 +00:00
|
|
|
return -1
|
|
|
|
}
|
|
|
|
|
2012-02-15 12:51:17 +00:00
|
|
|
# Make sure we're disconnected, in case we're testing with an
|
|
|
|
# extended-remote board, therefore already connected.
|
|
|
|
gdb_test "disconnect" ".*"
|
|
|
|
|
2007-03-27 17:59:38 +00:00
|
|
|
gdbserver_run ""
|
|
|
|
|
2010-06-10 19:48:20 +00:00
|
|
|
gdb_test_multiple "monitor help" "monitor help" {
|
2007-02-26 20:10:18 +00:00
|
|
|
-re "Unknown monitor command.*$gdb_prompt $" {
|
|
|
|
fail "monitor help"
|
|
|
|
}
|
|
|
|
-re "The following monitor commands.*$gdb_prompt $" {
|
|
|
|
pass "monitor help"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
gdb_test "monitor" "Unknown monitor command.*Protocol error.*"
|
|
|
|
|
|
|
|
gdb_test "monitor set debug 1" "Debug output enabled\\."
|
|
|
|
gdb_test "monitor set debug 0" "Debug output disabled\\."
|
|
|
|
gdb_test "monitor set remote-debug 1" "Protocol debug output enabled\\."
|
|
|
|
gdb_test "monitor set remote-debug 0" "Protocol debug output disabled\\."
|