| 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 $tracelevel then { | |
| 17 strace $tracelevel | |
| 18 } | |
| 19 | |
| 20 | 16 |
| 21 # are we on a target board | 17 # are we on a target board |
| 22 if ![isnative] then { | 18 if ![isnative] then { |
| 23 return | 19 return |
| 24 } | 20 } |
| 25 | 21 |
| 26 # This test is presently only valid on HP-UX. It verifies GDB's | 22 # This test is presently only valid on HP-UX. It verifies GDB's |
| 27 # ability to catch loads and unloads of shared libraries. | 23 # ability to catch loads and unloads of shared libraries. |
| 28 # | 24 # |
| 29 | 25 |
| 30 #setup_xfail "*-*-*" | 26 #setup_xfail "*-*-*" |
| 31 #clear_xfail "hppa*-*-*hpux*" | 27 #clear_xfail "hppa*-*-*hpux*" |
| 32 if {![istarget "hppa*-*-hpux*"]} { | 28 if {![istarget "hppa*-*-hpux*"]} { |
| 33 return 0 | 29 return 0 |
| 34 } | 30 } |
| 35 | 31 |
| 36 set testfile "solib" | 32 set testfile "solib" |
| 37 set srcfile ${testfile}.c | 33 set srcfile ${testfile}.c |
| 38 set binfile ${objdir}/${subdir}/${testfile} | 34 set binfile ${objdir}/${subdir}/${testfile} |
| 39 | 35 |
| 40 # build the first test case | 36 # build the first test case |
| 41 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 37 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
| 42 untested solib.exp | 38 untested solib.exp |
| 43 return -1 | 39 return -1 |
| 44 } | 40 } |
| 45 | 41 |
| 46 if [get_compiler_info ${binfile}] { | 42 if [get_compiler_info] { |
| 47 return -1 | 43 return -1 |
| 48 } | 44 } |
| 49 | 45 |
| 50 # Build the shared libraries this test case needs. | 46 # Build the shared libraries this test case needs. |
| 51 # | 47 # |
| 52 #cd ${subdir} | 48 #cd ${subdir} |
| 53 #remote_exec build "$CC -g +z -c ${testfile}1.c -o ${testfile}1.o" | 49 #remote_exec build "$CC -g +z -c ${testfile}1.c -o ${testfile}1.o" |
| 54 #remote_exec build "$CC -g +z -c ${testfile}2.c -o ${testfile}2.o" | 50 #remote_exec build "$CC -g +z -c ${testfile}2.c -o ${testfile}2.o" |
| 55 | 51 |
| 56 if {$gcc_compiled == 0} { | 52 if {$gcc_compiled == 0} { |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 gdb_test "break main" ".*deferred. at .main..*" "break on main" | 343 gdb_test "break main" ".*deferred. at .main..*" "break on main" |
| 348 gdb_test "run" ".*Breakpoint.*main.*solib.c.*" "hit breakpoint at main" | 344 gdb_test "run" ".*Breakpoint.*main.*solib.c.*" "hit breakpoint at main" |
| 349 gdb_test "break 45" "Breakpoint.*solib.c, line 45.*" "break on indirect call" | 345 gdb_test "break 45" "Breakpoint.*solib.c, line 45.*" "break on indirect call" |
| 350 gdb_test "continue" "Continuing.*solib.c:45.*" \ | 346 gdb_test "continue" "Continuing.*solib.c:45.*" \ |
| 351 "continue to break on indirect call" | 347 "continue to break on indirect call" |
| 352 gdb_test "step" "solib_main.*solib1.c:17.*return arg.arg.*" \ | 348 gdb_test "step" "solib_main.*solib1.c:17.*return arg.arg.*" \ |
| 353 "step into indirect call from a shared library" | 349 "step into indirect call from a shared library" |
| 354 gdb_exit | 350 gdb_exit |
| 355 | 351 |
| 356 return 0 | 352 return 0 |
| OLD | NEW |