Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: gdb/testsuite/gdb.base/opaque.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/nofield.exp ('k') | gdb/testsuite/gdb.base/opaque0.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 1992, 1994-1997, 1999, 2002, 2007-2012 Free Software 1 # Copyright 1992, 1994-1997, 1999, 2002, 2007-2012 Free Software
2 # Foundation, Inc. 2 # Foundation, Inc.
3 3
4 # This program is free software; you can redistribute it and/or modify 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 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 6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version. 7 # (at your option) any later version.
8 # 8 #
9 # This program is distributed in the hope that it will be useful, 9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. 12 # GNU General Public License for more details.
13 # 13 #
14 # You should have received a copy of the GNU General Public License 14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
17 # This file was written by Fred Fish. (fnf@cygnus.com) 17 # This file was written by Fred Fish. (fnf@cygnus.com)
18 18
19 if $tracelevel then {
20 strace $tracelevel
21 }
22
23 19
24 set testfile "opaque" 20 set testfile "opaque"
25 set binfile ${objdir}/${subdir}/opaque 21 set binfile ${objdir}/${subdir}/opaque
26 22
27 #if { [gdb_compile "${srcdir}/${subdir}/opaque0.c ${srcdir}/${subdir}/opaque1.c " "${binfile}" executable {debug}] != "" } { 23 #if { [gdb_compile "${srcdir}/${subdir}/opaque0.c ${srcdir}/${subdir}/opaque1.c " "${binfile}" executable {debug}] != "" } {
28 # gdb_suppress_entire_file "Testcase compile failed, so all tests in this fi le will automatically fail." 24 # gdb_suppress_entire_file "Testcase compile failed, so all tests in this fi le will automatically fail."
29 #} 25 #}
30 26
31 if { [gdb_compile "${srcdir}/${subdir}/opaque0.c" "${binfile}0.o" object {debug }] != "" } { 27 if { [gdb_compile "${srcdir}/${subdir}/opaque0.c" "${binfile}0.o" object {debug }] != "" } {
32 untested opaque.exp 28 untested opaque.exp
33 return -1 29 return -1
34 } 30 }
35 31
36 if { [gdb_compile "${srcdir}/${subdir}/opaque1.c" "${binfile}1.o" object {debug }] != "" } { 32 if { [gdb_compile "${srcdir}/${subdir}/opaque1.c" "${binfile}1.o" object {debug }] != "" } {
37 untested opaque.exp 33 untested opaque.exp
38 return -1 34 return -1
39 } 35 }
40 36
41 if { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } { 37 if { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } {
42 untested opaque.exp 38 untested opaque.exp
43 return -1 39 return -1
44 } 40 }
45 41
46 42
47 # Create and source the file that provides information about the compiler 43 # Create and source the file that provides information about the compiler
48 # used to compile the test case. 44 # used to compile the test case.
49 if [get_compiler_info ${binfile}] { 45 if [get_compiler_info] {
50 return -1; 46 return -1;
51 } 47 }
52 48
53 # Start with a fresh gdb. 49 # Start with a fresh gdb.
54 50
55 gdb_exit 51 gdb_exit
56 gdb_start 52 gdb_start
57 gdb_reinitialize_dir $srcdir/$subdir 53 gdb_reinitialize_dir $srcdir/$subdir
58 gdb_load ${binfile} 54 gdb_load ${binfile}
59 55
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \ 127 "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \
132 "ptype on opaque struct tagname (statically)" 128 "ptype on opaque struct tagname (statically)"
133 129
134 130
135 # 131 #
136 # Done with static tests, now test dynamic opaque structure handling. 132 # Done with static tests, now test dynamic opaque structure handling.
137 # We reload the symbol table so we forget about anything we might 133 # We reload the symbol table so we forget about anything we might
138 # have learned during the static tests. 134 # have learned during the static tests.
139 # 135 #
140 136
141 if [istarget "mips-idt-*"] then {
142 # Restart because IDT/SIM runs out of file descriptors.
143 gdb_exit
144 gdb_start
145 }
146 gdb_reinitialize_dir $srcdir/$subdir 137 gdb_reinitialize_dir $srcdir/$subdir
147 gdb_load ${binfile} 138 gdb_load ${binfile}
148 139
149 # Run to main, where struct foo is incomplete. 140 # Run to main, where struct foo is incomplete.
150 if ![runto_main] { 141 if ![runto_main] {
151 perror "cannot run to breakpoint at main" 142 perror "cannot run to breakpoint at main"
152 } 143 }
153 144
154 145
155 # The current source file is now the one containing main(). The structure foo 146 # The current source file is now the one containing main(). The structure foo
(...skipping 30 matching lines...) Expand all
186 177
187 if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } 178 if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
188 gdb_test "ptype struct foo" \ 179 gdb_test "ptype struct foo" \
189 "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \ 180 "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \
190 "ptype on opaque struct tagname (dynamically) 1" 181 "ptype on opaque struct tagname (dynamically) 1"
191 182
192 183
193 # Now reload the symbols again so we forget about anything we might 184 # Now reload the symbols again so we forget about anything we might
194 # have learned reading the symbols during the previous tests. 185 # have learned reading the symbols during the previous tests.
195 186
196 if [istarget "mips-idt-*"] then {
197 # Restart because IDT/SIM runs out of file descriptors.
198 gdb_exit
199 gdb_start
200 }
201 gdb_reinitialize_dir $srcdir/$subdir 187 gdb_reinitialize_dir $srcdir/$subdir
202 gdb_load ${binfile} 188 gdb_load ${binfile}
203 189
204 # Run to getfoo, where struct foo is complete. 190 # Run to getfoo, where struct foo is complete.
205 if ![runto getfoo] { 191 if ![runto getfoo] {
206 perror "cannot run to breakpoint at getfoo" 192 perror "cannot run to breakpoint at getfoo"
207 } 193 }
208 194
209 195
210 # Ensure that we know what foop is. 196 # Ensure that we know what foop is.
(...skipping 21 matching lines...) Expand all
232 gdb_test "ptype afoo" \ 218 gdb_test "ptype afoo" \
233 "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \ 219 "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \
234 "ptype on opaque struct instance (dynamically) 2" 220 "ptype on opaque struct instance (dynamically) 2"
235 221
236 222
237 # Ensure that we know the form of an explicit struct foo. 223 # Ensure that we know the form of an explicit struct foo.
238 224
239 gdb_test "ptype struct foo" \ 225 gdb_test "ptype struct foo" \
240 "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \ 226 "type = struct foo \{\[\r\n\]+ int a;\[\r\n\]+ int b;\[\r\n\]+\}" \
241 "ptype on opaque struct tagname (dynamically) 2" 227 "ptype on opaque struct tagname (dynamically) 2"
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/nofield.exp ('k') | gdb/testsuite/gdb.base/opaque0.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698