Add support to skip import libraries for performance reasons and instead
[binutils-gdb.git] / gdb / testsuite / gdb.chill / tests2.exp
1 # OBSOLETE # Copyright 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
2 # OBSOLETE
3 # OBSOLETE # This program is free software; you can redistribute it and/or modify
4 # OBSOLETE # it under the terms of the GNU General Public License as published by
5 # OBSOLETE # the Free Software Foundation; either version 2 of the License, or
6 # OBSOLETE # (at your option) any later version.
7 # OBSOLETE #
8 # OBSOLETE # This program is distributed in the hope that it will be useful,
9 # OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # OBSOLETE # GNU General Public License for more details.
12 # OBSOLETE #
13 # OBSOLETE # You should have received a copy of the GNU General Public License
14 # OBSOLETE # along with this program; if not, write to the Free Software
15 # OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 # OBSOLETE
17 # OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
18 # OBSOLETE # bug-gdb@prep.ai.mit.edu
19 # OBSOLETE
20 # OBSOLETE if $tracelevel then {
21 # OBSOLETE strace $tracelevel
22 # OBSOLETE }
23 # OBSOLETE
24 # OBSOLETE if [skip_chill_tests] then { continue }
25 # OBSOLETE
26 # OBSOLETE set prms_id 0
27 # OBSOLETE set bug_id 0
28 # OBSOLETE
29 # OBSOLETE # Set the current language to chill. This counts as a test. If it
30 # OBSOLETE # fails, then we skip the other tests.
31 # OBSOLETE
32 # OBSOLETE set testfile "tests2"
33 # OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
34 # OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
35 # OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
36 # OBSOLETE perror "Couldn't compile ${srcfile}"
37 # OBSOLETE return -1
38 # OBSOLETE }
39 # OBSOLETE
40 # OBSOLETE global infinity
41 # OBSOLETE if [istarget "i*86-*-sysv4*"] then {
42 # OBSOLETE set infinity "inf"
43 # OBSOLETE } else {
44 # OBSOLETE set infinity "Infinity"
45 # OBSOLETE }
46 # OBSOLETE
47 # OBSOLETE proc set_lang_chill {} {
48 # OBSOLETE global gdb_prompt
49 # OBSOLETE global binfile objdir subdir
50 # OBSOLETE
51 # OBSOLETE if ![file exists $objdir/$subdir/$binfile] then {
52 # OBSOLETE return 0
53 # OBSOLETE }
54 # OBSOLETE verbose "loading file '$objdir/$subdir/$binfile'"
55 # OBSOLETE gdb_load $objdir/$subdir/$binfile
56 # OBSOLETE
57 # OBSOLETE send_gdb "set language chill\n"
58 # OBSOLETE gdb_expect {
59 # OBSOLETE -re ".*$gdb_prompt $" {}
60 # OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
61 # OBSOLETE }
62 # OBSOLETE
63 # OBSOLETE send_gdb "show language\n"
64 # OBSOLETE gdb_expect {
65 # OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
66 # OBSOLETE pass "set language to \"chill\""
67 # OBSOLETE send_gdb "break dummyfunc\n"
68 # OBSOLETE gdb_expect {
69 # OBSOLETE -re ".*$gdb_prompt $" {
70 # OBSOLETE send_gdb "run\n"
71 # OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
72 # OBSOLETE return 1
73 # OBSOLETE }
74 # OBSOLETE timeout {
75 # OBSOLETE fail "can't set breakpoint (timeout)"
76 # OBSOLETE return 0
77 # OBSOLETE }
78 # OBSOLETE }
79 # OBSOLETE }
80 # OBSOLETE -re ".*$gdb_prompt $" {
81 # OBSOLETE fail "setting language to \"chill\""
82 # OBSOLETE return 0
83 # OBSOLETE }
84 # OBSOLETE timeout {
85 # OBSOLETE fail "can't show language (timeout)"
86 # OBSOLETE return 0
87 # OBSOLETE }
88 # OBSOLETE }
89 # OBSOLETE }
90 # OBSOLETE
91 # OBSOLETE # checks if structure was accessed correctly
92 # OBSOLETE proc test_write { args } {
93 # OBSOLETE global gdb_prompt
94 # OBSOLETE
95 # OBSOLETE if [llength $args]==5 then {
96 # OBSOLETE set message [lindex $args 4]
97 # OBSOLETE set extended [lindex $args 3]
98 # OBSOLETE set matchval [lindex $args 2]
99 # OBSOLETE } elseif [llength $args]==4 then {
100 # OBSOLETE set message [lindex $args 3]
101 # OBSOLETE set matchval [lindex $args 2]
102 # OBSOLETE set extended ""
103 # OBSOLETE } elseif [llength $args]==3 then {
104 # OBSOLETE set message [lindex $args 2]
105 # OBSOLETE set extended ""
106 # OBSOLETE } else {
107 # OBSOLETE warning "test ($args) write called with wrong number of arguments"
108 # OBSOLETE return
109 # OBSOLETE }
110 # OBSOLETE
111 # OBSOLETE set location [lindex $args 0]
112 # OBSOLETE set value [lindex $args 1]
113 # OBSOLETE if ![info exists matchval] then {
114 # OBSOLETE set matchval $value
115 # OBSOLETE }
116 # OBSOLETE verbose "loc: $location, val: $value, msg: $message, ext: $extended, match: $matchval"
117 # OBSOLETE
118 # OBSOLETE verbose "setting var $value..."
119 # OBSOLETE send_gdb "set var $location.m$extended := $value\n"
120 # OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
121 # OBSOLETE gdb_test "print $location" \
122 # OBSOLETE ".*= \[\[\]\\.p1: 2863311530, \\.m: $matchval, \\.p2: 1431655765\[\]\]"\
123 # OBSOLETE "$message"
124 # OBSOLETE }
125 # OBSOLETE
126 # OBSOLETE # test write access from gdb (setvar x:=y) from gdb
127 # OBSOLETE proc write_access { } {
128 # OBSOLETE global infinity
129 # OBSOLETE
130 # OBSOLETE verbose "testing write access to locations"
131 # OBSOLETE
132 # OBSOLETE # discrete modes
133 # OBSOLETE test_write b1 127 "byte write 1"
134 # OBSOLETE test_write b1 -128 "byte write 2"
135 # OBSOLETE test_write b1 0 "byte write 3"
136 # OBSOLETE test_write ub1 255 "ubyte write 1"
137 # OBSOLETE test_write ub1 0 "ubyte write 2"
138 # OBSOLETE test_write ub1 42 "ubyte write 3"
139 # OBSOLETE test_write i1 32767 "int write 1"
140 # OBSOLETE test_write i1 -32768 "int write 2"
141 # OBSOLETE test_write i1 0 "int write 3"
142 # OBSOLETE test_write ui1 65535 "uint write 1"
143 # OBSOLETE test_write ui1 0 "uint write 2"
144 # OBSOLETE test_write ui1 123 "uint write 3"
145 # OBSOLETE test_write l1 2147483647 "long write 1"
146 # OBSOLETE test_write l1 -2147483648 "long write 2"
147 # OBSOLETE test_write l1 0 "long write 3"
148 # OBSOLETE test_write ul1 4294967295 "ulong write 1"
149 # OBSOLETE test_write ul1 0 "ulong write 2"
150 # OBSOLETE test_write ul1 1000000 "ulong write 3"
151 # OBSOLETE test_write bo1 FALSE "bool write 1"
152 # OBSOLETE test_write bo1 TRUE "bool write 2"
153 # OBSOLETE test_write c1 \"1234\" "char write 1"
154 # OBSOLETE test_write c2 \"1234567\" "char write 2"
155 # OBSOLETE test_write c3 \"654321\" "char write 3"
156 # OBSOLETE test_write c4 C'65' 'e' "char write 4"
157 # OBSOLETE test_write bi1 B'10100101' "bitstring write 1"
158 # OBSOLETE test_write bi2 B'0101001010' "bitstring write 2"
159 # OBSOLETE test_write se1 a "set write 1"
160 # OBSOLETE test_write se1 h "set write 2"
161 # OBSOLETE # The following two use numbered sets with too-large values.
162 # OBSOLETE setup_xfail "*-*-*"
163 # OBSOLETE test_write nse1 nb "numbered set write 1"
164 # OBSOLETE setup_xfail "*-*-*"
165 # OBSOLETE test_write nse1 nc "numbered set write 2"
166 # OBSOLETE test_write r1 127 "range write 1"
167 # OBSOLETE test_write r2 32767 "range write 2"
168 # OBSOLETE test_write r3 2147483647 "range write 3"
169 # OBSOLETE
170 # OBSOLETE # powerset modes
171 # OBSOLETE test_write p1 {[pa:ph]} {\[pa:ph\]} "powerset write 1"
172 # OBSOLETE test_write p1 {[pa, pc:pf, ph]} {\[pa, pc:pf, ph\]} "powerset write 2"
173 # OBSOLETE test_write p1 {[pa, pc, pe, pg]} {\[pa, pc, pe, pg\]} "powerset write 3"
174 # OBSOLETE test_write p1 {[]} {\[\]} "powerset write 4"
175 # OBSOLETE test_write p2 {[1:32]} {\[1:32\]} "powerset write 5"
176 # OBSOLETE test_write p2 {[1, 3:30, 32]} {\[1, 3:30, 32\]} "powerset write 6"
177 # OBSOLETE test_write p2 {[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]} {\[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31\]} \
178 # OBSOLETE "powerset write 7"
179 # OBSOLETE test_write p2 {[]} {\[\]} "powerset write 8"
180 # OBSOLETE
181 # OBSOLETE # Fixme: this should be rejected by gnuchill
182 # OBSOLETE # test_write p3 {[-2147483648:2147483647]} {\[-2147483648:2147483647\]} \
183 # OBSOLETE # "powerset write 9"
184 # OBSOLETE # test_write p3 {[-2147483648, -1000000:1000000, 2147483647]} \
185 # OBSOLETE # {\[-2147483648, -1000000:1000000, 2147483647\]} \
186 # OBSOLETE # "powerset write 10"
187 # OBSOLETE # test_write p3 {[-99, -97, -95, 1001, 1003, 1005]} \
188 # OBSOLETE # {\[-99, -97, -95, 1001, 1003, 1005\]} "powerset write 11"
189 # OBSOLETE # test_write p3 {[]} {\[\]} "powerset write 12"
190 # OBSOLETE
191 # OBSOLETE # reference modes
192 # OBSOLETE test_write ref1 ->ref1 {H'[0-9a-fA-F]+} "reference write 1"
193 # OBSOLETE test_write ref2 ->b1 {H'[0-9a-fA-F]+} "reference write 2"
194 # OBSOLETE test_write ref1 NULL "reference write 3"
195 # OBSOLETE test_write ref2 NULL "reference write 4"
196 # OBSOLETE
197 # OBSOLETE # procedure modes
198 # OBSOLETE test_write pr1 NULL "procefure write 1"
199 # OBSOLETE # FIXME: remove when NULL is understood
200 # OBSOLETE test_write pr1 0 NULL "procefure write 2"
201 # OBSOLETE test_write pr1 dummyfunc {H'[0-9a-fA-F]+ <dummyfunc>} "procedure write 3"
202 # OBSOLETE
203 # OBSOLETE # timing modes, FIXME when callbacks to timefunctions are implemented
204 # OBSOLETE #test_write ti1 abstime(1970, 3, 12, 10, 43, 0) {} "time write 1"
205 # OBSOLETE #test_write ti2 <set somehow a duration>
206 # OBSOLETE xfail "timing modes not implemented yet"
207 # OBSOLETE
208 # OBSOLETE # real modes
209 # OBSOLETE # This ones
210 # OBSOLETE test_write re1 42.03 {42.0[0-9]*} "real write 1"
211 # OBSOLETE test_write re1 0 "real write 2"
212 # OBSOLETE test_write re1 "1e+38" {1e\+38|1\.0[0-9]*e\+38|9\.9[0-9]*e\+37} \
213 # OBSOLETE "real write 3"
214 # OBSOLETE setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
215 # OBSOLETE test_write re1 "1e+39" $infinity "real write 4"
216 # OBSOLETE test_write re2 42.03 {42.0[0-9]*} "real write 5"
217 # OBSOLETE test_write re2 0 "real write 6"
218 # OBSOLETE test_write re2 "1e+308" {1e\+308} "real write 7"
219 # OBSOLETE setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
220 # OBSOLETE test_write re2 "1e+309" $infinity "real write 8"
221 # OBSOLETE # array modes
222 # OBSOLETE test_write arrl1 {[(1:3): [(1:2): -128]]} {\[\(1:3\): \[\(1:2\): -128\]\]}\
223 # OBSOLETE "array write 1"
224 # OBSOLETE test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
225 # OBSOLETE "array write 2"
226 # OBSOLETE test_write arrl1 {[(1): [(1:2): 127], (2): [(1:2): -128], (3): [(1:2): 127]]} {\[\(1\): \[\(1:2\): 127\], \(2\): \[\(1:2\): -128\], \(3\): \[\(1:2\): 127\]\]}\
227 # OBSOLETE "array write 3"
228 # OBSOLETE test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
229 # OBSOLETE "array write 4"
230 # OBSOLETE setup_xfail "*-*-*"
231 # OBSOLETE # Bogus test case - type mismatch?
232 # OBSOLETE test_write arrl1 {[(1): 127, (2): -128]} "array write 5"
233 # OBSOLETE test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
234 # OBSOLETE "array write 6"
235 # OBSOLETE
236 # OBSOLETE # structure modes
237 # OBSOLETE test_write strul1 {[.a: -32768, .b: 32767, .ch: "ZZZZ"]} \
238 # OBSOLETE {\[\.a: -32768, \.b: 32767, \.ch: \"ZZZZ\"\]} \
239 # OBSOLETE "structure write 1"
240 # OBSOLETE test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
241 # OBSOLETE {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
242 # OBSOLETE "structure write 2"
243 # OBSOLETE test_write strul1 -32768 {\[\.a: -32768, \.b: 0, \.ch: \"0000\"\]} \
244 # OBSOLETE {.a} "structure write 3"
245 # OBSOLETE test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
246 # OBSOLETE {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
247 # OBSOLETE "structure write 4"
248 # OBSOLETE test_write strul1 -32768 {\[\.a: 0, \.b: -32768, \.ch: \"0000\"\]} \
249 # OBSOLETE {.b} "structure write 5"
250 # OBSOLETE test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
251 # OBSOLETE {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
252 # OBSOLETE "structure write 6"
253 # OBSOLETE test_write strul1 \"HUGO\" {\[\.a: 0, \.b: 0, \.ch: \"HUGO\"\]} \
254 # OBSOLETE {.ch} "structure write 7"
255 # OBSOLETE }
256 # OBSOLETE
257 # OBSOLETE # Start with a fresh gdb.
258 # OBSOLETE
259 # OBSOLETE set binfile "tests2.exe"
260 # OBSOLETE
261 # OBSOLETE gdb_exit
262 # OBSOLETE gdb_start
263 # OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
264 # OBSOLETE
265 # OBSOLETE gdb_test "set print sevenbit-strings" ".*"
266 # OBSOLETE
267 # OBSOLETE if [set_lang_chill] then {
268 # OBSOLETE write_access
269 # OBSOLETE } else {
270 # OBSOLETE warning "$test_name tests suppressed."
271 # OBSOLETE }