OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [gdb/] [testsuite/] [gdb.base/] [volatile.exp] - Blame information for rev 394

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

Line No. Rev Author Line
1 330 jeremybenn
# Copyright 1997, 1998, 1999, 2003, 2004, 2007, 2008, 2009, 2010
2
# Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program.  If not, see .
16
 
17
# Written by Satish Pai  1997-07-07
18
#    In the spirit of constvars.exp: added volatile, const-volatile stuff.
19
 
20
# This file is part of the gdb testsuite
21
# Tests for:
22
#           volatile vars
23
#           pointers to volatile vars
24
#           const volatile vars
25
#           pointers to const volatile vars
26
#           const pointers to volatile vars
27
#           volatile pointers to const vars
28
#           const volatile pointers to const vars
29
#           const volatile pointers to volatile vars
30
#           ... etc.  (you get the idea)
31
# Mostly with char and unsigned char.
32
 
33
if $tracelevel then {
34
        strace $tracelevel
35
        }
36
 
37
#
38
# test running programs
39
#
40
 
41
# Use the same test program constvars.c.
42
 
43
if { [prepare_for_testing volatile.exp volatile constvars.c] } {
44
    return -1
45
}
46
 
47
# Create and source the file that provides information about the compiler
48
# used to compile the test case.
49
if [get_compiler_info not-used] {
50
    return -1;
51
}
52
 
53
#
54
# set it up at a breakpoint so we can play with the variable values
55
#
56
if ![runto_main] then {
57
    perror "couldn't run to breakpoint"
58
    continue
59
}
60
 
61
get_debug_format
62
 
63
# Many tests xfail with gcc 2 -gstabs+.
64
# TODO: check out the hp side of this.
65
 
66
proc local_compiler_xfail_check { } {
67
    if { [test_compiler_info gcc-2-*] } then {
68
        if { ![test_debug_format "HP"] \
69
                && ![test_debug_format "DWARF 2"] } then {
70
            setup_xfail "*-*-*"
71
        }
72
    }
73
 
74
    global hp_cc_compiler
75
    if { $hp_cc_compiler } {
76
        setup_xfail "hppa*-*-hpux*"
77
    }
78
}
79
 
80
# A few tests still xfail with gcc 3 -gstabs+ and gcc 4 -gstabs+.
81
 
82
proc local_compiler_xfail_check_2 { } {
83
    if { [test_compiler_info gcc-3-*] || [test_compiler_info gcc-4-*] } {
84
        if { [test_debug_format "stabs" ] } {
85
            setup_xfail "*-*-*"
86
        }
87
    }
88
}
89
 
90
gdb_test "break marker1" ".*" ""
91
 
92
gdb_test_multiple "cont" "continue to marker1" {
93
    -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
94
        pass "continue to marker1"
95
    }
96
    -re "Break.* marker1__.* \\(\\) at .*:$decimal.*$gdb_prompt $" {
97
        fail "continue to marker1 (demangling)"
98
    }
99
}
100
gdb_test "up" " in main .*" "up from marker1"
101
 
102
# As of Feb 1999, GCC does not issue info about volatility of vars, so
103
# these tests are all expected to fail if GCC is the compiler. -sts
104
 
105
local_compiler_xfail_check
106
gdb_test "ptype vox" "type = volatile char.*"
107
 
108
local_compiler_xfail_check
109
gdb_test "ptype victuals" "type = volatile unsigned char.*"
110
 
111
local_compiler_xfail_check
112
gdb_test "ptype vixen" "type = volatile short.*"
113
 
114
local_compiler_xfail_check
115
gdb_test "ptype vitriol" "type = volatile (unsigned short|short unsigned)( int)?.*"
116
 
117
local_compiler_xfail_check
118
gdb_test "ptype vellum" "type = volatile long.*"
119
 
120
local_compiler_xfail_check
121
gdb_test "ptype valve" "type = volatile (unsigned long|long unsigned)( int)?.*"
122
 
123
local_compiler_xfail_check
124
gdb_test "ptype vacuity" "type = volatile float.*"
125
 
126
local_compiler_xfail_check
127
gdb_test "ptype vertigo" "type = volatile double.*"
128
 
129
local_compiler_xfail_check
130
gdb_test "ptype vampire" "type = volatile char \\*.*"
131
 
132
local_compiler_xfail_check
133
gdb_test "ptype viper" "type = volatile unsigned char \\*.*"
134
 
135
local_compiler_xfail_check
136
gdb_test "ptype vigour" "type = volatile short( int)? \\*.*"
137
 
138
local_compiler_xfail_check
139
gdb_test "ptype vapour" "type = volatile (unsigned short|short unsigned)( int)? \\*.*"
140
 
141
local_compiler_xfail_check
142
gdb_test "ptype ventricle" "type = volatile long( int)? \\*.*"
143
 
144
local_compiler_xfail_check
145
gdb_test "ptype vigintillion" "type = volatile (unsigned long|long unsigned)( int)? \\*.*"
146
 
147
local_compiler_xfail_check
148
gdb_test "ptype vocation" "type = volatile float \\*.*"
149
 
150
local_compiler_xfail_check
151
gdb_test "ptype veracity" "type = volatile double \\*.*"
152
 
153
local_compiler_xfail_check
154
gdb_test "ptype vapidity" "type = volatile char \\* volatile.*"
155
 
156
local_compiler_xfail_check
157
gdb_test "ptype velocity" "type = volatile unsigned char \\* volatile.*"
158
 
159
local_compiler_xfail_check
160
gdb_test "ptype veneer" "type = volatile short( int)? \\* volatile.*"
161
 
162
local_compiler_xfail_check
163
gdb_test "ptype video" "type = volatile (unsigned short|short unsigned)( int) \\* volatile.*"
164
 
165
local_compiler_xfail_check
166
gdb_test "ptype vacuum" "type = volatile long( int)? \\* volatile.*"
167
 
168
local_compiler_xfail_check
169
gdb_test "ptype veniality" "type = volatile (unsigned long|long unsigned)( int)? \\* volatile.*"
170
 
171
local_compiler_xfail_check
172
gdb_test "ptype vitality" "type = volatile float \\* volatile.*"
173
 
174
local_compiler_xfail_check
175
gdb_test "ptype voracity" "type = volatile double \\* volatile.*"
176
 
177
local_compiler_xfail_check
178
gdb_test "ptype victor" "type = const volatile char.*"
179
 
180
local_compiler_xfail_check
181
gdb_test "ptype vicar" "type = const volatile unsigned char.*"
182
 
183
local_compiler_xfail_check
184
gdb_test "ptype victory" "type = const volatile char \\*.*"
185
 
186
local_compiler_xfail_check
187
gdb_test "ptype vicarage" "type = const volatile unsigned char \\*.*"
188
 
189
local_compiler_xfail_check
190
gdb_test "ptype vein" "type = volatile char \\* const.*"
191
 
192
local_compiler_xfail_check
193
gdb_test "ptype vogue" "type = volatile unsigned char \\* const.*"
194
 
195
local_compiler_xfail_check
196
gdb_test "ptype cavern" "type = const volatile char \\* const.*"
197
 
198
local_compiler_xfail_check
199
gdb_test "ptype coverlet" "type = const volatile unsigned char \\* const.*"
200
 
201
local_compiler_xfail_check
202
gdb_test "ptype caveat" "type = const char \\* volatile.*"
203
 
204
local_compiler_xfail_check
205
gdb_test "ptype covenant" "type = const unsigned char \\* volatile.*"
206
 
207
local_compiler_xfail_check
208
gdb_test "ptype vizier" "type = const volatile char \\* volatile.*"
209
 
210
local_compiler_xfail_check
211
gdb_test "ptype vanadium" "type = const volatile unsigned char \\* volatile.*"
212
 
213
local_compiler_xfail_check
214
gdb_test "ptype vane" "type = char \\* const volatile.*"
215
 
216
local_compiler_xfail_check
217
gdb_test "ptype veldt" "type = unsigned char \\* const volatile.*"
218
 
219
local_compiler_xfail_check
220
gdb_test "ptype cove" "type = const char \\* const volatile.*"
221
 
222
local_compiler_xfail_check
223
gdb_test "ptype cavity" "type = const unsigned char \\* const volatile.*"
224
 
225
local_compiler_xfail_check
226
gdb_test "ptype vagus" "type = volatile char \\* const volatile.*"
227
 
228
local_compiler_xfail_check
229
gdb_test "ptype vagrancy" "type = volatile unsigned char \\* const volatile.*"
230
 
231
local_compiler_xfail_check
232
gdb_test "ptype vagary" "type = const volatile char \\* const volatile.*"
233
 
234
local_compiler_xfail_check
235
gdb_test "ptype vendor" "type = const volatile unsigned char \\* const volatile.*"
236
 
237
# test function parameters
238
local_compiler_xfail_check
239
local_compiler_xfail_check_2
240
 
241
gdb_test "ptype qux2" \
242
    "type = int \\(volatile unsigned char, const volatile int, volatile short( int)?, volatile long( int)? \\*, float \\* volatile, const volatile signed char \\* const volatile\\)" \
243
    "ptype qux2"

powered by: WebSVN 2.1.0

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