| OLD | NEW |
| 1 # Copyright 2010-2012 Free Software Foundation, Inc. | 1 # Copyright 2010-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 # Tests for permissions and observer mode. | 16 # Tests for permissions and observer mode. |
| 17 | 17 |
| 18 # The permissions flags are only fully functional with stubs or targets | 18 # The permissions flags are only fully functional with stubs or targets |
| 19 # that can run asynchronously. | 19 # that can run asynchronously. |
| 20 | 20 |
| 21 set testfile permission | 21 set testfile permission |
| 22 set srcfile start.c | 22 set srcfile start.c |
| 23 set binfile ${objdir}/${subdir}/${testfile} | 23 set binfile ${objdir}/${subdir}/${testfile} |
| 24 | 24 |
| 25 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug nowarnings}] != "" } { | 25 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug nowarnings}] != "" } { |
| 26 untested permissions.exp | 26 untested permissions.exp |
| 27 return -1 | 27 return -1 |
| 28 } | 28 } |
| 29 | 29 |
| 30 if [get_compiler_info $binfile] { | 30 if [get_compiler_info] { |
| 31 return -1 | 31 return -1 |
| 32 } | 32 } |
| 33 | 33 |
| 34 gdb_exit | 34 gdb_exit |
| 35 gdb_start | 35 gdb_start |
| 36 gdb_reinitialize_dir $srcdir/$subdir | 36 gdb_reinitialize_dir $srcdir/$subdir |
| 37 | 37 |
| 38 gdb_test "show may-write-registers" \ | 38 gdb_test "show may-write-registers" \ |
| 39 "Permission to write into registers is on." | 39 "Permission to write into registers is on." |
| 40 | 40 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 gdb_test "set may-write-memory off" | 93 gdb_test "set may-write-memory off" |
| 94 | 94 |
| 95 gdb_test "print x = 92" "Writing to memory is not allowed.*" \ | 95 gdb_test "print x = 92" "Writing to memory is not allowed.*" \ |
| 96 "try to set a global" | 96 "try to set a global" |
| 97 | 97 |
| 98 gdb_test "print x" "$decimal = 45" | 98 gdb_test "print x" "$decimal = 45" |
| 99 | 99 |
| 100 # FIXME Add tests for other flags when a testsuite-able target becomes | 100 # FIXME Add tests for other flags when a testsuite-able target becomes |
| 101 # available. | 101 # available. |
| OLD | NEW |