OLD | NEW |
1 # Copyright 1997, 1999, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1997, 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 { [is_remote target] || ![isnative] } then { | 16 if { [is_remote target] || ![isnative] } then { |
17 continue | 17 continue |
18 } | 18 } |
19 | 19 |
| 20 # Until "catch exec" is implemented on other targets... |
| 21 # |
| 22 if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then { |
| 23 continue |
| 24 } |
20 | 25 |
21 set testfile "foll-exec" | 26 set testfile "foll-exec" |
22 set testfile2 "execd-prog" | 27 set testfile2 "execd-prog" |
23 set srcfile ${testfile}.c | 28 set srcfile ${testfile}.c |
24 set srcfile2 ${testfile2}.c | 29 set srcfile2 ${testfile2}.c |
25 set binfile ${objdir}/${subdir}/${testfile} | 30 set binfile ${objdir}/${subdir}/${testfile} |
26 set binfile2 ${objdir}/${subdir}/${testfile2} | 31 set binfile2 ${objdir}/${subdir}/${testfile2} |
27 | 32 |
28 # build the first test case | 33 # build the first test case |
29 if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {d
ebug}] != "" } { | 34 if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {d
ebug}] != "" } { |
30 untested foll-exec.exp | 35 untested foll-exec.exp |
31 return -1 | 36 return -1 |
32 } | 37 } |
33 | 38 |
34 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 39 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
35 untested foll-exec.exp | 40 untested foll-exec.exp |
36 return -1 | 41 return -1 |
37 } | 42 } |
38 | 43 |
39 | |
40 # Until "catch exec" is implemented on other targets... | |
41 # | |
42 if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then { | |
43 continue | |
44 } | |
45 | |
46 proc zap_session {} { | 44 proc zap_session {} { |
47 global gdb_prompt | 45 global gdb_prompt |
48 global binfile | 46 global binfile |
49 | 47 |
50 send_gdb "kill\n" | 48 send_gdb "kill\n" |
51 gdb_expect { | 49 gdb_expect { |
52 -re ".*Kill the program being debugged.*y or n. $" { | 50 -re ".*Kill the program being debugged.*y or n. $" { |
53 gdb_test_no_output "y" "" | 51 gdb_test_no_output "y" "" |
54 send_gdb "file $binfile\n" | 52 send_gdb "file $binfile\n" |
55 gdb_expect { | 53 gdb_expect { |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 gdb_reinitialize_dir $srcdir/$subdir | 404 gdb_reinitialize_dir $srcdir/$subdir |
407 gdb_load ${binfile} | 405 gdb_load ${binfile} |
408 | 406 |
409 | 407 |
410 # This is a test of gdb's ability to follow a process through a | 408 # This is a test of gdb's ability to follow a process through a |
411 # Unix exec() system call. | 409 # Unix exec() system call. |
412 # | 410 # |
413 do_exec_tests | 411 do_exec_tests |
414 | 412 |
415 return 0 | 413 return 0 |
OLD | NEW |