OLD | NEW |
1 # Copyright 1998-1999, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1998-2013 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. |
(...skipping 12 matching lines...) Expand all Loading... |
24 # eval.c file | 24 # eval.c file |
25 # | 25 # |
26 # source file "int-type.c" | 26 # source file "int-type.c" |
27 # | 27 # |
28 | 28 |
29 | 29 |
30 # Check to see if we have an executable to test. If not, then either we | 30 # Check to see if we have an executable to test. If not, then either we |
31 # haven't tried to compile one, or the compilation failed for some reason. | 31 # haven't tried to compile one, or the compilation failed for some reason. |
32 # In either case, just notify the user and skip the tests in this file. | 32 # In either case, just notify the user and skip the tests in this file. |
33 | 33 |
34 set testfile "int-type" | 34 standard_testfile int-type.c |
35 set srcfile ${testfile}.c | 35 |
36 set binfile ${objdir}/${subdir}/${testfile} | |
37 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug nowarnings}] != "" } { | 36 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug nowarnings}] != "" } { |
38 untested cond-expr.exp | 37 untested cond-expr.exp |
39 return -1 | 38 return -1 |
40 } | 39 } |
41 | 40 |
42 | 41 |
43 gdb_exit | 42 clean_restart ${binfile} |
44 gdb_start | |
45 gdb_reinitialize_dir $srcdir/$subdir | |
46 gdb_load ${binfile} | |
47 | 43 |
48 | 44 |
49 if ![runto_main] then { | 45 if ![runto_main] then { |
50 perror "couldn't run to breakpoint" | 46 perror "couldn't run to breakpoint" |
51 continue | 47 continue |
52 } | 48 } |
53 | 49 |
54 gdb_test "print (2 ? 3 : 4)" "\[0-9\]* = 3" \ | 50 gdb_test "print (2 ? 3 : 4)" "\[0-9\]* = 3" \ |
55 "print value of cond expr (const true)" | 51 "print value of cond expr (const true)" |
56 | 52 |
(...skipping 18 matching lines...) Expand all Loading... |
75 | 71 |
76 | 72 |
77 | 73 |
78 | 74 |
79 | 75 |
80 | 76 |
81 | 77 |
82 | 78 |
83 | 79 |
84 | 80 |
OLD | NEW |