| OLD | NEW |
| 1 # Copyright 2003-2005, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2003-2005, 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 # This file was created by Jeff Johnston. (jjohnstn@redhat.com) | 16 # This file was created by Jeff Johnston. (jjohnstn@redhat.com) |
| 17 | 17 |
| 18 if $tracelevel then { | |
| 19 strace $tracelevel | |
| 20 } | |
| 21 | |
| 22 # | 18 # |
| 23 # test running programs | 19 # test running programs |
| 24 # | 20 # |
| 25 | 21 |
| 26 if {[skip_shlib_tests]} { | 22 if {[skip_shlib_tests]} { |
| 27 return 0 | 23 return 0 |
| 28 } | 24 } |
| 29 | 25 |
| 30 set testfile "pending" | 26 set testfile "pending" |
| 31 set libfile "pendshr" | 27 set libfile "pendshr" |
| 32 set srcfile $testfile.c | 28 set srcfile $testfile.c |
| 33 set libsrc $srcdir/$subdir/$libfile.c | 29 set libsrc $srcdir/$subdir/$libfile.c |
| 34 set binfile $objdir/$subdir/$testfile | 30 set binfile $objdir/$subdir/$testfile |
| 35 set lib_sl $objdir/$subdir/$libfile.sl | 31 set lib_sl $objdir/$subdir/$libfile.sl |
| 36 | 32 |
| 37 set lib_opts debug | 33 set lib_opts debug |
| 38 set exec_opts [list debug shlib=$lib_sl] | 34 set exec_opts [list debug shlib=$lib_sl] |
| 39 | 35 |
| 40 if [get_compiler_info ${binfile}] { | 36 if [get_compiler_info] { |
| 41 return -1 | 37 return -1 |
| 42 } | 38 } |
| 43 | 39 |
| 44 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != "" | 40 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != "" |
| 45 || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] !=
""} { | 41 || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] !=
""} { |
| 46 untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile." | 42 untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile." |
| 47 return -1 | 43 return -1 |
| 48 } | 44 } |
| 49 | 45 |
| 50 # Start with a fresh gdb. | 46 # Start with a fresh gdb. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 77 | 73 |
| 78 # Restart with a fresh gdb. | 74 # Restart with a fresh gdb. |
| 79 | 75 |
| 80 gdb_exit | 76 gdb_exit |
| 81 gdb_start | 77 gdb_start |
| 82 gdb_reinitialize_dir $srcdir/$subdir | 78 gdb_reinitialize_dir $srcdir/$subdir |
| 83 | 79 |
| 84 gdb_load ${binfile} | 80 gdb_load ${binfile} |
| 85 gdb_load_shlibs $lib_sl | 81 gdb_load_shlibs $lib_sl |
| 86 | 82 |
| 87 if [target_info exists gdb_stub] { | |
| 88 gdb_step_for_stub; | |
| 89 } | |
| 90 # | 83 # |
| 91 # Test setting, querying, and modifying pending breakpoints | 84 # Test setting, querying, and modifying pending breakpoints |
| 92 # | 85 # |
| 93 | 86 |
| 94 gdb_test_multiple "break pendfunc1" "set pending breakpoint" { | 87 gdb_test_multiple "break pendfunc1" "set pending breakpoint" { |
| 95 -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" { | 88 -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" { |
| 96 gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoi
nt" | 89 gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoi
nt" |
| 97 } | 90 } |
| 98 } | 91 } |
| 99 | 92 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 # error messages are issued for the missing function | 269 # error messages are issued for the missing function |
| 277 # | 270 # |
| 278 | 271 |
| 279 rerun_to_main | 272 rerun_to_main |
| 280 | 273 |
| 281 gdb_test "info break" \ | 274 gdb_test "info break" \ |
| 282 "Num Type\[ \]+Disp Enb Address\[ \]+What.* | 275 "Num Type\[ \]+Disp Enb Address\[ \]+What.* |
| 283 \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* | 276 \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* |
| 284 \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*imaginary.*" \ | 277 \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*imaginary.*" \ |
| 285 "verify pending breakpoint after restart" | 278 "verify pending breakpoint after restart" |
| OLD | NEW |