| OLD | NEW |
| 1 # Copyright 2009-2012 Free Software Foundation, Inc. | 1 # Copyright 2009-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 # This file is part of the gdb testsuite. | 16 # This file is part of the gdb testsuite. |
| 17 | 17 |
| 18 if $tracelevel { | |
| 19 strace $tracelevel | |
| 20 } | |
| 21 | |
| 22 | 18 |
| 23 if ![istarget "i?86-*linux*"] then { | 19 if ![istarget "i?86-*linux*"] then { |
| 24 verbose "Skipping i387 reverse float tests." | 20 verbose "Skipping i387 reverse float tests." |
| 25 return | 21 return |
| 26 } | 22 } |
| 27 | 23 |
| 28 set testfile "i387-env-reverse" | 24 standard_testfile |
| 29 set srcfile ${testfile}.c | |
| 30 set binfile ${objdir}/${subdir}/${testfile} | |
| 31 | 25 |
| 32 # some targets have leading underscores on assembly symbols. | 26 # some targets have leading underscores on assembly symbols. |
| 33 set additional_flags [gdb_target_symbol_prefix_flags] | 27 set additional_flags [gdb_target_symbol_prefix_flags] |
| 34 | 28 |
| 35 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
debug $additional_flags]] != "" } { | 29 if {[prepare_for_testing $testfile.exp $testfile $srcfile \ |
| 36 untested ${testfile}.exp | 30 » [list debug $additional_flags]]} { |
| 37 return -1 | 31 return -1 |
| 38 } | 32 } |
| 39 | 33 |
| 40 # Get things started. | |
| 41 | |
| 42 gdb_exit | |
| 43 gdb_start | |
| 44 gdb_reinitialize_dir $srcdir/$subdir | |
| 45 gdb_load ${binfile} | |
| 46 runto main | 34 runto main |
| 47 | 35 |
| 48 # Record to end of main | 36 # Record to end of main |
| 49 | 37 |
| 50 set location [gdb_get_line_number "END I387-FLOAT-REVERSE"] | 38 set location [gdb_get_line_number "END I387-FLOAT-REVERSE"] |
| 51 gdb_test_no_output "record" "Turn on process record" | 39 gdb_test_no_output "record" "Turn on process record" |
| 52 # This can take awhile. | 40 # This can take awhile. |
| 53 set oldtimeout $timeout | 41 set oldtimeout $timeout |
| 54 set timeout [expr $oldtimeout + 120] | 42 set timeout [expr $oldtimeout + 120] |
| 55 gdb_test "until $location" ".*/$srcfile:$location.*" \ | 43 gdb_test "until $location" ".*/$srcfile:$location.*" \ |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 124 |
| 137 gdb_test "reverse-stepi" "asm.*fld1.*" "push st0" | 125 gdb_test "reverse-stepi" "asm.*fld1.*" "push st0" |
| 138 gdb_test "info register fstat" "fstat *0.*\t.*" "verify fstat == 0" | 126 gdb_test "info register fstat" "fstat *0.*\t.*" "verify fstat == 0" |
| 139 gdb_test "info register ftag" "ftag *0xffff.*\t.*" "verify ftag == 0xffff" | 127 gdb_test "info register ftag" "ftag *0xffff.*\t.*" "verify ftag == 0xffff" |
| 140 | 128 |
| 141 | 129 |
| 142 | 130 |
| 143 | 131 |
| 144 | 132 |
| 145 | 133 |
| OLD | NEW |