Fix test names starting with uppercase output by basic functions
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cell / ea-test.exp
CommitLineData
618f726f 1# Copyright 2009-2016 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 __ea pointer
20
21load_lib cell.exp
22
23set testfile "ea-test"
24set source ${srcdir}/${subdir}/${testfile}.c
25set binary ${objdir}/${subdir}/${testfile}
26
27if {[skip_cell_tests]} {
28 return 0
29}
30
31# Compile SPU binary.
32if { [gdb_compile_cell_spu $source $binary executable {debug}] != "" } {
bc6c7af4 33 unsupported "compile spu binary failed, so all tests in this file will automatically fail."
1ea34204
UW
34 return -1
35}
36
37gdb_exit
38gdb_start
39gdb_reinitialize_dir $srcdir/$subdir
40gdb_load ${binary}
41
42if ![runto_main] then {
bc6c7af4 43 fail "can't run to main"
1ea34204
UW
44 return 0
45}
46
47# p
48gdb_test "p ppe_pointer" \
49 "(int.*@__ea).*0x0.*" \
50 "p ppe_pointer"
51
52gdb_test "p normal_pointer" \
53 "(int.*).*0x0.*" \
54 "p normal_pointer"
55
56gdb_test "p local_ppe_pointer" \
57 "(int.*@__ea).*0x0.*" \
58 "p local_ppe_pointer"
59
60gdb_test "p local_normal_pointer" \
61 "(int.*).*0x0.*" \
62 "p local_normal_pointer"
63
64# ptype
65gdb_test "ptype ppe_pointer" \
66 "type = int.*@__ea" \
67 "ptype ppe_pointer"
68
69gdb_test "ptype normal_pointer" \
70 "type = int.*" \
71 "ptype normal_pointer"
72
73gdb_test "ptype local_ppe_pointer" \
74 "type = int.*@__ea" \
75 "ptype local_ppe_pointer"
76
77gdb_test "ptype local_normal_pointer" \
78 "type = int.*" \
79 "ptype local_normal_pointer"
80
81# info locals
82gdb_test "info locals" \
83 ".*local_ppe_pointer =.*0x0.*local_normal_pointer =.*0x0.*" \
84 "info locals"
85
86# p &
87gdb_test "p &ppe_pointer" \
88 ".*=.*(int.*@__ea.*).*0x.*" \
89 "p &ppe_pointer"
90
91gdb_test "p &normal_pointer" \
92 ".*=.*(int.*).*0x.*" \
93 "p &normal_pointer"
94
95gdb_test "p &local_ppe_pointer" \
96 ".*=.*(int.*@__ea.*).*0x.*" \
97 "p &local_ppe_pointer"
98
99gdb_test "p &local_normal_pointer" \
100 ".*=.*(int.*).*0x.*" \
101 "p &local_normal_pointer"
102
103# ptype *
104gdb_test "ptype *ppe_pointer" \
105 "type = int" \
106 "ptype *ppe_pointer"
107
108gdb_test "ptype *normal_pointer" \
109 "type = int" \
110 "ptype *normal_pointer"
111
112gdb_test "ptype *local_ppe_pointer" \
113 "type = int" \
114 "ptype *local_ppe_pointer"
115
116gdb_test "ptype *local_normal_pointer" \
117 "type = int" \
118 "ptype *local_normal_pointer"
119
120gdb_exit
121
122return 0
123
124
This page took 0.811175 seconds and 4 git commands to generate.