]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.cell/solib-symbol.exp
run copyright.sh for 2011.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cell / solib-symbol.exp
CommitLineData
7b6bb8da 1# Copyright 2009, 2011 Free Software Foundation, Inc.
1ea34204
UW
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
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
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.
12#
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/>.
15#
16# Contributed by Markus Deuling <deuling@de.ibm.com>.
17#
18# Testsuite for Cell Broadband Engine combined debugger
19# Testcase for multiple symbol disambiguation patch.
20
21load_lib cell.exp
22
23set ppu_file "break"
24set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
25set ppu_bin ${objdir}/${subdir}/${ppu_file}
26set spu_file "break-spu"
27set spu_src ${srcdir}/${subdir}/${spu_file}.c
28set spu_bin ${objdir}/${subdir}/${spu_file}
29
30if {[skip_cell_tests]} {
31 return 0
32}
33
34# Compile SPU binary.
35if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}] != "" } {
36 unsupported "Compiling spu binary failed."
37 return -1
38}
39# Compile PPU binary.
40if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}] != "" } {
41 unsupported "Embedding spu binary failed."
42 return -1
43}
44if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
45 unsupported "Compiling ppu binary failed."
46 return -1
47}
48
49if [get_compiler_info ${ppu_bin}] {
50 return -1
51}
52
53
54gdb_exit
55gdb_start
56gdb_reinitialize_dir $srcdir/$subdir
57gdb_load ${ppu_bin}
58
59if ![runto_main] then {
60 fail "Can't run to main"
61 return 0
62}
63
64# Breakpoint resolved in PPU thread.
65gdb_test "break foo" \
66 "Breakpoint.*file.*$ppu_file.c.*" \
67 "br foo in break"
68
69# Continue to SPU
70cont_spu_main
71check_spu_arch ""
72
73# Breakpoint resolved in SPU thread.
74delete_breakpoints
75gdb_test "break foo" \
76 "Breakpoint.*file.*$spu_file.c.*" \
77 "br foo in $spu_file.c"
78
79gdb_exit
80return 0