aboutsummaryrefslogtreecommitdiff
blob: 15e3f795aa1af6b4f9af2bb7d67ae87d3522d4e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
#   Copyright (C) 1999, 2000, 2002 Free Software Foundation

# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu

# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
#


load_lib mi-support.exp
set MIFLAGS "-i=mi"

gdb_exit
if [mi_gdb_start] {
    continue
}

set testfile "var-cmd"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}

mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}

mi_runto do_children_tests

#####        #####
#                #
# children tests #
#                #
#####        #####


# Test: c_variable-4.2
# Desc: create variable "struct_declarations"
mi_gdb_test "-var-create struct_declarations * struct_declarations" \
	"\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct _struct_decl\"" \
	"create local variable struct_declarations"

# Test: c_variable-4.3
# Desc: children of struct_declarations
# STABS doesn't give us argument types for the func ptr structs, but
# Dwarf 2 does.
mi_gdb_test "-var-list-children struct_declarations" \
	"\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
	"get children of struct_declarations"

#gdbtk_test c_variable-4.3 {children of struct_declarations} {
#  get_children  struct_declarations
#} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}

# Test: c_variable-4.4
# Desc: number of children of struct_declarations
mi_gdb_test "-var-info-num-children struct_declarations" \
	"\\^done,numchild=\"11\"" \
	"get number of children of struct_declarations"

# Test: c_variable-4.5
# Desc: children of struct_declarations.integer
mi_gdb_test "-var-list-children struct_declarations.integer" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.integer"

# Test: c_variable-4.6
# Desc: number of children of struct_declarations.integer
mi_gdb_test "-var-info-num-children struct_declarations.integer" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.integer"

# Test: c_variable-4.7
# Desc: children of struct_declarations.character
mi_gdb_test "-var-list-children struct_declarations.character" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.character"

# Test: c_variable-4.8
# Desc: number of children of struct_declarations.character
mi_gdb_test "-var-info-num-children struct_declarations.character" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.character"

# Test: c_variable-4.9
# Desc: children of struct_declarations.char_ptr
mi_gdb_test "-var-list-children struct_declarations.char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
	"get children of struct_declarations.char_ptr"

# Test: c_variable-4.10
# Desc: number of children of struct_declarations.char_ptr
mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of struct_declarations.char_ptr"

# Test: c_variable-4.11
# Desc: children of struct_declarations.long_int
mi_gdb_test "-var-list-children struct_declarations.long_int" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_int"

# Test: c_variable-4.12
# Desc: number of children of struct_declarations.long_int
mi_gdb_test "-var-info-num-children struct_declarations.long_int" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_int"

# Test: c_variable-4.13
# Desc: children of int_ptr_ptr
mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \
	"get children of struct_declarations.int_ptr_ptr"

#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
#  get_children struct_declarations.int_ptr_ptr
#} {*int_ptr_ptr}

# Test: c_variable-4.14
# Desc: number of children of int_ptr_ptr
mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of struct_declarations.int_ptr_ptr"


# Test: c_variable-4.15
# Desc: children of struct_declarations.long_array
mi_gdb_test "-var-list-children struct_declarations.long_array" \
	"\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \
	"get children of struct_declarations.long_array"

# Test: c_variable-4.16
# Desc: number of children of struct_declarations.long_array
mi_gdb_test "-var-info-num-children struct_declarations.long_array" \
	"\\^done,numchild=\"10\"" \
	"get number of children of struct_declarations.long_array"

# Test: c_variable-4.17
# Desc: children of struct_declarations.func_ptr
mi_gdb_test "-var-list-children struct_declarations.func_ptr" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.func_ptr"


# Test: c_variable-4.18
# Desc: number of children of struct_declarations.func_ptr
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.func_ptr"


# Test: c_variable-4.19
# Desc: children of struct_declarations.func_ptr_struct
mi_gdb_test "-var-list-children struct_declarations.func_ptr_struct" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.func_ptr_struct"

# Test: c_variable-4.20
# Desc: number of children of struct_declarations.func_ptr_struct
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.func_ptr_struct"


# Test: c_variable-4.21
# Desc: children of struct_declarations.func_ptr_ptr
mi_gdb_test "-var-list-children struct_declarations.func_ptr_ptr" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.func_ptr_ptr"

# Test: c_variable-4.22
# Desc: number of children of struct_declarations.func_ptr_ptr
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.func_ptr_ptr"


# Test: c_variable-4.23
# Desc: children of struct_declarations.u1
mi_gdb_test "-var-list-children struct_declarations.u1" \
	"\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\\\]" \
	"get children of struct_declarations.u1"

# Test: c_variable-4.24
# Desc: number of children of struct_declarations.u1
mi_gdb_test "-var-info-num-children struct_declarations.u1" \
	"\\^done,numchild=\"4\"" \
	"get number of children of struct_declarations.u1"

# Test: c_variable-4.25
# Desc: children of struct_declarations.s2
mi_gdb_test "-var-list-children struct_declarations.s2" \
	"\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\\\]" \
	"get children of struct_declarations.s2"
#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
#  get_children struct_declarations.s2
#} {u2 g h i}

# Test: c_variable-4.26
# Desc: number of children of struct_declarations.s2
mi_gdb_test "-var-info-num-children struct_declarations.s2" \
	"\\^done,numchild=\"4\"" \
	"get number of children of struct_declarations.s2"


# Test: c_variable-4.27
# Desc: children of struct_declarations.long_array.1
mi_gdb_test "-var-list-children struct_declarations.long_array.1" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.1"

# Test: c_variable-4.28
# Desc: number of children of struct_declarations.long_array.1
mi_gdb_test "-var-info-num-children struct_declarations.long_array.1" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.1"

# Test: c_variable-4.29
# Desc: children of struct_declarations.long_array.2
mi_gdb_test "-var-list-children struct_declarations.long_array.2" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.2"

# Test: c_variable-4.30
# Desc: number of children of struct_declarations.long_array.2
mi_gdb_test "-var-info-num-children struct_declarations.long_array.2" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.2"

# Test: c_variable-4.31
# Desc: children of struct_declarations.long_array.3
mi_gdb_test "-var-list-children struct_declarations.long_array.3" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.3"

# Test: c_variable-4.32
# Desc: number of children of struct_declarations.long_array.3
mi_gdb_test "-var-info-num-children struct_declarations.long_array.3" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.3"

# Test: c_variable-4.33 
# Desc: children of struct_declarations.long_array.4
mi_gdb_test "-var-list-children struct_declarations.long_array.4" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.4"

# Test: c_variable-4.34
# Desc: number of children of struct_declarations.long_array.4
mi_gdb_test "-var-info-num-children struct_declarations.long_array.4" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.4"

# Test: c_variable-4.35
# Desc: children of struct_declarations.long_array.5
mi_gdb_test "-var-list-children struct_declarations.long_array.5" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.5"

# Test: c_variable-4.36
# Desc: number of children of struct_declarations.long_array.5
mi_gdb_test "-var-info-num-children struct_declarations.long_array.5" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.5"

# Test: c_variable-4.37
# Desc: children of struct_declarations.long_array.6
mi_gdb_test "-var-list-children struct_declarations.long_array.6" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.6"

# Test: c_variable-4.38
# Desc: number of children of struct_declarations.long_array.6
mi_gdb_test "-var-info-num-children struct_declarations.long_array.6" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.6"

# Test: c_variable-4.39
# Desc: children of struct_declarations.long_array.7
mi_gdb_test "-var-list-children struct_declarations.long_array.7" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.7"

# Test: c_variable-4.40
# Desc: number of children of struct_declarations.long_array.7
mi_gdb_test "-var-info-num-children struct_declarations.long_array.7" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.7"

# Test: c_variable-4.41
# Desc: children of struct_declarations.long_array.8
mi_gdb_test "-var-list-children struct_declarations.long_array.8" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.8"

# Test: c_variable-4.42
# Desc: number of children of struct_declarations.long_array.8
mi_gdb_test "-var-info-num-children struct_declarations.long_array.8" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.8"


# Test: c_variable-4.43
# Desc: children of struct_declarations.long_array.9
mi_gdb_test "-var-list-children struct_declarations.long_array.9" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.long_array.9"

# Test: c_variable-4.44
# Desc: number of children of struct_declarations.long_array.9
mi_gdb_test "-var-info-num-children struct_declarations.long_array.9" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.long_array.9"

# Test: c_variable-4.45
# Desc: children of struct_declarations.u1.a
mi_gdb_test "-var-list-children struct_declarations.u1.a" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.u1.a"

# Test: c_variable-4.46
# Desc: number of children of struct_declarations.u1.a
mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.u1.a"

# Test: c_variable-4.47
# Desc: children of struct_declarations.u1.b
mi_gdb_test "-var-list-children struct_declarations.u1.b" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.u1.b.\\*b\",exp=\"\\*b\",numchild=\"0\",type=\"char\"\}\\\]" \
	"get children of struct_declarations.u1.b"

# Test: c_variable-4.48
# Desc: number of children of struct_declarations.u1.b
mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \
	"\\^done,numchild=\"1\"" \
	"get number of children of struct_declarations.u1.b"

# Test: c_variable-4.49
# Desc: children of struct_declarations.u1.c
mi_gdb_test "-var-list-children struct_declarations.u1.c" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.u1.c"

# Test: c_variable-4.50
# Desc: number of children of struct_declarations.u1.c
mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.u1.c"

# Test: c_variable-4.51
# Desc: children of struct_declarations.u1.d
mi_gdb_test "-var-list-children struct_declarations.u1.d" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.u1.d"


# Test: c_variable-4.52
# Desc: number of children of struct_declarations.u1.d
mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.u1.d"


# Test: c_variable-4.53
# Desc: children of struct_declarations.s2.u2
mi_gdb_test "-var-list-children struct_declarations.s2.u2" \
	"\\^done,numchild=\"3\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
	"get children of struct_declarations.s2.u2"

# Test: c_variable-4.54
# Desc: number of children of struct_declarations.s2.u2
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \
	"\\^done,numchild=\"3\"" \
	"get number of children of struct_declarations.s2.u2"

# Test: c_variable-4.55
# Desc: children of struct_declarations.s2.g
mi_gdb_test "-var-list-children struct_declarations.s2.g" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.s2.g"

# Test: c_variable-4.56
# Desc: number of children of struct_declarations.s2.g
mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.s2.g"


# Test: c_variable-4.57
# Desc: children of struct_declarations.s2.h
mi_gdb_test "-var-list-children struct_declarations.s2.h" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.s2.h"

# Test: c_variable-4.58
# Desc: number of children of struct_declarations.s2.h
mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.s2.h"


# Test: c_variable-4.59
# Desc: children of struct_declarations.s2.i
mi_gdb_test "-var-list-children struct_declarations.s2.i" \
	"\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \
	"get children of struct_declarations.s2.i"

# Test: c_variable-4.60
# Desc: number of children of struct_declarations.s2.i
mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \
	"\\^done,numchild=\"10\"" \
	"get number of children of struct_declarations.s2.i"

# Test: c_variable-4.61
# Desc: children of struct_declarations.s2.u2.u1s1
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \
	"\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\\\]" \
	"get children of struct_declarations.s2.u2.u1s1"

# Test: c_variable-4.62
# Desc: number of children of struct_declarations.s2.u2.u1s1
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \
	"\\^done,numchild=\"4\"" \
	"get number of children of struct_declarations.s2.u2.u1s1"

# Test: c_variable-4.63
# Desc: children of struct_declarations.s2.u2.f
mi_gdb_test "-var-list-children struct_declarations.s2.u2.f" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.s2.u2.f"

# Test: c_variable-4.64
# Desc: number of children of struct_declarations.s2.u2.f
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.s2.u2.f"

# Test: c_variable-4.65
# Desc: children of struct_declarations.s2.u2.u1s2
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2" \
	"\\^done,numchild=\"2\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\((int, char \\*)?\\)\"\}\\\]" \
	"get children of struct_declarations.s2.u2.u1s2"

# Test: c_variable-4.66
# Desc: number of children of struct_declarations.s2.u2.u1s2
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \
	"\\^done,numchild=\"2\"" \
	"get number of children of struct_declarations.s2.u2.u1s2"

# Test: c_variable-4.67
# Desc: children of struct_declarations.s2.u2.u1s1.d
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.d" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.s2.u2.u1s1.d"

# Test: c_variable-4.68
# Desc: number of children of struct_declarations.s2.u2.u1s1.d
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.s2.u2.u1s1.d"

# Test: c_variable-4.69
# Desc: children of struct_declarations.s2.u2.u1s1.e
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.e" \
	"\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\\\]" \
	"get children of struct_declarations.s2.u2.u1s1.e"

# Test: c_variable-4.70
# Desc: number of children of struct_declarations.s2.u2.u1s1.e
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \
	"\\^done,numchild=\"10\"" \
	"get number of children of struct_declarations.s2.u2.u1s1.e"


# Test: c_variable-4.71
# Desc: children of struct_declarations.s2.u2.u1s1.func
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.func" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.s2.u2.u1s1.func"

# Test: c_variable-4.72
# Desc: number of children of struct_declarations.s2.u2.u1s1.func
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.s2.u2.u1s1.func"


# Test: c_variable-4.73
# Desc: children of struct_declarations.s2.u2.u1s1.foo
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.foo" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.s2.u2.u1s1.foo"

# Test: c_variable-4.74
# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.s2.u2.u1s1.foo"


# Test: c_variable-4.75
# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \
	"\\^done,numchild=\"2\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\\\]" \
	"get children of struct_declarations.s2.u2.u1s2.array_ptr"

# Test: c_variable-4.76
# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \
	"\\^done,numchild=\"2\"" \
	"get number of children of struct_declarations.s2.u2.u1s2.array_ptr"

# Test: c_variable-4.77
# Desc: children of struct_declarations.s2.u2.u1s2.func
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.func" \
	"\\^done,numchild=\"0\"" \
	"get children of struct_declarations.s2.u2.u1s2.func"

# Test: c_variable-4.78
# Desc: number of children of struct_declarations.s2.u2.u1s2.func
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \
	"\\^done,numchild=\"0\"" \
	"get number of children of struct_declarations.s2.u2.u1s2.func"

# Test: c_variable-4.79
# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \
	"get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
#} {**int_ptr_ptr}

# Test: c_variable-4.80
# Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"


# Step to "struct_declarations.integer = 123;"
set line 192
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step to line $line"

# Test: c_variable-4.81
# Desc: create local variable "weird"
mi_gdb_test "-var-create weird * weird" \
	"\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
	"create local variable weird"

# Test: c_variable-4.82
# Desc: children of weird
mi_gdb_test "-var-list-children weird" \
	"\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \
	"get children of weird"

# Test: c_variable-4.83
# Desc: number of children of weird
mi_gdb_test "-var-info-num-children weird" \
	"\\^done,numchild=\"11\"" \
	"get number of children of weird"


# Test: c_variable-4.84
# Desc: children of weird->long_array
mi_gdb_test "-var-list-children weird.long_array" \
	"\\^done,numchild=\"10\",children=\\\[child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \
	"get children of weird.long_array"
#gdbtk_test c_variable-4.84 {children of weird->long_array} {
#  get_children weird.long_array
#} {0 1 2 3 4 5 6 7 8 9}

# Test: c_variable-4.85
# Desc: number of children of weird.long_array
mi_gdb_test "-var-info-num-children weird.long_array" \
	"\\^done,numchild=\"10\"" \
	"get number of children of weird.long_array"

# Test: c_variable-4.86
# Desc: children of weird.int_ptr_ptr
mi_gdb_test "-var-list-children weird.int_ptr_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \
	"get children of weird.int_ptr_ptr"
#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
#  get_children weird.int_ptr_ptr
#} {*int_ptr_ptr}

# Test: c_variable-4.87
# Desc: number of children of weird.int_ptr_ptr
mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of weird.int_ptr_ptr"

# Test: c_variable-4.88
# Desc: children of *weird->int_ptr_ptr
mi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \
	"get children of weird.int_ptr_ptr.*int_ptr_ptr"
#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
#  get_children weird.int_ptr_ptr.*int_ptr_ptr
#} {**int_ptr_ptr}

# Test: c_variable-4.89
# Desc: number of children *weird->int_ptr_ptr
mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of weird.int_ptr_ptr.*int_ptr_ptr"

# Test: c_variable-4.90
# Desc: create weird->int_ptr_ptr
mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \
	"\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"" \
	"create local variable weird->int_ptr_ptr"

# Test: c_variable-4.91
# Desc: children of weird->int_ptr_ptr
mi_gdb_test "-var-list-children weird->int_ptr_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \
	"get children of weird->int_ptr_ptr"


# Test: c_variable-4.92
# Desc: number of children of (weird->int_ptr_ptr)
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of weird->int_ptr_ptr"

# Test: c_variable-4.93
# Desc: children of *(weird->int_ptr_ptr)
mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \
	"get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"

# Test: c_variable-4.94
# Desc: number of children of *(weird->int_ptr_ptr)
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr"

# Test: c_variable-4.95
# Desc: children of *(*(weird->int_ptr_ptr))
mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
	"\\^done,numchild=\"0\"" \
	"get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"

# Test: c_variable-4.96
# Desc: number of children of *(*(weird->int_ptr_ptr))
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
	"\\^done,numchild=\"0\"" \
	"get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"

# Test: c_variable-4.97
# Desc: is weird editable
mi_gdb_test "-var-show-attributes weird" \
	"\\^done,attr=\"editable\"" \
	"is weird editable"

# Test: c_variable-4.98
# Desc: is weird->int_ptr_ptr editable
mi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \
	"\\^done,attr=\"editable\"" \
	"is weird->int_ptr_ptr editable"

# Test: c_variable-4.99
# Desc: is *(weird->int_ptr_ptr) editable
mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \
	"\\^done,attr=\"editable\"" \
	"is weird.int_ptr_ptr.*int_ptr_ptr editable"

# Test: c_variable-4.100
# Desc: is *(*(weird->int_ptr_ptr)) editable
mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \
	"\\^done,attr=\"editable\"" \
	"is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable"

# Test: c_variable-4.101
# Desc: is weird->u1 editable
mi_gdb_test "-var-show-attributes weird.u1" \
	"\\^done,attr=\"noneditable\"" \
	"is weird.u1 editable"

# Test: c_variable-4.102
# Desc: is weird->s2 editable
mi_gdb_test "-var-show-attributes weird.s2" \
	"\\^done,attr=\"noneditable\"" \
	"is weird.s2 editable"

# Test: c_variable-4.103
# Desc: is struct_declarations.u1.a editable
mi_gdb_test "-var-show-attributes struct_declarations.u1.a" \
	"\\^done,attr=\"editable\"" \
	"is struct_declarations.u1.a editable"

# Test: c_variable-4.104
# Desc: is struct_declarations.u1.b editable
mi_gdb_test "-var-show-attributes struct_declarations.u1.b" \
	"\\^done,attr=\"editable\"" \
	"is struct_declarations.u1.b editable"

# Test: c_variable-4.105
# Desc: is struct_declarations.u1.c editable
mi_gdb_test "-var-show-attributes struct_declarations.u1.c" \
	"\\^done,attr=\"editable\"" \
	"is struct_declarations.u1.c editable"

# Test: c_variable-4.106
# Desc: is struct_declarations.long_array editable
mi_gdb_test "-var-show-attributes struct_declarations.long_array" \
	"\\^done,attr=\"noneditable\"" \
	"is struct_declarations.long_array editable"

# Test: c_variable-4.107
# Desc: is struct_declarations.long_array[0] editable
mi_gdb_test "-var-show-attributes struct_declarations.long_array.0" \
	"\\^done,attr=\"editable\"" \
	"is struct_declarations.long_array.0 editable"

# Test: c_variable-4.108
# Desc: is struct_declarations editable
mi_gdb_test "-var-show-attributes struct_declarations" \
	"\\^done,attr=\"noneditable\"" \
	"is struct_declarations editable"

mi_gdb_test "-var-delete weird" \
	"\\^done,ndeleted=\"24\"" \
	"delete var weird"

#####                         #####
#                                 #
# children and update tests #
#                                 #
#####                         #####

# Test: c_variable-5.1
# Desc: check that nothing changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\\\]" \
	"update all vars. None changed"

# Step over "struct_declarations.integer = 123;"
set line 193
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.2
# Desc: check that integer changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars struct_declarations.integer"

# Step over:
#    weird->char_ptr = "hello";
#    bar = 2121;
#    foo = &bar;
set line 196
mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"

# Test: c_variable-5.3
# Desc: check that char_ptr changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars struct_declarations.char_ptr"

# Step over "struct_declarations.int_ptr_ptr = &foo;"
set line 197
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars int_ptr_ptr and children changed"

# Step over "weird->long_array[0] = 1234;"
set line 198
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.5
# Desc: check that long_array[0] changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars struct_declarations.long_array.0 changed"

# Step over "struct_declarations.long_array[1] = 2345;"
set line 199
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.6
# Desc: check that long_array[1] changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars struct_declarations.long_array.1 changed"

# Step over "weird->long_array[2] = 3456;"
set line 200
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.7
# Desc: check that long_array[2] changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars struct_declarations.long_array.2 changed"

# Step over:
#    struct_declarations.long_array[3] = 4567;
#    weird->long_array[4] = 5678;
#    struct_declarations.long_array[5] = 6789;
#    weird->long_array[6] = 7890;
#    struct_declarations.long_array[7] = 8901;
#    weird->long_array[8] = 9012;
#    struct_declarations.long_array[9] = 1234;
set line 208
mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"

# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars struct_declarations.long_array.3-9 changed"


# Step over "weird->func_ptr = nothing;"
set line 211
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.9
# Desc: check that func_ptr changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars struct_declarations.func_ptr changed"

# Delete all variables
mi_gdb_test "-var-delete struct_declarations" \
	"\\^done,ndeleted=\"65\"" \
	"delete var struct_declarations"

mi_gdb_test "-var-delete weird->int_ptr_ptr" \
	"\\^done,ndeleted=\"3\"" \
	"delete var weird->int_ptr_ptr"

# Step over all lines:
# ...
#   psnp = &snp0;
set line 254
mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"

# Test: c_variable-5.10
# Desc: create psnp->char_ptr
mi_gdb_test "-var-create  psnp->char_ptr *  psnp->char_ptr" \
	"\\^done,name=\"psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"" \
	"create local variable  psnp->char_ptr"

# Test: c_variable-5.11
# Desc: children of psnp->char_ptr
mi_gdb_test "-var-list-children psnp->char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\\\]" \
	"get children of psnp->char_ptr"

# Test: c_variable-5.12
# Desc: number of children of psnp->char_ptr
mi_gdb_test "-var-info-num-children psnp->char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->char_ptr"

# Test: c_variable-5.13
# Desc: children of *(psnp->char_ptr)
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\\\]" \
	"get children of psnp->char_ptr.*psnp->char_ptr"

# Test: c_variable-5.14
# Desc: number of children of *(psnp->char_ptr)
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->char_ptr.*psnp->char_ptr"

# Test: c_variable-5.15
# Desc: children of *(*(psnp->char_ptr))
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\"\}\\\]" \
	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"

# Test: c_variable-5.15B
# Desc: children of *(*(*(psnp->char_ptr)))
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"

# Test: c_variable-5.16
# Desc: number of children of *(*(psnp->char_ptr))
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"

# Test: c_variable-5.17
# Desc: children of *(*(*(psnp->char_ptr)))
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"

# Test: c_variable-5.18
# Desc: number of children of *(*(*(psnp->char_ptr)))
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"

# Test: c_variable-5.17B
# Desc: children of *(*(*(*(psnp->char_ptr))))
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
	"\\^done,numchild=\"0\"" \
	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"

# Test: c_variable-5.18B
# Desc: number of children of *(*(*(*(psnp->char_ptr))))
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
	"\\^done,numchild=\"0\"" \
	"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"


# Test: c_variable-5.19
# Desc: create psnp->long_ptr
mi_gdb_test "-var-create  psnp->long_ptr *  psnp->long_ptr" \
	"\\^done,name=\"psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"" \
	"create local variable  psnp->long_ptr"

# Test: c_variable-5.20
# Desc: children of psnp->long_ptr
mi_gdb_test "-var-list-children psnp->long_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\\\]" \
	"get children of psnp->long_ptr"

# Test: c_variable-5.21
# Desc: number of children of psnp->long_ptr
mi_gdb_test "-var-info-num-children psnp->long_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->long_ptr"

# Test: c_variable-5.22
# Desc: children of *(psnp->long_ptr)
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\\\]" \
	"get children of psnp->long_ptr.*psnp->long_ptr"


# Test: c_variable-5.23
# Desc: number of children of *(psnp->long_ptr)
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->long_ptr.*psnp->long_ptr"

# Test: c_variable-5.24
# Desc: children of *(*(psnp->long_ptr))
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\\\]" \
	"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"

# Test: c_variable-5.25
# Desc: number of children of *(*(psnp->long_ptr))
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"

# Test: c_variable-5.26
# Desc: children of *(*(*(psnp->long_ptr)))
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\\\]" \
	"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"

# Test: c_variable-5.27
# Desc: number of children of *(*(*(psnp->long_ptr)))
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"

# Test: c_variable-5.28
# Desc: children of *(*(*(*(psnp->long_ptr))))
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
	"\\^done,numchild=\"0\"" \
	"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"

# Test: c_variable-5.29
# Desc: number of children of *(*(*(*(psnp->long_ptr))))
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
	"\\^done,numchild=\"0\"" \
	"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"

# Test: c_variable-5.30
# Desc: create psnp->ptrs
mi_gdb_test "-var-create  psnp->ptrs *  psnp->ptrs" \
	"\\^done,name=\"psnp->ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
	"create local variable  psnp->ptrs"

# Test: c_variable-5.31
# Desc: children of psnp->ptrs
mi_gdb_test "-var-list-children psnp->ptrs" \
	"\\^done,numchild=\"3\",children=\\\[child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
	"get children of psnp->ptrs"

# Test: c_variable-5.32
# Desc: number of children of psnp->ptrs
mi_gdb_test "-var-info-num-children psnp->ptrs" \
	"\\^done,numchild=\"3\"" \
	"get number of children of psnp->ptrs"

# Test: c_variable-5.33
# Desc: children of psnp->ptrs[0]
mi_gdb_test "-var-list-children psnp->ptrs.0" \
	"\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
	"get children of psnp->ptrs.0"

# Test: c_variable-5.34
# Desc: number of children of psnp->ptrs[0]
mi_gdb_test "-var-info-num-children psnp->ptrs.0" \
	"\\^done,numchild=\"4\"" \
	"get number of children of psnp->ptrs.0"

# Test: c_variable-5.35
# Desc: children of psnp->ptrs[0]->next
mi_gdb_test "-var-list-children psnp->ptrs.0.next" \
	"\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
	"get children of psnp->ptrs.0.next"

#} {char_ptr long_ptr ptrs next}

# Test: c_variable-5.36
# Desc: number of children of psnp->ptrs[0]->next
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \
	"\\^done,numchild=\"4\"" \
	"get number of children of psnp->ptrs.0.next"


# Test: c_variable-5.37
# Desc: children of psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\\\]" \
	"get children of psnp->ptrs.0.next.char_ptr"

#gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} {
#  get_children psnp->ptrs.0.next.char_ptr
#} {*char_ptr}

# Test: c_variable-5.38
# Desc: number of children of psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->ptrs.0.next.char_ptr"

# Test: c_variable-5.39
# Desc: children of *psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\\\]" \
	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr"

# Test: c_variable-5.40
# Desc: number of children of *psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr"

# Test: c_variable-5.41
# Desc: children of **psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\"\}\\\]" \
	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"

# Test: c_variable-5.41B
# Desc: children of ***psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"

# Test: c_variable-5.42
# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"

# Test: c_variable-5.43
# Desc: children of ***psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \
	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"

# Test: c_variable-5.44
# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
	"\\^done,numchild=\"1\"" \
	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"

# Test: c_variable-5.43B
# Desc: children of ****psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
	"\\^done,numchild=\"0\"" \
	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"

# Test: c_variable-5.44B
# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
	"\\^done,numchild=\"0\"" \
	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"

# Test: c_variable-5.45
# Desc: children of psnp->ptrs[0]->next->next
mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \
	"\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
	"get children of psnp->ptrs.0.next.next"

# Test: c_variable-5.46
# Desc: children of psnp->ptrs[0]->next->next->ptrs
mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \
	"\\^done,numchild=\"3\",children=\\\[child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \
	"get children of psnp->ptrs.0.next.next.ptrs"

#  Step over "snp0.char_ptr = &b3;"
set line 255
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars psnp->char_ptr (and 0.char_ptr) changed"

#  Step over "snp1.char_ptr = &c3;"
set line 256
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"


#  Step over "snp2.char_ptr = &a3;"
set line 257
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"


#  Step over "snp0.long_ptr = &y3;"
set line 258
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars psnp->long_ptr (and 0.long_ptr) changed"


#  Step over "snp1.long_ptr = &x3;"
set line 259
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
# Why does this have a FIXME?
setup_xfail *-*-*
mi_gdb_test "-var-update *" \
	"FIXME\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
clear_xfail *-*-*

# This command produces this error message:
# &"warning: varobj_list: assertion failed - mycount <> 0\n"
#

#  Step over "snp2.long_ptr = &z3;"
set line 260
mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"

# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
mi_gdb_test "-var-update *" \
	"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
	"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"




mi_gdb_exit
return 0