OLD | NEW |
1 # Copyright 2002, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2002, 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 # | 16 # |
17 # test gdb/701 | 17 # test gdb/701 |
18 # | 18 # |
19 | 19 |
20 load_lib mi-support.exp | 20 load_lib mi-support.exp |
21 set MIFLAGS "-i=mi" | 21 set MIFLAGS "-i=mi" |
22 | 22 |
23 gdb_exit | 23 gdb_exit |
24 if [mi_gdb_start] { | 24 if [mi_gdb_start] { |
25 continue | 25 continue |
26 } | 26 } |
27 | 27 |
28 set testfile gdb701 | 28 standard_testfile |
29 set srcfile "$testfile.c" | 29 |
30 set binfile $objdir/$subdir/$testfile | |
31 if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} { | 30 if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} { |
32 untested gdb701.exp | 31 untested gdb701.exp |
33 return -1 | 32 return -1 |
34 } | 33 } |
35 | 34 |
36 # When varobj reports the types of objects, it often isn't really reporting | 35 # When varobj reports the types of objects, it often isn't really reporting |
37 # the type as GDB knows it. For example, in this testcase, we have a | 36 # the type as GDB knows it. For example, in this testcase, we have a |
38 # structure which has been typedefed. A varobj of this type would really have | 37 # structure which has been typedefed. A varobj of this type would really have |
39 # a type of "TYPE_CODE_TYPEDEF". It's target type is "TYPE_CODE_STRUCT". Varobj | 38 # a type of "TYPE_CODE_TYPEDEF". It's target type is "TYPE_CODE_STRUCT". Varobj |
40 # should skip over the TYPEDEF type when figuring out the varobj's children. | 39 # should skip over the TYPEDEF type when figuring out the varobj's children. |
(...skipping 12 matching lines...) Expand all Loading... |
53 "list children of fooPtr" | 52 "list children of fooPtr" |
54 | 53 |
55 foreach i [list x y z] { | 54 foreach i [list x y z] { |
56 mi_gdb_test "-var-list-children fooPtr.$i" \ | 55 mi_gdb_test "-var-list-children fooPtr.$i" \ |
57 "(&\".*\"\r\n)*\\^done,numchild=\"0\",has_more=\"0\"" \ | 56 "(&\".*\"\r\n)*\\^done,numchild=\"0\",has_more=\"0\"" \ |
58 "list children of fooPtr.$i" | 57 "list children of fooPtr.$i" |
59 } | 58 } |
60 | 59 |
61 mi_gdb_exit | 60 mi_gdb_exit |
62 return 0 | 61 return 0 |
OLD | NEW |