OLD | NEW |
1 # Copyright 2003-2005, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2003-2013 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 was created by Jeff Johnston. (jjohnstn@redhat.com) | 16 # This file was created by Jeff Johnston. (jjohnstn@redhat.com) |
17 | 17 |
18 # | 18 # |
19 # test running programs | 19 # test running programs |
20 # | 20 # |
21 | 21 |
22 if {[skip_shlib_tests]} { | 22 if {[skip_shlib_tests]} { |
23 return 0 | 23 return 0 |
24 } | 24 } |
25 | 25 |
26 set testfile "pending" | 26 standard_testfile .c |
27 set libfile "pendshr" | 27 set libfile "pendshr" |
28 set srcfile $testfile.c | |
29 set libsrc $srcdir/$subdir/$libfile.c | 28 set libsrc $srcdir/$subdir/$libfile.c |
30 set binfile $objdir/$subdir/$testfile | 29 set lib_sl [standard_output_file $libfile.sl] |
31 set lib_sl $objdir/$subdir/$libfile.sl | |
32 | 30 |
33 set lib_opts debug | 31 set lib_opts debug |
34 set exec_opts [list debug shlib=$lib_sl] | 32 set exec_opts [list debug shlib=$lib_sl] |
35 | 33 |
36 if [get_compiler_info] { | 34 if [get_compiler_info] { |
37 return -1 | 35 return -1 |
38 } | 36 } |
39 | 37 |
40 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != "" | 38 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != "" |
41 || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] !=
""} { | 39 || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] !=
""} { |
42 untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile." | 40 untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile." |
43 return -1 | 41 return -1 |
44 } | 42 } |
45 | 43 |
46 # Start with a fresh gdb. | 44 # Start with a fresh gdb. |
47 | 45 |
48 gdb_exit | 46 gdb_exit |
49 gdb_start | 47 gdb_start |
50 gdb_reinitialize_dir $srcdir/$subdir | 48 gdb_reinitialize_dir $srcdir/$subdir |
51 | 49 |
52 gdb_test_multiple "break pendfunc1" "set pending breakpoint" { | 50 gdb_test_multiple "break pendfunc1" "set pending breakpoint" { |
53 -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" { | 51 -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" { |
54 gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoi
nt (without symbols)" | 52 gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoi
nt (without symbols)" |
55 } | 53 } |
56 } | 54 } |
57 | 55 |
| 56 # Complete the condition (PR 15413). |
| 57 gdb_test "complete condition " "condition 1" |
| 58 |
58 gdb_test "info break" \ | 59 gdb_test "info break" \ |
59 "Num Type\[ \]+Disp Enb Address\[ \]+What.* | 60 "Num Type\[ \]+Disp Enb Address\[ \]+What.* |
60 \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*" \ | 61 \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*" \ |
61 "single pending breakpoint info (without symbols)" | 62 "single pending breakpoint info (without symbols)" |
62 | 63 |
63 gdb_load ${binfile} | 64 gdb_load ${binfile} |
64 gdb_load_shlibs $lib_sl | 65 gdb_load_shlibs $lib_sl |
65 | 66 |
66 set pendfunc1_loc [gdb_get_line_number "y = x + 4" ${libfile}.c] | 67 set pendfunc1_loc [gdb_get_line_number "y = x + 4" ${libfile}.c] |
67 | 68 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 # error messages are issued for the missing function | 270 # error messages are issued for the missing function |
270 # | 271 # |
271 | 272 |
272 rerun_to_main | 273 rerun_to_main |
273 | 274 |
274 gdb_test "info break" \ | 275 gdb_test "info break" \ |
275 "Num Type\[ \]+Disp Enb Address\[ \]+What.* | 276 "Num Type\[ \]+Disp Enb Address\[ \]+What.* |
276 \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* | 277 \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* |
277 \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*imaginary.*" \ | 278 \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*imaginary.*" \ |
278 "verify pending breakpoint after restart" | 279 "verify pending breakpoint after restart" |
OLD | NEW |