OLD | NEW |
1 # Copyright 1997-2004, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1997-2004, 2007-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 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 | 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 | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 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/>. */ | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
15 | 15 |
16 # written by Elena Zannoni (elz@apollo.hp.com) | 16 # written by Elena Zannoni (elz@apollo.hp.com) |
17 # | 17 # |
18 # This file is part of the gdb testsuite | 18 # This file is part of the gdb testsuite |
19 # | 19 # |
20 # tests for const variables | 20 # tests for const variables |
21 # const pointers to vars | 21 # const pointers to vars |
22 # pointers to const variables | 22 # pointers to const variables |
23 # const pointers to const vars | 23 # const pointers to const vars |
24 # with mixed types | 24 # with mixed types |
25 | 25 |
26 if $tracelevel then { | |
27 strace $tracelevel | |
28 } | |
29 | |
30 # | 26 # |
31 # test running programs | 27 # test running programs |
32 # | 28 # |
33 | 29 |
34 set testfile "constvars" | 30 set testfile "constvars" |
35 set srcfile ${testfile}.c | 31 set srcfile ${testfile}.c |
36 set binfile ${objdir}/${subdir}/${testfile} | 32 set binfile ${objdir}/${subdir}/${testfile} |
37 | 33 |
38 # Create and source the file that provides information about the compiler | 34 # Create and source the file that provides information about the compiler |
39 # used to compile the test case. | 35 # used to compile the test case. |
40 if [get_compiler_info ${binfile}] { | 36 if [get_compiler_info] { |
41 return -1; | 37 return -1; |
42 } | 38 } |
43 | 39 |
44 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug
] != "" } { | 40 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug
] != "" } { |
45 untested constvars.exp | 41 untested constvars.exp |
46 return -1 | 42 return -1 |
47 } | 43 } |
48 | 44 |
49 gdb_exit | 45 gdb_exit |
50 gdb_start | 46 gdb_start |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 gdb_test "ptype lynx" "type = const double \\\[2\\\]" | 265 gdb_test "ptype lynx" "type = const double \\\[2\\\]" |
270 | 266 |
271 local_compiler_xfail_check | 267 local_compiler_xfail_check |
272 local_compiler_xfail_check_2 | 268 local_compiler_xfail_check_2 |
273 gdb_test "ptype crass" "type = struct crass \{\[\r\n\]+\[\ \t\]+char \\* con
st ptr;\[\r\n\]+\}" | 269 gdb_test "ptype crass" "type = struct crass \{\[\r\n\]+\[\ \t\]+char \\* con
st ptr;\[\r\n\]+\}" |
274 local_compiler_xfail_check | 270 local_compiler_xfail_check |
275 gdb_test "ptype crisp" "type = struct crisp \{\[\r\n\]+\[\ \t\]+char \\* con
st \\*ptr;\[\r\n\]+\}" | 271 gdb_test "ptype crisp" "type = struct crisp \{\[\r\n\]+\[\ \t\]+char \\* con
st \\*ptr;\[\r\n\]+\}" |
276 } | 272 } |
277 | 273 |
278 do_constvar_tests | 274 do_constvar_tests |
OLD | NEW |