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 if [target_info exists gdb,nosignals] { | 16 if [target_info exists gdb,nosignals] { |
17 verbose "Skipping sigall-precsave.exp because of nosignals." | 17 verbose "Skipping sigall-precsave.exp because of nosignals." |
18 return | 18 return |
19 } | 19 } |
20 | 20 |
21 if ![supports_reverse] { | 21 if ![supports_reverse] { |
22 return | 22 return |
23 } | 23 } |
24 | 24 |
25 if $tracelevel then { | |
26 strace $tracelevel | |
27 } | |
28 | |
29 | 25 |
30 gdb_exit | 26 gdb_exit |
31 gdb_start | 27 gdb_start |
32 gdb_reinitialize_dir $srcdir/$subdir | 28 gdb_reinitialize_dir $srcdir/$subdir |
33 | 29 |
34 set testfile sigall-precsave | 30 standard_testfile sigall-reverse.c |
35 set srcfile sigall-reverse.c | 31 set precsave [standard_output_file sigall.precsave] |
36 set binfile ${objdir}/${subdir}/${testfile} | 32 |
37 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 33 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { |
38 untested ${testfile}.exp | 34 return -1 |
39 return -1 | |
40 } | 35 } |
41 | 36 |
42 # Make the first signal SIGABRT because it is always supported. | 37 # Make the first signal SIGABRT because it is always supported. |
43 set sig_supported 1 | 38 set sig_supported 1 |
44 set thissig "ABRT" | 39 set thissig "ABRT" |
45 | 40 |
46 proc test_one_sig {nextsig} { | 41 proc test_one_sig {nextsig} { |
47 global sig_supported | 42 global sig_supported |
48 global gdb_prompt | 43 global gdb_prompt |
49 global thissig | 44 global thissig |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 set breakloc [gdb_get_line_number "end of main" "$srcfile"] | 177 set breakloc [gdb_get_line_number "end of main" "$srcfile"] |
183 gdb_test "break $breakloc" \ | 178 gdb_test "break $breakloc" \ |
184 "Breakpoint $decimal at .*/$srcfile, line $breakloc\." \ | 179 "Breakpoint $decimal at .*/$srcfile, line $breakloc\." \ |
185 "BP at end of main" | 180 "BP at end of main" |
186 | 181 |
187 # Signal handlers must be disabled | 182 # Signal handlers must be disabled |
188 gdb_test "handle all nostop noprint" | 183 gdb_test "handle all nostop noprint" |
189 | 184 |
190 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main" | 185 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main" |
191 | 186 |
192 gdb_test "record save sigall.precsave" \ | 187 gdb_test "record save $precsave" \ |
193 "Saved core file sigall.precsave with execution log\." \ | 188 "Saved core file $precsave with execution log\." \ |
194 "save process recfile" | 189 "save process recfile" |
195 | 190 |
196 gdb_test "kill" "" "Kill process, prepare to debug log file" \ | 191 gdb_test "kill" "" "Kill process, prepare to debug log file" \ |
197 "Kill the program being debugged\\? \\(y or n\\) " "y" | 192 "Kill the program being debugged\\? \\(y or n\\) " "y" |
198 | 193 |
199 gdb_test "record restore sigall.precsave" \ | 194 gdb_test "record restore $precsave" \ |
200 "Program terminated with signal .*" \ | 195 "Program terminated with signal .*" \ |
201 "reload precord save file" | 196 "reload precord save file" |
202 | 197 |
203 # Signal handlers must be re-enabled | 198 # Signal handlers must be re-enabled |
204 gdb_test "handle all stop print" | 199 gdb_test "handle all stop print" |
205 | 200 |
206 # test signal handling | 201 # test signal handling |
207 test_one_sig HUP | 202 test_one_sig HUP |
208 test_one_sig QUIT | 203 test_one_sig QUIT |
209 test_one_sig ILL | 204 test_one_sig ILL |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 test_one_sig 55 | 421 test_one_sig 55 |
427 test_one_sig 56 | 422 test_one_sig 56 |
428 test_one_sig 57 | 423 test_one_sig 57 |
429 test_one_sig 58 | 424 test_one_sig 58 |
430 test_one_sig 59 | 425 test_one_sig 59 |
431 test_one_sig 60 | 426 test_one_sig 60 |
432 test_one_sig 61 | 427 test_one_sig 61 |
433 test_one_sig 62 | 428 test_one_sig 62 |
434 test_one_sig 63 | 429 test_one_sig 63 |
435 test_one_sig TERM | 430 test_one_sig TERM |
OLD | NEW |