| OLD | NEW |
| 1 # Copyright 1998-1999, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1998-1999, 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 if $tracelevel then { | |
| 17 strace $tracelevel | |
| 18 } | |
| 19 | |
| 20 | 16 |
| 21 clear_xfail "*-*-*" | 17 clear_xfail "*-*-*" |
| 22 | 18 |
| 23 set testfile "jump" | 19 set testfile "jump" |
| 24 set srcfile ${testfile}.c | 20 set srcfile ${testfile}.c |
| 25 set binfile ${objdir}/${subdir}/${testfile} | 21 set binfile ${objdir}/${subdir}/${testfile} |
| 26 | 22 |
| 27 # Build the test case | 23 # Build the test case |
| 28 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug nowarnings}] != "" } { | 24 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug nowarnings}] != "" } { |
| 29 untested jump.exp | 25 untested jump.exp |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 # an argument. | 85 # an argument. |
| 90 # | 86 # |
| 91 gdb_test "jump" "Argument required .starting address.*" \ | 87 gdb_test "jump" "Argument required .starting address.*" \ |
| 92 "jump without argument disallowed" | 88 "jump without argument disallowed" |
| 93 | 89 |
| 94 | 90 |
| 95 # Verify that GDB responds gracefully to the "jump" command with | 91 # Verify that GDB responds gracefully to the "jump" command with |
| 96 # trailing junk. | 92 # trailing junk. |
| 97 # | 93 # |
| 98 gdb_test "jump 21 100" \ | 94 gdb_test "jump 21 100" \ |
| 99 "Junk at end of line specification: 100.*" \ | 95 "malformed linespec error: unexpected number, \"100\"" \ |
| 100 "jump with trailing argument junk" | 96 "jump with trailing argument junk" |
| 101 | 97 |
| 102 | 98 |
| 103 # Verify that GDB responds gracefully to a request to jump out of | 99 # Verify that GDB responds gracefully to a request to jump out of |
| 104 # the current function. (Note that this will very likely cause the | 100 # the current function. (Note that this will very likely cause the |
| 105 # inferior to die. Be prepared to rerun the inferior, if further | 101 # inferior to die. Be prepared to rerun the inferior, if further |
| 106 # testing is desired.) | 102 # testing is desired.) |
| 107 # | 103 # |
| 108 # Try it both ways: confirming and not confirming the jump. | 104 # Try it both ways: confirming and not confirming the jump. |
| 109 # | 105 # |
| 110 | 106 |
| 111 gdb_test "jump 12" \ | 107 gdb_test "jump 12" \ |
| 112 "Not confirmed.*" \ | 108 "Not confirmed.*" \ |
| 113 "aborted jump out of current function" \ | 109 "aborted jump out of current function" \ |
| 114 "Line 12 is not in `main'. Jump anyway.*y or n. $" \ | 110 "Line 12 is not in `main'. Jump anyway.*y or n. $" \ |
| 115 "n" | 111 "n" |
| 116 | 112 |
| 117 gdb_test "jump 12" \ | 113 gdb_test "jump 12" \ |
| 118 "Continuing at.*" \ | 114 "Continuing at.*" \ |
| 119 "jump out of current function" \ | 115 "jump out of current function" \ |
| 120 "Line 12 is not in `main'. Jump anyway.*y or n. $" \ | 116 "Line 12 is not in `main'. Jump anyway.*y or n. $" \ |
| 121 "y" | 117 "y" |
| 122 | 118 |
| 123 gdb_exit | 119 gdb_exit |
| 124 return 0 | 120 return 0 |
| OLD | NEW |