OLD | NEW |
1 # Copyright 1998-1999, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1998-1999, 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 # This file was written by Elena Zannoni (ezannoni@cygnus.com) | 16 # This file was written by Elena Zannoni (ezannoni@cygnus.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 whatis command on expressions. | 20 # tests for whatis command on expressions. |
21 # used in file eval.c. This flavor of whatis | 21 # used in file eval.c. This flavor of whatis |
22 # command performs evaluation of expressions w/o actually | 22 # command performs evaluation of expressions w/o actually |
23 # computing the value, but just the type | 23 # computing the value, but just the type |
24 # of the result. It goes through the evaluate_subexp_standard | 24 # of the result. It goes through the evaluate_subexp_standard |
25 # with the EVAL_AVOID_SIDE_EFFECTS flag rather than EVAL_NORMAL | 25 # with the EVAL_AVOID_SIDE_EFFECTS flag rather than EVAL_NORMAL |
26 # | 26 # |
27 | 27 |
28 if $tracelevel then { | |
29 strace $tracelevel | |
30 } | |
31 | |
32 # | 28 # |
33 # test running programs | 29 # test running programs |
34 # | 30 # |
35 | 31 |
36 if { [prepare_for_testing whatis-exp.exp whatis-exp int-type.c {debug nowarnings
}] } { | 32 if { [prepare_for_testing whatis-exp.exp whatis-exp int-type.c {debug nowarnings
}] } { |
37 return -1 | 33 return -1 |
38 } | 34 } |
39 | 35 |
40 # | 36 # |
41 # set it up at a breakpoint so we can play with the variable values | 37 # set it up at a breakpoint so we can play with the variable values |
(...skipping 26 matching lines...) Expand all Loading... |
68 gdb_test "whatis x=y" "type = int" "whatis value of x=y" | 64 gdb_test "whatis x=y" "type = int" "whatis value of x=y" |
69 | 65 |
70 gdb_test "whatis x+=2" "type = int" "whatis value of x+=2" | 66 gdb_test "whatis x+=2" "type = int" "whatis value of x+=2" |
71 gdb_test "whatis ++x" "type = int" "whatis value of ++x" | 67 gdb_test "whatis ++x" "type = int" "whatis value of ++x" |
72 gdb_test "whatis --x" "type = int" "whatis value of --x" | 68 gdb_test "whatis --x" "type = int" "whatis value of --x" |
73 gdb_test "whatis x++" "type = int" "whatis value of x++" | 69 gdb_test "whatis x++" "type = int" "whatis value of x++" |
74 gdb_test "whatis x--" "type = int" "whatis value of x--" | 70 gdb_test "whatis x--" "type = int" "whatis value of x--" |
75 | 71 |
76 gdb_exit | 72 gdb_exit |
77 return 0 | 73 return 0 |
OLD | NEW |