| OLD | NEW |
| 1 # Copyright 2004, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2004, 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 # Test stepping into and continuing on from a function in | 16 # Test stepping into and continuing on from a function in |
| 17 # a shared library (PR gdb/1555, was PR shlib/1280, shlib/1237). | 17 # a shared library (PR gdb/1555, was PR shlib/1280, shlib/1237). |
| 18 # Tested on ppc-yellowdog-linux (Yellow Dog Linux 3.0 3.2.2-2a) | 18 # Tested on ppc-yellowdog-linux (Yellow Dog Linux 3.0 3.2.2-2a) |
| 19 | 19 |
| 20 if $tracelevel then { | |
| 21 strace $tracelevel | |
| 22 } | |
| 23 | |
| 24 if {[skip_shlib_tests]} { | 20 if {[skip_shlib_tests]} { |
| 25 return 0 | 21 return 0 |
| 26 } | 22 } |
| 27 | 23 |
| 28 set testfile gdb1555-main | 24 set testfile gdb1555-main |
| 29 set libfile gdb1555 | 25 set libfile gdb1555 |
| 30 set srcfile ${testfile}.c | 26 set srcfile ${testfile}.c |
| 31 set binfile ${objdir}/${subdir}/${testfile} | 27 set binfile ${objdir}/${subdir}/${testfile} |
| 32 | 28 |
| 33 set libsrc "${srcdir}/${subdir}/${libfile}.c" | 29 set libsrc "${srcdir}/${subdir}/${libfile}.c" |
| 34 set libobj "${objdir}/${subdir}/${libfile}.so" | 30 set libobj "${objdir}/${subdir}/${libfile}.so" |
| 35 set execsrc "${srcdir}/${subdir}/${srcfile}" | 31 set execsrc "${srcdir}/${subdir}/${srcfile}" |
| 36 | 32 |
| 37 remote_exec build "rm -f ${binfile}" | 33 remote_exec build "rm -f ${binfile}" |
| 38 | 34 |
| 39 # get the value of gcc_compiled | 35 # get the value of gcc_compiled |
| 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 $libobj {debug}] != "" | 40 if { [gdb_compile_shlib $libsrc $libobj {debug}] != "" |
| 45 || [gdb_compile $execsrc ${binfile} executable \ | 41 || [gdb_compile $execsrc ${binfile} executable \ |
| 46 [list debug shlib=${libobj}]] != "" } { | 42 [list debug shlib=${libobj}]] != "" } { |
| 47 return -1 | 43 return -1 |
| 48 } | 44 } |
| 49 | 45 |
| 50 gdb_exit | 46 gdb_exit |
| (...skipping 24 matching lines...) Expand all Loading... |
| 75 gdb_test_multiple "n" $name \ | 71 gdb_test_multiple "n" $name \ |
| 76 { | 72 { |
| 77 -re "\[0-9\]+.*return a;.*$gdb_prompt $" { | 73 -re "\[0-9\]+.*return a;.*$gdb_prompt $" { |
| 78 pass $name | 74 pass $name |
| 79 } | 75 } |
| 80 -re "Single stepping until exit from function .*, \r\nwhich has no line numb
er information.\r\n\r\n$inferior_exited_re normally.*$gdb_prompt $" { | 76 -re "Single stepping until exit from function .*, \r\nwhich has no line numb
er information.\r\n\r\n$inferior_exited_re normally.*$gdb_prompt $" { |
| 81 kfail "gdb/1555" $name | 77 kfail "gdb/1555" $name |
| 82 } | 78 } |
| 83 } | 79 } |
| 84 | 80 |
| OLD | NEW |