| OLD | NEW |
| 1 # Copyright 1997-1999, 2003-2004, 2007-2012 Free Software Foundation, | 1 # Copyright 1997-1999, 2003-2004, 2007-2012 Free Software Foundation, |
| 2 # Inc. | 2 # Inc. |
| 3 | 3 |
| 4 # This program is free software; you can redistribute it and/or modify | 4 # This program is free software; you can redistribute it and/or modify |
| 5 # it under the terms of the GNU General Public License as published by | 5 # it under the terms of the GNU General Public License as published by |
| 6 # the Free Software Foundation; either version 3 of the License, or | 6 # the Free Software Foundation; either version 3 of the License, or |
| 7 # (at your option) any later version. | 7 # (at your option) any later version. |
| 8 # | 8 # |
| 9 # This program is distributed in the hope that it will be useful, | 9 # This program is distributed in the hope that it will be useful, |
| 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 # GNU General Public License for more details. | 12 # GNU General Public License for more details. |
| 13 # | 13 # |
| 14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
| 15 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | 16 |
| 17 if [target_info exists gdb,nosignals] { | 17 if [target_info exists gdb,nosignals] { |
| 18 verbose "Skipping signals.exp because of nosignals." | 18 verbose "Skipping signals.exp because of nosignals." |
| 19 continue | 19 continue |
| 20 } | 20 } |
| 21 | 21 |
| 22 if $tracelevel then { | |
| 23 strace $tracelevel | |
| 24 } | |
| 25 | |
| 26 | 22 |
| 27 set testfile signals | 23 set testfile signals |
| 28 set srcfile ${testfile}.c | 24 set srcfile ${testfile}.c |
| 29 set binfile ${objdir}/${subdir}/${testfile} | 25 set binfile ${objdir}/${subdir}/${testfile} |
| 30 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 26 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
| 31 untested signals.exp | 27 untested signals.exp |
| 32 return -1 | 28 return -1 |
| 33 } | 29 } |
| 34 | 30 |
| 35 # Create and source the file that provides information about the compiler | 31 # Create and source the file that provides information about the compiler |
| 36 # used to compile the test case. | 32 # used to compile the test case. |
| 37 if [get_compiler_info ${binfile}] { | 33 if [get_compiler_info] { |
| 38 return -1; | 34 return -1; |
| 39 } | 35 } |
| 40 | 36 |
| 41 if {$hp_cc_compiler} { | 37 if {$hp_cc_compiler} { |
| 42 set void 0 | 38 set void 0 |
| 43 } else { | 39 } else { |
| 44 set void void | 40 set void void |
| 45 } | 41 } |
| 46 | 42 |
| 47 gdb_exit | 43 gdb_exit |
| 48 gdb_start | 44 gdb_start |
| 49 | 45 |
| 50 # This will need to be updated as the exact list of signals changes, | 46 # This will need to be updated as the exact list of signals changes, |
| 51 # but I want to test that TARGET_SIGNAL_0, TARGET_SIGNAL_DEFAULT, and | 47 # but I want to test that GDB_SIGNAL_0, GDB_SIGNAL_DEFAULT, and |
| 52 # TARGET_SIGNAL_UNKNOWN are skipped. | 48 # GDB_SIGNAL_UNKNOWN are skipped. |
| 53 | 49 |
| 54 proc test_handle_all_print {} { | 50 proc test_handle_all_print {} { |
| 55 global timeout | 51 global timeout |
| 56 # Increase timeout and expect input buffer for large output from gdb. | 52 # Increase timeout and expect input buffer for large output from gdb. |
| 57 # Allow blank or TAB as whitespace characters. | 53 # Allow blank or TAB as whitespace characters. |
| 58 set oldtimeout $timeout | 54 set oldtimeout $timeout |
| 59 set timeout [expr "$timeout + 60"] | 55 set timeout [expr "$timeout + 60"] |
| 60 verbose "Timeout is now $timeout seconds" 2 | 56 verbose "Timeout is now $timeout seconds" 2 |
| 61 if { ![istarget "*-*-linux*"] | 57 if { ![istarget "*-*-linux*"] |
| 62 && ( [istarget "*-*-gnu*"] | 58 && ( [istarget "*-*-gnu*"] |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 # the inferior. (This probably causes the inferior to run away. | 271 # the inferior. (This probably causes the inferior to run away. |
| 276 # Be prepared to rerun to main for further testing.) | 272 # Be prepared to rerun to main for further testing.) |
| 277 | 273 |
| 278 gdb_test "signal SIGUSR1" "Breakpoint.*handler.*" | 274 gdb_test "signal SIGUSR1" "Breakpoint.*handler.*" |
| 279 gdb_test "bt" \ | 275 gdb_test "bt" \ |
| 280 "#0 handler .*#1 .signal handler called.*\#2 .*main.*" \ | 276 "#0 handler .*#1 .signal handler called.*\#2 .*main.*" \ |
| 281 "backtrace for SIGUSR1" | 277 "backtrace for SIGUSR1" |
| 282 } | 278 } |
| 283 | 279 |
| 284 return 0 | 280 return 0 |
| OLD | NEW |