* c-typeprint.c (find_typedef_for_canonicalize,
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-var-child.exp
CommitLineData
0b302171
JB
1# Copyright 1999-2002, 2004-2005, 2007-2012 Free Software Foundation,
2# Inc.
602f3bfa 3
e22f8b7c 4# This program is free software; you can redistribute it and/or modify
fb40c209 5# it under the terms of the GNU General Public License as published by
e22f8b7c 6# the Free Software Foundation; either version 3 of the License, or
fb40c209
AC
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
e22f8b7c 15# along with this program. If not, see <http://www.gnu.org/licenses/>.
fb40c209 16
fb40c209
AC
17# Test essential Machine interface (MI) operations
18#
19# Verify that, using the MI, we can create, update, delete variables.
20#
21
22
23load_lib mi-support.exp
b30bf9ee 24set MIFLAGS "-i=mi"
fb40c209
AC
25
26gdb_exit
27if [mi_gdb_start] {
28 continue
29}
30
298a9cf0
TT
31standard_testfile
32
9357e021 33if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
b60f0898
JB
34 untested mi-var-child.exp
35 return -1
fb40c209
AC
36}
37
38mi_delete_breakpoints
39mi_gdb_reinitialize_dir $srcdir/$subdir
40mi_gdb_load ${binfile}
41
602f3bfa 42mi_runto do_children_tests
fb40c209 43
a73bafbc
VP
44set line_dlt_first_real [gdb_get_line_number "weird = &struct_declarations;"]
45mi_continue_to_line $line_dlt_first_real "step to real start of do_children_test"
46
47
fb40c209
AC
48##### #####
49# #
50# children tests #
51# #
52##### #####
53
fb40c209
AC
54# Test: c_variable-4.2
55# Desc: create variable "struct_declarations"
9e8e3afe 56mi_create_varobj "struct_declarations" "struct_declarations" \
3fddb3ad 57 "create local variable struct_declarations"
fb40c209
AC
58
59# Test: c_variable-4.3
60# Desc: children of struct_declarations
15002962
JB
61# STABS doesn't give us argument types for the func ptr structs, but
62# Dwarf 2 does.
9e8e3afe
VP
63mi_list_varobj_children "struct_declarations" {
64 {struct_declarations.integer integer 0 int}
65 {struct_declarations.character character 0 char}
66 {struct_declarations.char_ptr char_ptr 1 "char \\*"}
bd69fc68 67 {struct_declarations.long_int long_int 0 "long"}
9e8e3afe 68 {struct_declarations.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"}
bd69fc68 69 {struct_declarations.long_array long_array 12 "long \\[12\\]"}
9e8e3afe
VP
70 {struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"}
71 {struct_declarations.func_ptr_struct func_ptr_struct 0 \
bd69fc68 72 "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"}
9e8e3afe 73 {struct_declarations.func_ptr_ptr func_ptr_ptr 0 \
bd69fc68 74 "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"}
9e8e3afe
VP
75 {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"}
76 {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"}
77} "get children of struct_declarations"
fb40c209
AC
78
79#gdbtk_test c_variable-4.3 {children of struct_declarations} {
80# get_children struct_declarations
81#} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}
82
83# Test: c_variable-4.4
84# Desc: number of children of struct_declarations
85mi_gdb_test "-var-info-num-children struct_declarations" \
86 "\\^done,numchild=\"11\"" \
87 "get number of children of struct_declarations"
88
89# Test: c_variable-4.5
90# Desc: children of struct_declarations.integer
9e8e3afe
VP
91mi_list_varobj_children "struct_declarations.integer" {} \
92 "get children of struct_declarations.integer"
fb40c209
AC
93
94# Test: c_variable-4.6
95# Desc: number of children of struct_declarations.integer
96mi_gdb_test "-var-info-num-children struct_declarations.integer" \
97 "\\^done,numchild=\"0\"" \
98 "get number of children of struct_declarations.integer"
99
100# Test: c_variable-4.7
101# Desc: children of struct_declarations.character
9e8e3afe 102mi_list_varobj_children "struct_declarations.character" {} \
fb40c209
AC
103 "get children of struct_declarations.character"
104
105# Test: c_variable-4.8
106# Desc: number of children of struct_declarations.character
107mi_gdb_test "-var-info-num-children struct_declarations.character" \
108 "\\^done,numchild=\"0\"" \
109 "get number of children of struct_declarations.character"
110
111# Test: c_variable-4.9
112# Desc: children of struct_declarations.char_ptr
9e8e3afe
VP
113mi_list_varobj_children "struct_declarations.char_ptr" {
114 {{struct_declarations.char_ptr.\*char_ptr} {\*char_ptr} 0 char}
115} "get children of struct_declarations.char_ptr"
fb40c209
AC
116
117# Test: c_variable-4.10
118# Desc: number of children of struct_declarations.char_ptr
119mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \
e800833b 120 "\\^done,numchild=\"1\"" \
fb40c209
AC
121 "get number of children of struct_declarations.char_ptr"
122
123# Test: c_variable-4.11
124# Desc: children of struct_declarations.long_int
9e8e3afe 125mi_list_varobj_children "struct_declarations.long_int" {} \
fb40c209
AC
126 "get children of struct_declarations.long_int"
127
128# Test: c_variable-4.12
129# Desc: number of children of struct_declarations.long_int
130mi_gdb_test "-var-info-num-children struct_declarations.long_int" \
131 "\\^done,numchild=\"0\"" \
132 "get number of children of struct_declarations.long_int"
133
134# Test: c_variable-4.13
135# Desc: children of int_ptr_ptr
9e8e3afe
VP
136mi_list_varobj_children "struct_declarations.int_ptr_ptr" {
137 {{struct_declarations.int_ptr_ptr.\*int_ptr_ptr} {\*int_ptr_ptr} 1 {int \*}}
138} "get children of struct_declarations.int_ptr_ptr"
fb40c209
AC
139
140#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
141# get_children struct_declarations.int_ptr_ptr
142#} {*int_ptr_ptr}
143
144# Test: c_variable-4.14
145# Desc: number of children of int_ptr_ptr
146mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \
147 "\\^done,numchild=\"1\"" \
148 "get number of children of struct_declarations.int_ptr_ptr"
149
150
151# Test: c_variable-4.15
152# Desc: children of struct_declarations.long_array
bd69fc68
TT
153mi_list_array_varobj_children "struct_declarations.long_array" 12 \
154 "long" \
9e8e3afe 155 "get children of struct_declarations.long_array"
fb40c209
AC
156
157# Test: c_variable-4.16
158# Desc: number of children of struct_declarations.long_array
159mi_gdb_test "-var-info-num-children struct_declarations.long_array" \
d8d83e9b 160 "\\^done,numchild=\"12\"" \
fb40c209
AC
161 "get number of children of struct_declarations.long_array"
162
163# Test: c_variable-4.17
164# Desc: children of struct_declarations.func_ptr
9e8e3afe 165mi_list_varobj_children "struct_declarations.func_ptr" {} \
fb40c209
AC
166 "get children of struct_declarations.func_ptr"
167
fb40c209
AC
168# Test: c_variable-4.18
169# Desc: number of children of struct_declarations.func_ptr
170mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \
171 "\\^done,numchild=\"0\"" \
172 "get number of children of struct_declarations.func_ptr"
173
174
175# Test: c_variable-4.19
176# Desc: children of struct_declarations.func_ptr_struct
9e8e3afe 177mi_list_varobj_children "struct_declarations.func_ptr_struct" {} \
fb40c209
AC
178 "get children of struct_declarations.func_ptr_struct"
179
180# Test: c_variable-4.20
181# Desc: number of children of struct_declarations.func_ptr_struct
182mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \
183 "\\^done,numchild=\"0\"" \
184 "get number of children of struct_declarations.func_ptr_struct"
185
186
187# Test: c_variable-4.21
188# Desc: children of struct_declarations.func_ptr_ptr
9e8e3afe 189mi_list_varobj_children "struct_declarations.func_ptr_ptr" {} \
fb40c209
AC
190 "get children of struct_declarations.func_ptr_ptr"
191
192# Test: c_variable-4.22
193# Desc: number of children of struct_declarations.func_ptr_ptr
194mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \
9e8e3afe
VP
195 "\\^done,numchild=\"0\"" \
196 "get number of children of struct_declarations.func_ptr_ptr"
fb40c209
AC
197
198# Test: c_variable-4.23
199# Desc: children of struct_declarations.u1
9e8e3afe
VP
200mi_list_varobj_children "struct_declarations.u1" {
201 {struct_declarations.u1.a a 0 int}
202 {struct_declarations.u1.b b 1 {char \*}}
bd69fc68 203 {struct_declarations.u1.c c 0 {long}}
9e8e3afe
VP
204 {struct_declarations.u1.d d 0 {enum foo}}
205} "get children of struct_declarations.u1"
fb40c209
AC
206
207# Test: c_variable-4.24
208# Desc: number of children of struct_declarations.u1
209mi_gdb_test "-var-info-num-children struct_declarations.u1" \
210 "\\^done,numchild=\"4\"" \
211 "get number of children of struct_declarations.u1"
212
213# Test: c_variable-4.25
214# Desc: children of struct_declarations.s2
9e8e3afe
VP
215mi_list_varobj_children "struct_declarations.s2" {
216 {struct_declarations.s2.u2 u2 3 {union \{\.\.\.\}}}
217 {struct_declarations.s2.g g 0 int}
218 {struct_declarations.s2.h h 0 char}
bd69fc68 219 {struct_declarations.s2.i i 10 {long \[10\]}}
9e8e3afe
VP
220} "get children of struct_declarations.s2"
221
fb40c209
AC
222#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
223# get_children struct_declarations.s2
224#} {u2 g h i}
225
226# Test: c_variable-4.26
227# Desc: number of children of struct_declarations.s2
228mi_gdb_test "-var-info-num-children struct_declarations.s2" \
229 "\\^done,numchild=\"4\"" \
230 "get number of children of struct_declarations.s2"
231
232
9e8e3afe
VP
233for {set i 1} {$i <= 9} {incr i} {
234 mi_list_varobj_children "struct_declarations.long_array.$i" {} \
235 "get children of struct_declarations.long_array.$i"
fb40c209 236
9e8e3afe 237 mi_gdb_test "-var-info-num-children struct_declarations.long_array.$i" \
fb40c209 238 "\\^done,numchild=\"0\"" \
9e8e3afe
VP
239 "get number of children of struct_declarations.long_array.$i"
240}
fb40c209
AC
241
242# Test: c_variable-4.45
243# Desc: children of struct_declarations.u1.a
9e8e3afe 244mi_list_varobj_children "struct_declarations.u1.a" {} \
fb40c209
AC
245 "get children of struct_declarations.u1.a"
246
247# Test: c_variable-4.46
248# Desc: number of children of struct_declarations.u1.a
249mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \
250 "\\^done,numchild=\"0\"" \
251 "get number of children of struct_declarations.u1.a"
252
253# Test: c_variable-4.47
254# Desc: children of struct_declarations.u1.b
9e8e3afe
VP
255mi_list_varobj_children "struct_declarations.u1.b" {
256 {{struct_declarations.u1.b.\*b} {\*b} 0 char}
257} "get children of struct_declarations.u1.b"
fb40c209
AC
258
259# Test: c_variable-4.48
260# Desc: number of children of struct_declarations.u1.b
261mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \
e800833b 262 "\\^done,numchild=\"1\"" \
fb40c209
AC
263 "get number of children of struct_declarations.u1.b"
264
265# Test: c_variable-4.49
266# Desc: children of struct_declarations.u1.c
9e8e3afe 267mi_list_varobj_children "struct_declarations.u1.c" {} \
fb40c209
AC
268 "get children of struct_declarations.u1.c"
269
270# Test: c_variable-4.50
271# Desc: number of children of struct_declarations.u1.c
272mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \
273 "\\^done,numchild=\"0\"" \
274 "get number of children of struct_declarations.u1.c"
275
276# Test: c_variable-4.51
277# Desc: children of struct_declarations.u1.d
9e8e3afe 278mi_list_varobj_children "struct_declarations.u1.d" {} \
fb40c209
AC
279 "get children of struct_declarations.u1.d"
280
281
282# Test: c_variable-4.52
283# Desc: number of children of struct_declarations.u1.d
284mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \
285 "\\^done,numchild=\"0\"" \
286 "get number of children of struct_declarations.u1.d"
287
288
289# Test: c_variable-4.53
290# Desc: children of struct_declarations.s2.u2
9e8e3afe
VP
291mi_list_varobj_children "struct_declarations.s2.u2" {
292 {"struct_declarations.s2.u2.u1s1" "u1s1" 4 {struct \{\.\.\.\}}}
bd69fc68 293 {struct_declarations.s2.u2.f f 0 "long"}
9e8e3afe
VP
294 {struct_declarations.s2.u2.u1s2 u1s2 2 {struct \{\.\.\.\}}}
295} "get children of struct_declarations.s2.u2"
fb40c209
AC
296
297# Test: c_variable-4.54
298# Desc: number of children of struct_declarations.s2.u2
299mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \
300 "\\^done,numchild=\"3\"" \
301 "get number of children of struct_declarations.s2.u2"
302
303# Test: c_variable-4.55
304# Desc: children of struct_declarations.s2.g
9e8e3afe 305mi_list_varobj_children struct_declarations.s2.g {} \
fb40c209
AC
306 "get children of struct_declarations.s2.g"
307
308# Test: c_variable-4.56
309# Desc: number of children of struct_declarations.s2.g
310mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \
311 "\\^done,numchild=\"0\"" \
312 "get number of children of struct_declarations.s2.g"
313
314
315# Test: c_variable-4.57
316# Desc: children of struct_declarations.s2.h
9e8e3afe 317mi_list_varobj_children struct_declarations.s2.h {} \
fb40c209
AC
318 "get children of struct_declarations.s2.h"
319
320# Test: c_variable-4.58
321# Desc: number of children of struct_declarations.s2.h
322mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \
323 "\\^done,numchild=\"0\"" \
324 "get number of children of struct_declarations.s2.h"
325
326
327# Test: c_variable-4.59
328# Desc: children of struct_declarations.s2.i
9e8e3afe
VP
329set t {}
330for {set i 0} {$i < 10} {incr i} {
bd69fc68 331 lappend t [list struct_declarations.s2.i.$i $i 0 "long"]
9e8e3afe
VP
332}
333mi_list_varobj_children struct_declarations.s2.i $t \
fb40c209
AC
334 "get children of struct_declarations.s2.i"
335
336# Test: c_variable-4.60
337# Desc: number of children of struct_declarations.s2.i
338mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \
339 "\\^done,numchild=\"10\"" \
340 "get number of children of struct_declarations.s2.i"
341
342# Test: c_variable-4.61
343# Desc: children of struct_declarations.s2.u2.u1s1
9e8e3afe
VP
344mi_list_varobj_children struct_declarations.s2.u2.u1s1 {
345 {struct_declarations.s2.u2.u1s1.d d 0 int}
346 {struct_declarations.s2.u2.u1s1.e e 10 {char \[10\]}}
347 {struct_declarations.s2.u2.u1s1.func func 0 {int \*\(\*\)\((void)?\)}}
348 {struct_declarations.s2.u2.u1s1.foo foo 0 efoo}
349} "get children of struct_declarations.s2.u2.u1s1"
fb40c209
AC
350
351# Test: c_variable-4.62
352# Desc: number of children of struct_declarations.s2.u2.u1s1
353mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \
354 "\\^done,numchild=\"4\"" \
355 "get number of children of struct_declarations.s2.u2.u1s1"
356
357# Test: c_variable-4.63
358# Desc: children of struct_declarations.s2.u2.f
9e8e3afe 359mi_list_varobj_children struct_declarations.s2.u2.f {} \
fb40c209
AC
360 "get children of struct_declarations.s2.u2.f"
361
362# Test: c_variable-4.64
363# Desc: number of children of struct_declarations.s2.u2.f
364mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \
365 "\\^done,numchild=\"0\"" \
366 "get number of children of struct_declarations.s2.u2.f"
367
368# Test: c_variable-4.65
369# Desc: children of struct_declarations.s2.u2.u1s2
9e8e3afe
VP
370mi_list_varobj_children struct_declarations.s2.u2.u1s2 {
371 {struct_declarations.s2.u2.u1s2.array_ptr array_ptr 2 {char \[2\]}}
372 {struct_declarations.s2.u2.u1s2.func func 0 {int \(\*\)\((int, char \*)?\)}}
373} "get children of struct_declarations.s2.u2.u1s2"
fb40c209
AC
374
375# Test: c_variable-4.66
376# Desc: number of children of struct_declarations.s2.u2.u1s2
377mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \
378 "\\^done,numchild=\"2\"" \
379 "get number of children of struct_declarations.s2.u2.u1s2"
380
381# Test: c_variable-4.67
382# Desc: children of struct_declarations.s2.u2.u1s1.d
9e8e3afe 383mi_list_varobj_children struct_declarations.s2.u2.u1s1.d {} \
fb40c209
AC
384 "get children of struct_declarations.s2.u2.u1s1.d"
385
386# Test: c_variable-4.68
387# Desc: number of children of struct_declarations.s2.u2.u1s1.d
388mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \
389 "\\^done,numchild=\"0\"" \
390 "get number of children of struct_declarations.s2.u2.u1s1.d"
391
392# Test: c_variable-4.69
393# Desc: children of struct_declarations.s2.u2.u1s1.e
9e8e3afe
VP
394set t {}
395for {set i 0} {$i < 10} {incr i} {
396 lappend t [list struct_declarations.s2.u2.u1s1.e.$i $i 0 char]
397}
398mi_list_varobj_children struct_declarations.s2.u2.u1s1.e $t \
fb40c209
AC
399 "get children of struct_declarations.s2.u2.u1s1.e"
400
401# Test: c_variable-4.70
402# Desc: number of children of struct_declarations.s2.u2.u1s1.e
403mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \
404 "\\^done,numchild=\"10\"" \
405 "get number of children of struct_declarations.s2.u2.u1s1.e"
406
407
408# Test: c_variable-4.71
409# Desc: children of struct_declarations.s2.u2.u1s1.func
9e8e3afe 410mi_list_varobj_children struct_declarations.s2.u2.u1s1.func {} \
fb40c209
AC
411 "get children of struct_declarations.s2.u2.u1s1.func"
412
413# Test: c_variable-4.72
414# Desc: number of children of struct_declarations.s2.u2.u1s1.func
415mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \
416 "\\^done,numchild=\"0\"" \
417 "get number of children of struct_declarations.s2.u2.u1s1.func"
418
419
420# Test: c_variable-4.73
421# Desc: children of struct_declarations.s2.u2.u1s1.foo
9e8e3afe 422mi_list_varobj_children struct_declarations.s2.u2.u1s1.foo {} \
fb40c209
AC
423 "get children of struct_declarations.s2.u2.u1s1.foo"
424
425# Test: c_variable-4.74
426# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
427mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \
428 "\\^done,numchild=\"0\"" \
429 "get number of children of struct_declarations.s2.u2.u1s1.foo"
430
431
432# Test: c_variable-4.75
433# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
9e8e3afe
VP
434mi_list_varobj_children struct_declarations.s2.u2.u1s2.array_ptr {
435 {struct_declarations.s2.u2.u1s2.array_ptr.0 0 0 char}
436 {struct_declarations.s2.u2.u1s2.array_ptr.1 1 0 char}
437} "get children of struct_declarations.s2.u2.u1s2.array_ptr"
fb40c209
AC
438
439# Test: c_variable-4.76
440# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
441mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \
442 "\\^done,numchild=\"2\"" \
443 "get number of children of struct_declarations.s2.u2.u1s2.array_ptr"
444
445# Test: c_variable-4.77
446# Desc: children of struct_declarations.s2.u2.u1s2.func
9e8e3afe 447mi_list_varobj_children struct_declarations.s2.u2.u1s2.func {} \
fb40c209
AC
448 "get children of struct_declarations.s2.u2.u1s2.func"
449
450# Test: c_variable-4.78
451# Desc: number of children of struct_declarations.s2.u2.u1s2.func
452mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \
453 "\\^done,numchild=\"0\"" \
454 "get number of children of struct_declarations.s2.u2.u1s2.func"
455
456# Test: c_variable-4.79
457# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
9e8e3afe
VP
458mi_list_varobj_children "struct_declarations.int_ptr_ptr.*int_ptr_ptr" {
459 {{struct_declarations.int_ptr_ptr.\*int_ptr_ptr.\*\*int_ptr_ptr} \
460 {\*\*int_ptr_ptr} 0 int}
461} "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
fb40c209
AC
462
463# Test: c_variable-4.80
464# Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
465mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
466 "\\^done,numchild=\"1\"" \
467 "get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
468
469
470# Step to "struct_declarations.integer = 123;"
469aff8e 471set line_dct_123 [gdb_get_line_number "struct_declarations.integer = 123;"]
8be260b6 472mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 473 $line_dct_123 "step to line \$line_dct_123"
fb40c209
AC
474
475# Test: c_variable-4.81
476# Desc: create local variable "weird"
9e8e3afe 477mi_create_varobj weird weird "create local variable weird"
fb40c209
AC
478
479# Test: c_variable-4.82
480# Desc: children of weird
9e8e3afe
VP
481mi_list_varobj_children "weird" {
482 {weird.integer integer 0 int}
483 {weird.character character 0 char}
484 {weird.char_ptr char_ptr 1 "char \\*"}
bd69fc68 485 {weird.long_int long_int 0 "long"}
9e8e3afe 486 {weird.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"}
bd69fc68 487 {weird.long_array long_array 12 "long \\[12\\]"}
9e8e3afe
VP
488 {weird.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"}
489 {weird.func_ptr_struct func_ptr_struct 0 \
bd69fc68 490 "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"}
9e8e3afe 491 {weird.func_ptr_ptr func_ptr_ptr 0 \
bd69fc68 492 "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"}
9e8e3afe
VP
493 {weird.u1 u1 4 "union \\{\\.\\.\\.\\}"}
494 {weird.s2 s2 4 "struct \\{\\.\\.\\.\\}"}
495} "get children of weird"
fb40c209
AC
496
497# Test: c_variable-4.83
498# Desc: number of children of weird
499mi_gdb_test "-var-info-num-children weird" \
500 "\\^done,numchild=\"11\"" \
501 "get number of children of weird"
502
503
504# Test: c_variable-4.84
505# Desc: children of weird->long_array
bd69fc68 506mi_list_array_varobj_children weird.long_array 12 "long" \
fb40c209
AC
507 "get children of weird.long_array"
508#gdbtk_test c_variable-4.84 {children of weird->long_array} {
509# get_children weird.long_array
d8d83e9b 510#} {0 1 2 3 4 5 6 7 8 9 10 11}
fb40c209
AC
511
512# Test: c_variable-4.85
513# Desc: number of children of weird.long_array
514mi_gdb_test "-var-info-num-children weird.long_array" \
d8d83e9b 515 "\\^done,numchild=\"12\"" \
fb40c209
AC
516 "get number of children of weird.long_array"
517
518# Test: c_variable-4.86
519# Desc: children of weird.int_ptr_ptr
9e8e3afe
VP
520mi_list_varobj_children weird.int_ptr_ptr {
521 {{weird.int_ptr_ptr.\*int_ptr_ptr} {\*int_ptr_ptr} 1 {int \*}}
522} "get children of weird.int_ptr_ptr"
fb40c209
AC
523#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
524# get_children weird.int_ptr_ptr
525#} {*int_ptr_ptr}
526
527# Test: c_variable-4.87
528# Desc: number of children of weird.int_ptr_ptr
529mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \
530 "\\^done,numchild=\"1\"" \
531 "get number of children of weird.int_ptr_ptr"
532
533# Test: c_variable-4.88
534# Desc: children of *weird->int_ptr_ptr
9e8e3afe
VP
535mi_list_varobj_children "weird.int_ptr_ptr.*int_ptr_ptr" {
536 {{weird.int_ptr_ptr.\*int_ptr_ptr.\*\*int_ptr_ptr} {\*\*int_ptr_ptr} 0 "int"}
537} "get children of weird.int_ptr_ptr.*int_ptr_ptr"
fb40c209
AC
538#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
539# get_children weird.int_ptr_ptr.*int_ptr_ptr
540#} {**int_ptr_ptr}
541
542# Test: c_variable-4.89
543# Desc: number of children *weird->int_ptr_ptr
544mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \
545 "\\^done,numchild=\"1\"" \
546 "get number of children of weird.int_ptr_ptr.*int_ptr_ptr"
547
548# Test: c_variable-4.90
549# Desc: create weird->int_ptr_ptr
9e8e3afe 550mi_create_varobj "weird->int_ptr_ptr" "weird->int_ptr_ptr" \
3fddb3ad 551 "create local variable weird->int_ptr_ptr"
fb40c209
AC
552
553# Test: c_variable-4.91
554# Desc: children of weird->int_ptr_ptr
9e8e3afe
VP
555mi_list_varobj_children "weird->int_ptr_ptr" {
556 {{weird->int_ptr_ptr.\*weird->int_ptr_ptr} {\*weird->int_ptr_ptr} 1 {int \*}}
557} "get children of weird->int_ptr_ptr"
fb40c209
AC
558
559# Test: c_variable-4.92
560# Desc: number of children of (weird->int_ptr_ptr)
561mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \
562 "\\^done,numchild=\"1\"" \
563 "get number of children of weird->int_ptr_ptr"
564
565# Test: c_variable-4.93
566# Desc: children of *(weird->int_ptr_ptr)
9e8e3afe
VP
567mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr" {
568 {{weird->int_ptr_ptr.\*weird->int_ptr_ptr.\*\*weird->int_ptr_ptr} \
569 {\*\*weird->int_ptr_ptr} 0 int}
570} "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
fb40c209
AC
571
572# Test: c_variable-4.94
573# Desc: number of children of *(weird->int_ptr_ptr)
574mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
575 "\\^done,numchild=\"1\"" \
576 "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
577
578# Test: c_variable-4.95
579# Desc: children of *(*(weird->int_ptr_ptr))
9e8e3afe 580mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" {} \
fb40c209
AC
581 "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"
582
583# Test: c_variable-4.96
584# Desc: number of children of *(*(weird->int_ptr_ptr))
9e8e3afe 585mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" {} \
fb40c209
AC
586 "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"
587
588# Test: c_variable-4.97
589# Desc: is weird editable
590mi_gdb_test "-var-show-attributes weird" \
591 "\\^done,attr=\"editable\"" \
592 "is weird editable"
593
594# Test: c_variable-4.98
595# Desc: is weird->int_ptr_ptr editable
596mi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \
597 "\\^done,attr=\"editable\"" \
598 "is weird->int_ptr_ptr editable"
599
600# Test: c_variable-4.99
601# Desc: is *(weird->int_ptr_ptr) editable
602mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \
c7dd36a1 603 "\\^done,attr=\"editable\"" \
fb40c209
AC
604 "is weird.int_ptr_ptr.*int_ptr_ptr editable"
605
606# Test: c_variable-4.100
607# Desc: is *(*(weird->int_ptr_ptr)) editable
608mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \
c7dd36a1 609 "\\^done,attr=\"editable\"" \
fb40c209
AC
610 "is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable"
611
612# Test: c_variable-4.101
613# Desc: is weird->u1 editable
614mi_gdb_test "-var-show-attributes weird.u1" \
615 "\\^done,attr=\"noneditable\"" \
616 "is weird.u1 editable"
617
618# Test: c_variable-4.102
619# Desc: is weird->s2 editable
620mi_gdb_test "-var-show-attributes weird.s2" \
621 "\\^done,attr=\"noneditable\"" \
622 "is weird.s2 editable"
623
624# Test: c_variable-4.103
625# Desc: is struct_declarations.u1.a editable
626mi_gdb_test "-var-show-attributes struct_declarations.u1.a" \
627 "\\^done,attr=\"editable\"" \
628 "is struct_declarations.u1.a editable"
629
630# Test: c_variable-4.104
631# Desc: is struct_declarations.u1.b editable
632mi_gdb_test "-var-show-attributes struct_declarations.u1.b" \
633 "\\^done,attr=\"editable\"" \
634 "is struct_declarations.u1.b editable"
635
636# Test: c_variable-4.105
637# Desc: is struct_declarations.u1.c editable
638mi_gdb_test "-var-show-attributes struct_declarations.u1.c" \
639 "\\^done,attr=\"editable\"" \
640 "is struct_declarations.u1.c editable"
641
642# Test: c_variable-4.106
643# Desc: is struct_declarations.long_array editable
644mi_gdb_test "-var-show-attributes struct_declarations.long_array" \
645 "\\^done,attr=\"noneditable\"" \
646 "is struct_declarations.long_array editable"
647
648# Test: c_variable-4.107
649# Desc: is struct_declarations.long_array[0] editable
650mi_gdb_test "-var-show-attributes struct_declarations.long_array.0" \
651 "\\^done,attr=\"editable\"" \
652 "is struct_declarations.long_array.0 editable"
653
654# Test: c_variable-4.108
655# Desc: is struct_declarations editable
656mi_gdb_test "-var-show-attributes struct_declarations" \
657 "\\^done,attr=\"noneditable\"" \
658 "is struct_declarations editable"
659
660mi_gdb_test "-var-delete weird" \
d8d83e9b 661 "\\^done,ndeleted=\"26\"" \
fb40c209
AC
662 "delete var weird"
663
664##### #####
665# #
666# children and update tests #
667# #
668##### #####
669
670# Test: c_variable-5.1
671# Desc: check that nothing changed
672mi_gdb_test "-var-update *" \
93cae4bf 673 "\\^done,changelist=\\\[\\\]" \
fb40c209
AC
674 "update all vars. None changed"
675
676# Step over "struct_declarations.integer = 123;"
8be260b6 677mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 678 [expr $line_dct_123 + 1] "step \$line_dct_123 + 1"
fb40c209
AC
679
680# Test: c_variable-5.2
681# Desc: check that integer changed
682mi_gdb_test "-var-update *" \
0cc7d26f 683 "\\^done,changelist=\\\[\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
684 "update all vars struct_declarations.integer"
685
686# Step over:
687# weird->char_ptr = "hello";
688# bar = 2121;
689# foo = &bar;
8be260b6 690mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} ".*${srcfile}" \
469aff8e 691 [expr $line_dct_123 + 4] {} "step \$line_dct_123 + 4"
fb40c209
AC
692
693# Test: c_variable-5.3
694# Desc: check that char_ptr changed
695mi_gdb_test "-var-update *" \
0cc7d26f 696 "\\^done,changelist=\\\[\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
697 "update all vars struct_declarations.char_ptr"
698
699# Step over "struct_declarations.int_ptr_ptr = &foo;"
8be260b6 700mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 701 [expr $line_dct_123 + 5] "step \$line_dct_123 + 5"
fb40c209
AC
702
703# Test: c_variable-5.4
704# Desc: check that int_ptr_ptr and children changed
705mi_gdb_test "-var-update *" \
0cc7d26f 706 "\\^done,changelist=\\\[\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
707 "update all vars int_ptr_ptr and children changed"
708
709# Step over "weird->long_array[0] = 1234;"
8be260b6 710mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 711 [expr $line_dct_123 + 6] "step \$line_dct_123 + 6"
fb40c209
AC
712
713# Test: c_variable-5.5
714# Desc: check that long_array[0] changed
715mi_gdb_test "-var-update *" \
0cc7d26f 716 "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
717 "update all vars struct_declarations.long_array.0 changed"
718
719# Step over "struct_declarations.long_array[1] = 2345;"
8be260b6 720mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 721 [expr $line_dct_123 + 7] "step \$line_dct_123 + 7"
fb40c209
AC
722
723# Test: c_variable-5.6
724# Desc: check that long_array[1] changed
725mi_gdb_test "-var-update *" \
0cc7d26f 726 "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
727 "update all vars struct_declarations.long_array.1 changed"
728
729# Step over "weird->long_array[2] = 3456;"
8be260b6 730mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 731 [expr $line_dct_123 + 8] "step \$line_dct_123 + 8"
fb40c209
AC
732
733# Test: c_variable-5.7
734# Desc: check that long_array[2] changed
735mi_gdb_test "-var-update *" \
0cc7d26f 736 "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
737 "update all vars struct_declarations.long_array.2 changed"
738
739# Step over:
740# struct_declarations.long_array[3] = 4567;
741# weird->long_array[4] = 5678;
742# struct_declarations.long_array[5] = 6789;
743# weird->long_array[6] = 7890;
744# struct_declarations.long_array[7] = 8901;
745# weird->long_array[8] = 9012;
746# struct_declarations.long_array[9] = 1234;
469aff8e
MC
747
748set line_dct_nothing [gdb_get_line_number "weird->func_ptr = nothing;"]
8be260b6 749mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} ".*${srcfile}" \
469aff8e 750 $line_dct_nothing {} "step \$line_dct_nothing"
fb40c209
AC
751
752# Test: c_variable-5.8
753# Desc: check that long_array[3-9] changed
754mi_gdb_test "-var-update *" \
0cc7d26f 755 "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
756 "update all vars struct_declarations.long_array.3-9 changed"
757
758
d8d83e9b 759# Step over "weird->func_ptr = nothing";
8be260b6 760mi_step_to do_children_tests {} ".*${srcfile}" \
d8d83e9b 761 [expr $line_dct_nothing + 1] "step \$line_dct_nothing + 1"
fb40c209
AC
762
763# Test: c_variable-5.9
764# Desc: check that func_ptr changed
765mi_gdb_test "-var-update *" \
0cc7d26f 766 "\\^done,changelist=\\\[\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
767 "update all vars struct_declarations.func_ptr changed"
768
d8d83e9b 769# Step over "struct_declarations.long_array[10] = 3456";
8be260b6 770mi_step_to do_children_tests {} ".*${srcfile}" \
d8d83e9b
NR
771 [expr $line_dct_nothing + 2] "step \$line_dct_nothing + 2"
772
773mi_gdb_test "-var-update --no-values *" \
0cc7d26f 774 "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.10\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
d8d83e9b
NR
775 "update all vars struct_declarations.long_array.10 changed, don't print values."
776
777# Step over "struct_declarations.long_array[11] = 5678";
a73bafbc 778set line_dct_a0_0 [gdb_get_line_number "a0\[0\] = '0';"]
8be260b6 779mi_step_to do_children_tests {} ".*${srcfile}" \
d8d83e9b
NR
780 $line_dct_a0_0 "step \$line_dct_a0_0"
781
782mi_gdb_test "-var-update --all-values *" \
0cc7d26f 783 "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.11\",value=\"5678\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
d8d83e9b
NR
784 "update all vars struct_declarations.long_array.11 changed, print values."
785
9e8e3afe 786mi_list_varobj_children {struct_declarations.long_array --all-values} {
bd69fc68
TT
787 {struct_declarations.long_array.0 0 0 "long" 1234}
788 {struct_declarations.long_array.1 1 0 "long" 2345}
789 {struct_declarations.long_array.2 2 0 "long" 3456}
790 {struct_declarations.long_array.3 3 0 "long" 4567}
791 {struct_declarations.long_array.4 4 0 "long" 5678}
792 {struct_declarations.long_array.5 5 0 "long" 6789}
793 {struct_declarations.long_array.6 6 0 "long" 7890}
794 {struct_declarations.long_array.7 7 0 "long" 8901}
795 {struct_declarations.long_array.8 8 0 "long" 9012}
796 {struct_declarations.long_array.9 9 0 "long" 1234}
797 {struct_declarations.long_array.10 10 0 "long" 3456}
798 {struct_declarations.long_array.11 11 0 "long" 5678}
9e8e3afe
VP
799} "listing of names and values of children"
800
801mi_list_varobj_children {struct_declarations --simple-values} \
802 [list \
803 {struct_declarations.integer integer 0 int 123} \
30b66ecc 804 {struct_declarations.character character 0 char {0 '\\\\000'}} \
9e8e3afe 805 [list struct_declarations.char_ptr char_ptr 1 "char \\*" "$hex \\\\\"hello\\\\\""] \
bd69fc68 806 {struct_declarations.long_int long_int 0 "long" 0} \
9e8e3afe 807 [list struct_declarations.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*" "$hex"] \
bd69fc68 808 {struct_declarations.long_array long_array 12 "long \\[12\\]"} \
9e8e3afe
VP
809 [list struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)" "(@$hex: |)$hex <nothing>"] \
810 {struct_declarations.func_ptr_struct func_ptr_struct 0 \
bd69fc68 811 "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?" 0x0} \
9e8e3afe 812 {struct_declarations.func_ptr_ptr func_ptr_ptr 0 \
bd69fc68 813 "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)" 0x0} \
9e8e3afe
VP
814 {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"} \
815 {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"} \
816] "listing of children, simple types: names, type and values, complex types: names and types"
d8d83e9b 817
fb40c209
AC
818# Delete all variables
819mi_gdb_test "-var-delete struct_declarations" \
d8d83e9b 820 "\\^done,ndeleted=\"67\"" \
fb40c209
AC
821 "delete var struct_declarations"
822
823mi_gdb_test "-var-delete weird->int_ptr_ptr" \
824 "\\^done,ndeleted=\"3\"" \
825 "delete var weird->int_ptr_ptr"
826
827# Step over all lines:
828# ...
829# psnp = &snp0;
469aff8e
MC
830
831set line_dct_snp0 [gdb_get_line_number "psnp = &snp0;"]
8be260b6 832mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} ".*${srcfile}" \
469aff8e 833 [expr $line_dct_snp0 + 1] {} "step \$line_dct_snp0 + 1"
fb40c209
AC
834
835# Test: c_variable-5.10
836# Desc: create psnp->char_ptr
9e8e3afe 837mi_create_varobj "psnp->char_ptr" "psnp->char_ptr" \
3fddb3ad 838 "create local variable psnp->char_ptr"
fb40c209
AC
839
840# Test: c_variable-5.11
841# Desc: children of psnp->char_ptr
9e8e3afe
VP
842mi_list_varobj_children "psnp->char_ptr" {
843 {{psnp->char_ptr.\*psnp->char_ptr} {\*psnp->char_ptr} 1 {char \*\*\*}}
844} "get children of psnp->char_ptr"
fb40c209
AC
845
846# Test: c_variable-5.12
847# Desc: number of children of psnp->char_ptr
848mi_gdb_test "-var-info-num-children psnp->char_ptr" \
849 "\\^done,numchild=\"1\"" \
850 "get number of children of psnp->char_ptr"
851
852# Test: c_variable-5.13
853# Desc: children of *(psnp->char_ptr)
9e8e3afe
VP
854mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr" {
855 {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr} \
856 {\*\*psnp->char_ptr} 1 {char \*\*}}
857} "get children of psnp->char_ptr.*psnp->char_ptr"
fb40c209
AC
858
859# Test: c_variable-5.14
860# Desc: number of children of *(psnp->char_ptr)
861mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \
862 "\\^done,numchild=\"1\"" \
863 "get number of children of psnp->char_ptr.*psnp->char_ptr"
864
865# Test: c_variable-5.15
866# Desc: children of *(*(psnp->char_ptr))
9e8e3afe
VP
867mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" {
868 {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr} \
869 {\*\*\*psnp->char_ptr} 1 {char \*}}
870} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
e800833b
FN
871
872# Test: c_variable-5.15B
873# Desc: children of *(*(*(psnp->char_ptr)))
9e8e3afe
VP
874mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" {
875 {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \
876 {\*\*\*\*psnp->char_ptr} 0 char}
877} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
fb40c209
AC
878
879# Test: c_variable-5.16
880# Desc: number of children of *(*(psnp->char_ptr))
881mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
882 "\\^done,numchild=\"1\"" \
883 "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
884
885# Test: c_variable-5.17
886# Desc: children of *(*(*(psnp->char_ptr)))
9e8e3afe
VP
887mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" {
888 {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \
889 {\*\*\*\*psnp->char_ptr} 0 char}
890} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
fb40c209
AC
891
892# Test: c_variable-5.18
893# Desc: number of children of *(*(*(psnp->char_ptr)))
894mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
e800833b 895 "\\^done,numchild=\"1\"" \
fb40c209
AC
896 "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
897
e800833b
FN
898# Test: c_variable-5.17B
899# Desc: children of *(*(*(*(psnp->char_ptr))))
9e8e3afe 900mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" {} \
e800833b
FN
901 "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
902
903# Test: c_variable-5.18B
904# Desc: number of children of *(*(*(*(psnp->char_ptr))))
905mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
906 "\\^done,numchild=\"0\"" \
907 "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
908
fb40c209
AC
909# Test: c_variable-5.19
910# Desc: create psnp->long_ptr
9e8e3afe 911mi_create_varobj "psnp->long_ptr" "psnp->long_ptr" \
3fddb3ad 912 "create local variable psnp->long_ptr"
fb40c209
AC
913
914# Test: c_variable-5.20
915# Desc: children of psnp->long_ptr
9e8e3afe 916mi_list_varobj_children "psnp->long_ptr" {
bd69fc68 917 {{psnp->long_ptr.\*psnp->long_ptr} {\*psnp->long_ptr} 1 {long \*\*\*}}
9e8e3afe 918} "get children of psnp->long_ptr"
fb40c209
AC
919
920# Test: c_variable-5.21
921# Desc: number of children of psnp->long_ptr
922mi_gdb_test "-var-info-num-children psnp->long_ptr" \
923 "\\^done,numchild=\"1\"" \
924 "get number of children of psnp->long_ptr"
925
926# Test: c_variable-5.22
927# Desc: children of *(psnp->long_ptr)
9e8e3afe 928mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr" {
bd69fc68 929 {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr} {\*\*psnp->long_ptr} 1 {long \*\*}}
9e8e3afe 930} "get children of psnp->long_ptr.*psnp->long_ptr"
fb40c209
AC
931
932
933# Test: c_variable-5.23
934# Desc: number of children of *(psnp->long_ptr)
935mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \
936 "\\^done,numchild=\"1\"" \
937 "get number of children of psnp->long_ptr.*psnp->long_ptr"
938
939# Test: c_variable-5.24
940# Desc: children of *(*(psnp->long_ptr))
9e8e3afe
VP
941mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" {
942 {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr} \
bd69fc68 943 {\*\*\*psnp->long_ptr} 1 {long \*}}
9e8e3afe 944} "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
fb40c209
AC
945
946# Test: c_variable-5.25
947# Desc: number of children of *(*(psnp->long_ptr))
948mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
949 "\\^done,numchild=\"1\"" \
950 "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
951
952# Test: c_variable-5.26
953# Desc: children of *(*(*(psnp->long_ptr)))
9e8e3afe
VP
954mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" {
955 {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr.\*\*\*\*psnp->long_ptr}
bd69fc68 956 {\*\*\*\*psnp->long_ptr} 0 {long}}
9e8e3afe 957} "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
fb40c209
AC
958
959# Test: c_variable-5.27
960# Desc: number of children of *(*(*(psnp->long_ptr)))
961mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
962 "\\^done,numchild=\"1\"" \
963 "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
964
965# Test: c_variable-5.28
966# Desc: children of *(*(*(*(psnp->long_ptr))))
9e8e3afe 967mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" {} \
fb40c209
AC
968 "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
969
970# Test: c_variable-5.29
971# Desc: number of children of *(*(*(*(psnp->long_ptr))))
972mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
973 "\\^done,numchild=\"0\"" \
974 "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
975
976# Test: c_variable-5.30
977# Desc: create psnp->ptrs
9e8e3afe 978mi_create_varobj "psnp->ptrs" "psnp->ptrs" \
3fddb3ad 979 "create local variable psnp->ptrs"
fb40c209
AC
980
981# Test: c_variable-5.31
982# Desc: children of psnp->ptrs
9e8e3afe
VP
983mi_list_varobj_children "psnp->ptrs" {
984 {psnp->ptrs.0 0 4 {struct _struct_n_pointer \*}}
985 {psnp->ptrs.1 1 4 {struct _struct_n_pointer \*}}
986 {psnp->ptrs.2 2 4 {struct _struct_n_pointer \*}}
987} "get children of psnp->ptrs"
fb40c209
AC
988
989# Test: c_variable-5.32
990# Desc: number of children of psnp->ptrs
991mi_gdb_test "-var-info-num-children psnp->ptrs" \
992 "\\^done,numchild=\"3\"" \
993 "get number of children of psnp->ptrs"
994
995# Test: c_variable-5.33
996# Desc: children of psnp->ptrs[0]
9e8e3afe
VP
997mi_list_varobj_children "psnp->ptrs.0" {
998 {psnp->ptrs.0.char_ptr char_ptr 1 {char \*\*\*\*}}
bd69fc68 999 {psnp->ptrs.0.long_ptr long_ptr 1 {long \*\*\*\*}}
9e8e3afe
VP
1000 {psnp->ptrs.0.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}}
1001 {psnp->ptrs.0.next next 4 {struct _struct_n_pointer \*}}
1002} "get children of psnp->ptrs.0"
fb40c209
AC
1003
1004# Test: c_variable-5.34
1005# Desc: number of children of psnp->ptrs[0]
1006mi_gdb_test "-var-info-num-children psnp->ptrs.0" \
1007 "\\^done,numchild=\"4\"" \
1008 "get number of children of psnp->ptrs.0"
1009
1010# Test: c_variable-5.35
1011# Desc: children of psnp->ptrs[0]->next
9e8e3afe
VP
1012mi_list_varobj_children "psnp->ptrs.0.next" {
1013 {psnp->ptrs.0.next.char_ptr char_ptr 1 {char \*\*\*\*}}
bd69fc68 1014 {psnp->ptrs.0.next.long_ptr long_ptr 1 {long \*\*\*\*}}
9e8e3afe
VP
1015 {psnp->ptrs.0.next.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}}
1016 {psnp->ptrs.0.next.next next 4 {struct _struct_n_pointer \*}}
1017} "get children of psnp->ptrs.0.next"
fb40c209
AC
1018
1019#} {char_ptr long_ptr ptrs next}
1020
1021# Test: c_variable-5.36
1022# Desc: number of children of psnp->ptrs[0]->next
1023mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \
1024 "\\^done,numchild=\"4\"" \
1025 "get number of children of psnp->ptrs.0.next"
1026
1027
1028# Test: c_variable-5.37
1029# Desc: children of psnp->ptrs[0]->next->char_ptr
9e8e3afe
VP
1030mi_list_varobj_children "psnp->ptrs.0.next.char_ptr" {
1031 {{psnp->ptrs.0.next.char_ptr.\*char_ptr} {\*char_ptr} 1 {char \*\*\*}}
1032} "get children of psnp->ptrs.0.next.char_ptr"
fb40c209
AC
1033
1034#gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} {
1035# get_children psnp->ptrs.0.next.char_ptr
1036#} {*char_ptr}
1037
1038# Test: c_variable-5.38
1039# Desc: number of children of psnp->ptrs[0]->next->char_ptr
1040mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \
1041 "\\^done,numchild=\"1\"" \
1042 "get number of children of psnp->ptrs.0.next.char_ptr"
1043
1044# Test: c_variable-5.39
1045# Desc: children of *psnp->ptrs[0]->next->char_ptr
9e8e3afe
VP
1046mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr" {
1047 {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr} {\*\*char_ptr} 1 {char \*\*}}
1048} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr"
fb40c209
AC
1049
1050# Test: c_variable-5.40
1051# Desc: number of children of *psnp->ptrs[0]->next->char_ptr
1052mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
1053 "\\^done,numchild=\"1\"" \
1054 "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr"
1055
1056# Test: c_variable-5.41
1057# Desc: children of **psnp->ptrs[0]->next->char_ptr
9e8e3afe
VP
1058mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" {
1059 {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr} \
1060 {\*\*\*char_ptr} 1 {char \*}}
1061} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
e800833b
FN
1062
1063# Test: c_variable-5.41B
1064# Desc: children of ***psnp->ptrs[0]->next->char_ptr
9e8e3afe
VP
1065mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
1066 {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
1067 {\*\*\*\*char_ptr} 0 char}
1068} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
fb40c209
AC
1069
1070# Test: c_variable-5.42
1071# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
1072mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
1073 "\\^done,numchild=\"1\"" \
1074 "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
1075
1076# Test: c_variable-5.43
1077# Desc: children of ***psnp->ptrs[0]->next->char_ptr
9e8e3afe
VP
1078mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
1079 {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
1080 {\*\*\*\*char_ptr} 0 char}
1081} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
fb40c209
AC
1082
1083# Test: c_variable-5.44
1084# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
1085mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
e800833b
FN
1086 "\\^done,numchild=\"1\"" \
1087 "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
1088
1089# Test: c_variable-5.43B
1090# Desc: children of ****psnp->ptrs[0]->next->char_ptr
9e8e3afe 1091mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" {} \
e800833b
FN
1092 "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
1093
1094# Test: c_variable-5.44B
1095# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
1096mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
fb40c209
AC
1097 "\\^done,numchild=\"0\"" \
1098 "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
1099
1100# Test: c_variable-5.45
1101# Desc: children of psnp->ptrs[0]->next->next
9e8e3afe
VP
1102mi_list_varobj_children "psnp->ptrs.0.next.next" {
1103 {psnp->ptrs.0.next.next.char_ptr char_ptr 1 {char \*\*\*\*}}
bd69fc68 1104 {psnp->ptrs.0.next.next.long_ptr long_ptr 1 {long \*\*\*\*}}
9e8e3afe
VP
1105 {psnp->ptrs.0.next.next.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}}
1106 {psnp->ptrs.0.next.next.next next 4 {struct _struct_n_pointer \*}}
1107} "get children of psnp->ptrs.0.next.next"
fb40c209
AC
1108
1109# Test: c_variable-5.46
1110# Desc: children of psnp->ptrs[0]->next->next->ptrs
9e8e3afe
VP
1111mi_list_varobj_children "psnp->ptrs.0.next.next.ptrs" {
1112 {psnp->ptrs.0.next.next.ptrs.0 0 4 {struct _struct_n_pointer \*}}
1113 {psnp->ptrs.0.next.next.ptrs.1 1 4 {struct _struct_n_pointer \*}}
1114 {psnp->ptrs.0.next.next.ptrs.2 2 4 {struct _struct_n_pointer \*}}
1115} "get children of psnp->ptrs.0.next.next.ptrs"
fb40c209
AC
1116
1117# Step over "snp0.char_ptr = &b3;"
8be260b6 1118mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 1119 [expr $line_dct_snp0 + 2] "step \$line_dct_snp0 + 2"
fb40c209
AC
1120
1121# Test: c_variable-5.47
1122# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
1123mi_gdb_test "-var-update *" \
0cc7d26f 1124 "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
1125 "update all vars psnp->char_ptr (and 0.char_ptr) changed"
1126
1127# Step over "snp1.char_ptr = &c3;"
8be260b6 1128mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 1129 [expr $line_dct_snp0 + 3] "step \$line_dct_snp0 + 3"
fb40c209
AC
1130
1131# Test: c_variable-5.48
1132# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
1133mi_gdb_test "-var-update *" \
0cc7d26f 1134 "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
1135 "update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
1136
1137
1138# Step over "snp2.char_ptr = &a3;"
8be260b6 1139mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 1140 [expr $line_dct_snp0 + 4] "step \$line_dct_snp0 + 4"
fb40c209
AC
1141
1142# Test: c_variable-5.49
1143# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
1144mi_gdb_test "-var-update *" \
0cc7d26f 1145 "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
1146 "update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
1147
1148
1149# Step over "snp0.long_ptr = &y3;"
8be260b6 1150mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 1151 [expr $line_dct_snp0 + 5] "step \$line_dct_snp0 + 5"
fb40c209
AC
1152
1153# Test: c_variable-5.50
1154# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
1155mi_gdb_test "-var-update *" \
0cc7d26f 1156 "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
1157 "update all vars psnp->long_ptr (and 0.long_ptr) changed"
1158
1159
1160# Step over "snp1.long_ptr = &x3;"
8be260b6 1161mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 1162 [expr $line_dct_snp0 + 6] "step \$line_dct_snp0 + 6"
fb40c209
AC
1163
1164# Test: c_variable-5.51
1165# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
73a93a32
JI
1166# Why does this have a FIXME?
1167setup_xfail *-*-*
fb40c209 1168mi_gdb_test "-var-update *" \
43343e8b 1169 "FIXME\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope_changed=\"false\"\}\\\]" \
fb40c209 1170 "update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
73a93a32 1171clear_xfail *-*-*
fb40c209
AC
1172
1173# This command produces this error message:
73a93a32 1174# &"warning: varobj_list: assertion failed - mycount <> 0\n"
fb40c209
AC
1175#
1176
1177# Step over "snp2.long_ptr = &z3;"
8be260b6 1178mi_step_to do_children_tests {} ".*${srcfile}" \
469aff8e 1179 [expr $line_dct_snp0 + 7] "step \$line_dct_snp0 + 7"
fb40c209
AC
1180
1181# Test: c_variable-5.52
1182# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
1183mi_gdb_test "-var-update *" \
0cc7d26f 1184 "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
fb40c209
AC
1185 "update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
1186
214270ab 1187mi_prepare_inline_tests $srcfile
fb40c209 1188
214270ab 1189mi_run_inline_test child_deletion
fb40c209
AC
1190
1191
1192mi_gdb_exit
1193return 0
This page took 1.56249 seconds and 4 git commands to generate.