Emit ^running via observer.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / gdb792.exp
1 # Copyright 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
2
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
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
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/>.
15
16 # Please email any bugs, comments, and/or additions to this file to:
17 # bug-gdb@prep.ai.mit.edu
18
19 #
20 # test gdb/792
21 #
22
23 if { [skip_cplus_tests] } { continue }
24
25 load_lib mi-support.exp
26 set MIFLAGS "-i=mi"
27
28 gdb_exit
29 if [mi_gdb_start] {
30 continue
31 }
32
33 set testfile gdb792
34 set srcfile "$testfile.cc"
35 set binfile $objdir/$subdir/$testfile
36
37 if [get_compiler_info ${binfile} "c++"] {
38 return -1;
39 }
40
41 if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
42 untested gdb792.exp
43 return -1
44 }
45
46 # Test that children of classes are properly reported
47
48 # Run to main
49 mi_run_to_main
50
51 mi_create_varobj "var1" "a" "create var for class A"
52
53 mi_list_varobj_children "var1" {
54 {var1.public public 2}
55 {var1.private private 2}
56 {var1.protected protected 2}
57 } "list children of class A"
58
59 mi_list_varobj_children "var1.public" {
60 {var1.public.x x 0 int}
61 {var1.public.buffer buffer 10 {char \[10\]}}
62 } "list children of A.public"
63
64 mi_list_varobj_children "var1.private" {
65 {var1.private.u u 0 int}
66 {var1.private.z z 0 float}
67 } "list children of A.private"
68
69 mi_list_varobj_children "var1.protected" {
70 {var1.protected.y y 0 int}
71 {var1.protected.b b 2 B}
72 } "list children of A.protected"
73
74 mi_list_varobj_children "var1.protected.b" {
75 {var1.protected.b.public public 2}
76 {var1.protected.b.private private 1}
77 } "list children of A.protected.b"
78
79 mi_list_varobj_children "var1.protected.b.public" {
80 {var1.protected.b.public.bx bx 0 int}
81 {var1.protected.b.public.by by 0 int}
82 } "list children of A.protected.b.public"
83
84 mi_list_varobj_children "var1.protected.b.private" {
85 {var1.protected.b.private.k k 0 int}
86 } "list children of A.protected.b.private"
87
88 mi_create_varobj "var2" "c" "create var for class C which has baseclass A"
89
90 mi_list_varobj_children "var2" {
91 {var2.A A 3 A}
92 {var2.public public 1}
93 {var2.private private 1}
94 } "list children of class C"
95
96 mi_gdb_exit
97 return 0
This page took 0.03273 seconds and 4 git commands to generate.