* lib/gdb.exp (skip_altivec_tests, skip_vsx_tests)
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / gdb1555.exp
CommitLineData
0b302171 1# Copyright 2004, 2007-2012 Free Software Foundation, Inc.
f3205b34
AF
2
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
e22f8b7c 5# the Free Software Foundation; either version 3 of the License, or
f3205b34 6# (at your option) any later version.
e22f8b7c 7#
f3205b34
AF
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
e22f8b7c 12#
f3205b34 13# You should have received a copy of the GNU General Public License
e22f8b7c 14# along with this program. If not, see <http://www.gnu.org/licenses/>. */
f3205b34 15
f3205b34
AF
16# Test stepping into and continuing on from a function in
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)
19
93f02886
DJ
20if {[skip_shlib_tests]} {
21 return 0
22}
23
f3205b34
AF
24set testfile gdb1555-main
25set libfile gdb1555
26set srcfile ${testfile}.c
27set binfile ${objdir}/${subdir}/${testfile}
28
9af2e58d
DJ
29set libsrc "${srcdir}/${subdir}/${libfile}.c"
30set libobj "${objdir}/${subdir}/${libfile}.so"
31set execsrc "${srcdir}/${subdir}/${srcfile}"
f3205b34 32
9af2e58d 33remote_exec build "rm -f ${binfile}"
f3205b34 34
9af2e58d 35# get the value of gcc_compiled
4c93b1db 36if [get_compiler_info] {
f3205b34
AF
37 return -1
38}
39
9af2e58d
DJ
40if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
41 || [gdb_compile $execsrc ${binfile} executable \
42 [list debug shlib=${libobj}]] != "" } {
f3205b34
AF
43 return -1
44}
45
f3205b34
AF
46gdb_exit
47gdb_start
48gdb_reinitialize_dir $srcdir/$subdir
49gdb_load ${binfile}
93f02886 50gdb_load_shlibs $libobj
f3205b34
AF
51
52if ![runto_main] then {
53 fail "Can't run to main"
54 return 0
55}
56
57# PR/1555 (was shlib 1280)
58set name "Step into shared lib function"
59gdb_test_multiple "s" $name \
60{
b9c34f67 61 -re "hithere2 \\(\\) at.*${libfile}.c:\[0-9\]+\r\n\[0-9\]+.*a = 21;.*$gdb_prompt $" {
f3205b34
AF
62 pass $name
63 }
64 -re "0x\[0-9a-f\]+ in .* \\(\\) from /lib/ld.so.1.*$gdb_prompt $" {
65 kfail "gdb/1555" $name
66 }
67}
68
69# PR/1555 (was shlib 1237)
70set name "Next while in a shared lib function"
71gdb_test_multiple "n" $name \
72{
b9c34f67 73 -re "\[0-9\]+.*return a;.*$gdb_prompt $" {
f3205b34
AF
74 pass $name
75 }
fda326dd 76 -re "Single stepping until exit from function .*, \r\nwhich has no line number information.\r\n\r\n$inferior_exited_re normally.*$gdb_prompt $" {
f3205b34
AF
77 kfail "gdb/1555" $name
78 }
79}
80
This page took 0.838994 seconds and 4 git commands to generate.