OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.cell/] [ea-test.exp] - Blame information for rev 326

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
# Copyright 2009 Free Software Foundation, Inc.
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 .
15
#
16
# Contributed by Markus Deuling .
17
#
18
# Testsuite for Cell Broadband Engine combined debugger
19
# Testcase for __ea pointer
20
 
21
load_lib cell.exp
22
 
23
set testfile "ea-test"
24
set source ${srcdir}/${subdir}/${testfile}.c
25
set binary ${objdir}/${subdir}/${testfile}
26
 
27
if {[skip_cell_tests]} {
28
    return 0
29
}
30
 
31
# Compile SPU binary.
32
if { [gdb_compile_cell_spu $source $binary executable {debug}]  != "" } {
33
  unsupported "Compile spu binary failed, so all tests in this file will automatically fail."
34
  return -1
35
}
36
 
37
gdb_exit
38
gdb_start
39
gdb_reinitialize_dir $srcdir/$subdir
40
gdb_load ${binary}
41
 
42
if ![runto_main] then {
43
  fail "Can't run to main"
44
  return 0
45
}
46
 
47
# p
48
gdb_test "p ppe_pointer" \
49
         "(int.*@__ea).*0x0.*" \
50
         "p ppe_pointer"
51
 
52
gdb_test "p normal_pointer" \
53
         "(int.*).*0x0.*" \
54
         "p normal_pointer"
55
 
56
gdb_test "p local_ppe_pointer" \
57
         "(int.*@__ea).*0x0.*" \
58
         "p local_ppe_pointer"
59
 
60
gdb_test "p local_normal_pointer" \
61
         "(int.*).*0x0.*" \
62
         "p local_normal_pointer"
63
 
64
# ptype
65
gdb_test "ptype ppe_pointer" \
66
         "type = int.*@__ea" \
67
         "ptype ppe_pointer"
68
 
69
gdb_test "ptype normal_pointer" \
70
         "type = int.*" \
71
         "ptype normal_pointer"
72
 
73
gdb_test "ptype local_ppe_pointer" \
74
         "type = int.*@__ea" \
75
         "ptype local_ppe_pointer"
76
 
77
gdb_test "ptype local_normal_pointer" \
78
         "type = int.*" \
79
         "ptype local_normal_pointer"
80
 
81
# info locals
82
gdb_test "info locals" \
83
         ".*local_ppe_pointer =.*0x0.*local_normal_pointer =.*0x0.*" \
84
         "info locals"
85
 
86
# p &
87
gdb_test "p &ppe_pointer" \
88
         ".*=.*(int.*@__ea.*).*0x.*" \
89
         "p &ppe_pointer"
90
 
91
gdb_test "p &normal_pointer" \
92
         ".*=.*(int.*).*0x.*" \
93
         "p &normal_pointer"
94
 
95
gdb_test "p &local_ppe_pointer" \
96
         ".*=.*(int.*@__ea.*).*0x.*" \
97
         "p &local_ppe_pointer"
98
 
99
gdb_test "p &local_normal_pointer" \
100
         ".*=.*(int.*).*0x.*" \
101
         "p &local_normal_pointer"
102
 
103
# ptype *
104
gdb_test "ptype *ppe_pointer" \
105
         "type = int" \
106
         "ptype *ppe_pointer"
107
 
108
gdb_test "ptype *normal_pointer" \
109
         "type = int" \
110
         "ptype *normal_pointer"
111
 
112
gdb_test "ptype *local_ppe_pointer" \
113
         "type = int" \
114
         "ptype *local_ppe_pointer"
115
 
116
gdb_test "ptype *local_normal_pointer" \
117
         "type = int" \
118
         "ptype *local_normal_pointer"
119
 
120
gdb_exit
121
 
122
return 0
123
 
124
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.