mi-fill-memory.exp revision 1.1
1# Copyright (C) 2012-2014 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# 17# added for testing the -data-write-memory-bytes MI command enhancements 18# 19 20load_lib mi-support.exp 21set MIFLAGS "-i=mi" 22 23gdb_exit 24if [mi_gdb_start] { 25 continue 26} 27 28standard_testfile "mi-read-memory" 29 30if { [gdb_compile "${srcdir}/${subdir}/${srcfile}.c" "${binfile}" executable {debug}] != "" } { 31 untested mi-fill-memory.exp 32 return -1 33} 34 35mi_run_to_main 36mi_next_to "main" "" "mi-read-memory.c" "20" "next at main" 37 38mi_gdb_test "1-data-write-memory-bytes"\ 39 "1\\\^error,msg=\"Usage: ADDR DATA \\\[COUNT\\\]\.\""\ 40 "no arguments" 41 42mi_gdb_test "2-data-write-memory-bytes 8"\ 43 "2\\\^error,msg=\"Usage: ADDR DATA \\\[COUNT\\\]\.\""\ 44 "one argument missing" 45 46mi_gdb_test "3-data-write-memory-bytes \$pc ab"\ 47 "3\\\^done" \ 48 "memory successfully written" 49 50mi_gdb_test "4-data-write-memory-bytes \$pc ab 8"\ 51 "4\\\^done" \ 52 "memory successfully filled (8 bytes)" 53 54mi_gdb_test "5-interpreter-exec console \"x \$pc\"" \ 55 ".*0xabababab.*" \ 56 "pattern correctly read from memory" 57 58mi_gdb_exit 59