OLD | NEW |
1 # Copyright 2004-2012 Free Software Foundation, Inc. | 1 # Copyright 2004-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 | 16 |
17 # The program sigstep.c creates a very simple backtrace containing one | 17 # The program sigstep.c creates a very simple backtrace containing one |
18 # signal handler and signal trampoline. A flag is set and then the | 18 # signal handler and signal trampoline. A flag is set and then the |
19 # handler returns. This is repeated at infinitum. | 19 # handler returns. This is repeated at infinitum. |
20 | 20 |
21 # This test runs the program up to the signal handler, and then | 21 # This test runs the program up to the signal handler, and then |
22 # attempts to step/next out of the handler and back into main. | 22 # attempts to step/next out of the handler and back into main. |
23 | 23 |
24 if [target_info exists gdb,nosignals] { | 24 if [target_info exists gdb,nosignals] { |
25 verbose "Skipping sigstep.exp because of nosignals." | 25 verbose "Skipping sigstep.exp because of nosignals." |
26 continue | 26 continue |
27 } | 27 } |
28 | 28 |
29 if $tracelevel then { | |
30 strace $tracelevel | |
31 } | |
32 | |
33 | 29 |
34 set testfile sigstep | 30 set testfile sigstep |
35 set srcfile ${testfile}.c | 31 set srcfile ${testfile}.c |
36 set binfile ${objdir}/${subdir}/${testfile} | 32 set binfile ${objdir}/${subdir}/${testfile} |
37 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 33 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
38 untested "Couldn't compile ${srcfile}.c" | 34 untested "Couldn't compile ${srcfile}.c" |
39 return -1 | 35 return -1 |
40 } | 36 } |
41 | 37 |
42 # get things started | 38 # get things started |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 # Make the signal pending | 416 # Make the signal pending |
421 sleep 1 | 417 sleep 1 |
422 | 418 |
423 gdb_test "$i" "done = 0.*" "$prefix; performing $i" | 419 gdb_test "$i" "done = 0.*" "$prefix; performing $i" |
424 gdb_test "clear $infinite_loop" ".*" "$prefix; clear infinite loop" | 420 gdb_test "clear $infinite_loop" ".*" "$prefix; clear infinite loop" |
425 } | 421 } |
426 | 422 |
427 breakpoint_over_handler step | 423 breakpoint_over_handler step |
428 breakpoint_over_handler next | 424 breakpoint_over_handler next |
429 breakpoint_over_handler continue | 425 breakpoint_over_handler continue |
OLD | NEW |