1 # Varobj Tests (C language)
2 # Copyright 1998, 2001, 2003 Red Hat, Inc.
4 # This Program Is Free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
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.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 # Please email any bugs, comments, and/or additions to this file to:
19 # insight@sources.redhat.com
21 # This file was written by Keith Seitz (keiths@cygnus.com)
23 # Read in the standard defs file
24 if {![gdbtk_read_defs]} {
28 global objdir test_ran
31 set program [file join $objdir c_variable]
32 if {[catch {gdbtk_test_file $program} t]} {
33 # This isn't a test case, since if this fails, we're hosed.
34 gdbtk_test_error "loading \"$program\": $t"
37 # The variables that are created are stored in an array called "var".
39 # proc to tell us which of the variables are changed/out of scope
40 proc check_update {} {
45 foreach ind [array names var] {
46 set ret [$var($ind) update]
49 } elseif {$ret != ""} {
53 return [list $changed $out]
56 # proc to create a variable
57 proc create_variable {expr} {
60 set err [catch {gdb_variable create "$expr" -expr $expr} v]
68 # proc to get the children
69 # Children are stored in the global "var" as
70 # PARENT.child. So for struct _foo {int a; int b} bar;,
71 # the children returned are {a b} and var(bar.a) and var(bar.b)
72 # map the actual objects to their names.
73 proc get_children {parent} {
76 set kiddies [$var($parent) children]
78 foreach child $kiddies {
79 set name [lindex [split $child .] end]
80 lappend children $name
81 set var($parent.$name) $child
87 proc delete_variable {varname} {
90 if {[info exists var($varname)]} {
91 # This has to be caught, since deleting a parent
92 # will erase all children.
94 set vars [array names var $varname*]
96 if {[info exists var($v)]} {
103 # Compare the values of variable V in format FMT
109 set value [$var($v) value]
110 set gdb [gdb_cmd "output/$fmt $v"]
111 if {$value == $gdb} {
115 puts $_test(logfile) "output/$fmt $v"
116 puts $_test(logfile) "gdbtk: $value <> gdb: $gdb"
122 proc delete_all_variables {} {
125 foreach variable [array names var] {
126 delete_variable $variable
130 proc editable_variables {} {
135 foreach name [array names var] {
136 if {[$var($name) editable]} {
143 return [list $yes $no]
149 # Variable Creation tests #
153 # Test: c_variable-1.1
154 # Desc: Create global variable
155 gdbtk_test c_variable-1.1 {create global variable} {
156 create_variable global_simple
159 # Test: c_variable-1.2
160 # Desc: Create non-existent variable
161 gdbtk_test c_variable-1.2 {create non-existent variable} {
162 create_variable bogus_unknown_variable
165 # Test: c_variable-1.3
166 # Desc: Create out of scope variable
167 gdbtk_test c_variable-1.3 {create out of scope variable} {
171 # Break in main and run
172 gdb_cmd "break do_locals_tests"
175 # Test: c_variable-1.4
176 # Desc: create local variables
177 gdbtk_test c_variable-1.4 {create local variables} {
179 foreach v {linteger lpinteger lcharacter lpcharacter llong lplong lfloat lpfloat ldouble lpdouble lsimple lpsimple func} {
180 lappend results [create_variable $v]
183 } {0 0 0 0 0 0 0 0 0 0 0 0 0}
185 # Test: c_variable-1.5
186 # Desc: create lsimple.character
187 gdbtk_test c_variable-1.5 {create lsimple.character} {
188 create_variable lsimple.character
191 # Test: c_variable-1.6
192 # Desc: create lpsimple->integer
193 gdbtk_test c_variable-1.6 {create lpsimple->integer} {
194 create_variable lpsimple->integer
197 # Test: c_variable-1.7
198 # Desc: create lsimple.integer
199 gdbtk_test c_variable-1.7 {create lsimple.integer} {
200 create_variable lsimple.integer
203 # Test: c_variable-1.8
204 # Desc: names of editable variables
205 gdbtk_test c_variable-1.8 {names of editable variables} {
207 } {{lsimple.character lsimple.integer lpsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble} {lsimple global_simple}}
209 # Test: c_variable-1.9
210 # Desc: create type name
211 # Type names (like int, long, etc..) are all proper expressions to gdb.
212 # make sure variable code does not allow users to create variables, though.
213 gdbtk_test c_variable-1.9 {create type name} {
219 # Value changed tests #
223 # Test: c_variable-2.1
224 # Desc: check whether values changed at do_block_tests
225 gdbtk_test c_variable-2.1 {check whether values changed at do_block_tests} {
229 # Step over "linteger = 1234;"
232 # Test: c_variable-2.2
233 # Desc: check whether only linteger changed values
234 gdbtk_test c_variable-2.2 {check whether only linteger changed values} {
238 # Step over "lpinteger = &linteger;"
241 # Test: c_variable-2.3
242 # Desc: check whether only lpinteger changed
243 gdbtk_test c_variable-2.3 {check whether only lpinteger changed} {
247 # Step over "lcharacter = 'a';"
250 # Test: c_variable-2.4
251 # Desc: check whether only lcharacter changed
252 gdbtk_test c_variable-2.4 {check whether only lcharacter changed} {
256 # Step over "lpcharacter = &lcharacter;"
259 # Test: c_variable-2.5
260 # Desc: check whether only lpcharacter changed
261 gdbtk_test c_variable-2.5 {check whether only lpcharacter changed} {
270 # ldouble = 2.718281828459045;
271 # lpdouble = &ldouble;
272 # lsimple.integer = 1234;
273 # lsimple.unsigned_integer = 255;
274 # lsimple.character = 'a';
275 for {set i 0} {$i < 9} {incr i} {
279 # Test: c_variable-2.6
280 # Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
281 # lsimple.unsigned_character lsimple.integer lsimple.character changed
282 gdbtk_test c_variable-2.6 {check whether llong -- lsimple.character changed} {
284 } {{lsimple.character lsimple.integer lfloat lpfloat llong lplong ldouble lpdouble} {}}
287 # lsimple.signed_character = 21;
288 # lsimple.char_ptr = &lcharacter;
289 # lpsimple = &lsimple;
291 for {set i 0} {$i < 4} {incr i} {
295 # Test: c_variable-2.7
296 # Desc: check whether lsimple.signed_character, lsimple.char_ptr, lpsimple, func changed
297 gdbtk_test c_variable-2.7 {check whether lsimple.signed_character, lsimple.char_ptr, lpsimple, func changed} {
299 } {{lpsimple func lpsimple->integer} {}}
306 # ldouble = 5.498548281828172;
307 # lsimple.integer = 255;
308 # lsimple.unsigned_integer = 4321;
309 # lsimple.character = 'b';
310 for {set i 0} {$i < 8} {incr i} {
314 # Test: c_variable-2.8
315 # Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
316 # lpsimple.integer lsimple.character changed
317 # Note: this test also checks that lpsimple->integer and lsimple.integer have
318 # changed (they are the same)
319 gdbtk_test c_variable-2.8 {check whether linteger -- lsimple.integer changed} {
321 } {{lsimple.character lsimple.integer lcharacter linteger lfloat llong lpsimple->integer ldouble} {}}
323 gdb_cmd "break subroutine1"
326 # Test: c_variable-2.9
327 # Desc: stop in subroutine1
328 gdbtk_test c_variable-2.9 {stop in subroutine1} {
332 # Test: c_variable-2.10
333 # Desc: create variable for locals i,l in subroutine1
334 gdbtk_test c_variable-2.10 {create variable for locals i,l in subroutine1} {
335 set r [create_variable i]
336 lappend r [create_variable l]
339 # Test: c_variable-2.11
340 # Desc: create do_locals_tests local in subroutine1
341 gdbtk_test c_variable-2.11 {create do_locals_tests local in subroutine1} {
342 create_variable linteger
346 # global_simple.integer = i + 3;
349 # Test: c_variable-2.12
350 # Desc: change global_simple.integer
351 # Note: This also tests whether we are reporting changes in structs properly.
352 # gdb normally would say that global_simple has changed, but we
353 # special case that, since it is not what a human expects to see.
354 gdbtk_test c_variable-2.12 {change global_simple.integer} {
356 } {{} {lsimple.character lsimple.integer lpsimple lsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble}}
362 # Test: c_variable-2.13
363 # Desc: change subroutine1 local i
364 gdbtk_test c_variable-2.13 {change subroutine1 local i} {
366 } {i {lsimple.character lsimple.integer lpsimple lsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble}}
372 # This test is no longer valid, since varobj now forces
373 # re-evaluation in the current frame by default.
374 # Test: c_variable-2.14
375 # Desc: change do_locals_tests local llong
376 #gdbtk_test c_variable-2.14 {change do_locals_tests local llong} {
383 # Test: c_variable-2.15
384 # Desc: check for out of scope subroutine1 locals
385 gdbtk_test c_variable-2.15 {check for out of scope subroutine1 locals} {
386 lindex [check_update] 1
389 # Test: c_variable-2.16
390 # Desc: names of all editable variables
391 gdbtk_test c_variable-2.16 {names of all editable variables} {
393 } {{lsimple.character lsimple.integer lpsimple i lcharacter lpcharacter linteger lpinteger lfloat lpfloat l func llong lplong lpsimple->integer ldouble lpdouble} {lsimple global_simple}}
395 # Done with locals/globals tests. Erase all variables
403 gdb_cmd "break do_block_tests"
406 # Test: c_variable-3.1
407 # Desc: stop in do_block_tests
408 gdbtk_test c_variable-3.1 {stop in do_block_tests} {
412 # Test: c_variable-3.2
413 # Desc: create cb and foo
414 gdbtk_test c_variable-3.2 {create cb and foo} {
415 set r [create_variable cb]
416 lappend r [create_variable foo]
419 # step to "foo = 123;"
422 # Be paranoid and assume 3.2 created foo
425 # Test: c_variable-3.3
427 gdbtk_test c_variable-3.3 {create foo} {
431 # step to "foo2 = 123;"
434 # Test: c_variable-3.4
435 # Desc: check foo, cb changed
436 gdbtk_test c_variable-3.4 {check foo,cb changed} {
440 # step to "foo = 321;"
443 # Test: c_variable-3.5
444 # Desc: create inner block foo
445 gdbtk_test c_variable-3.5 {create inner block foo} {
447 set err [catch {gdb_variable create inner_foo -expr foo} v]
449 set var(inner_foo) $v
455 # step to "foo2 = 0;"
458 # Test: c_variable-3.6
460 gdbtk_test c_variable-3.6 {create foo2} {
464 # Test: c_variable-3.7
465 # Desc: check that outer foo in scope and inner foo out of scope
467 # Disabled for now because varobjs don't work this way. If you create a varobj named "foo"
468 # it will display the correct value for any variable named "foo" in scope. So inner_foo
469 # is not out of scope because there is another variable named "foo" in scope. It is
470 # instead marked as changed.
472 #gdbtk_test *c_variable-3.7 {check that outer foo in scope and inner foo out of scope} {
476 delete_variable inner_foo
481 # Test: c_variable-3.8
482 # Desc: check that foo2 out of scope
483 gdbtk_test c_variable-3.8 {check that foo2 out of scope} {
490 # Test: c_variable-3.9
491 # Desc: check that only cb is in scope
492 gdbtk_test c_variable-3.9 {check that only cb is in scope} {
496 # Test: c_variable-3.10
497 # Desc: names of editable variables
498 gdbtk_test c_variable-3.10 {names of editable variables} {
502 # Done with block tests
511 gdb_cmd "break do_children_tests"
514 # Test: c_variable-4.1
515 # Desc: stopped in do_children_tests
516 gdbtk_test c_variable-4.1 {stopped in do_children_tests} {
518 } {do_children_tests}
520 # Test: c_variable-4.2
521 # Desc: create variable "struct_declarations"
522 gdbtk_test c_variable-4.2 {create variable "struct_declarations"} {
523 create_variable struct_declarations
526 # Test: c_variable-4.3
527 # Desc: children of struct_declarations
528 gdbtk_test c_variable-4.3 {children of struct_declarations} {
529 get_children struct_declarations
530 } {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}
532 # Test: c_variable-4.4
533 # Desc: number of children of struct_declarations
534 gdbtk_test c_variable-4.4 {number of children of struct_declarations} {
535 $var(struct_declarations) numChildren
538 # Test: c_variable-4.5
539 # Desc: children of struct_declarations.integer
540 gdbtk_test c_variable-4.5 {children of struct_declarations.integer} {
541 get_children struct_declarations.integer
544 # Test: c_variable-4.6
545 # Desc: number of children of struct_declarations.integer
546 gdbtk_test c_variable-4.6 {number of children of struct_declarations.integer} {
547 $var(struct_declarations.integer) numChildren
550 # Test: c_variable-4.7
551 # Desc: children of struct_declarations.character
552 gdbtk_test c_variable-4.7 {children of struct_declarations.character} {
553 get_children struct_declarations.character
556 # Test: c_variable-4.8
557 # Desc: number of children of struct_declarations.character
558 gdbtk_test c_variable-4.8 {number of children of struct_declarations.character} {
559 $var(struct_declarations.character) numChildren
562 # Test: c_variable-4.9
563 # Desc: children of struct_declarations.char_ptr
564 gdbtk_test c_variable-4.9 {children of struct_declarations.char_ptr} {
565 get_children struct_declarations.char_ptr
568 # Test: c_variable-4.10
569 # Desc: number of children of struct_declarations.char_ptr
570 gdbtk_test c_variable-4.10 {number of children of struct_declarations.char_ptr} {
571 $var(struct_declarations.char_ptr) numChildren
574 # Test: c_variable-4.11
575 # Desc: children of struct_declarations.long_int
576 gdbtk_test c_variable-4.11 {children of struct_declarations.long_int} {
578 get_children struct_declarations.long_int
581 # Test: c_variable-4.12
582 # Desc: number of children of struct_declarations.long_int
583 gdbtk_test c_variable-4.12 {number of children of struct_declarations.long_int} {
584 $var(struct_declarations.long_int) numChildren
587 # Test: c_variable-4.13
588 # Desc: children of int_ptr_ptr
589 gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
590 get_children struct_declarations.int_ptr_ptr
593 # Test: c_variable-4.14
594 # Desc: number of children of int_ptr_ptr
595 gdbtk_test c_variable-4.14 {number of children of int_ptr_ptr} {
596 $var(struct_declarations.int_ptr_ptr) numChildren
599 # Test: c_variable-4.15
600 # Desc: children of struct_declarations.long_array
601 gdbtk_test c_variable-4.15 {children of struct_declarations.long_array} {
602 get_children struct_declarations.long_array
603 } {0 1 2 3 4 5 6 7 8 9}
605 # Test: c_variable-4.16
606 # Desc: number of children of struct_declarations.long_array
607 gdbtk_test c_variable-4.16 {number of children of struct_declarations.long_array} {
608 $var(struct_declarations.long_array) numChildren
611 # Test: c_variable-4.17
612 # Desc: children of struct_declarations.func_ptr
613 gdbtk_test c_variable-4.17 {children of struct_declarations.func_ptr} {
614 get_children struct_declarations.func_ptr
617 # Test: c_variable-4.18
618 # Desc: number of children of struct_declarations.func_ptr
619 gdbtk_test c_variable-4.18 {number of children of struct_declarations.func_ptr} {
620 $var(struct_declarations.func_ptr) numChildren
623 # Test: c_variable-4.19
624 # Desc: children of struct_declarations.func_ptr_struct
625 gdbtk_test c_variable-4.19 {children of struct_declarations.func_ptr_struct} {
626 get_children struct_declarations.func_ptr_struct
629 # Test: c_variable-4.20
630 # Desc: number of children of struct_declarations.func_ptr_struct
631 gdbtk_test c_variable-4.20 {number of children of struct_declarations.func_ptr_struct} {
632 $var(struct_declarations.func_ptr_struct) numChildren
635 # Test: c_variable-4.21
636 # Desc: children of struct_declarations.func_ptr_ptr
637 gdbtk_test c_variable-4.21 {children of struct_declarations.func_ptr_ptr} {
638 get_children struct_declarations.func_ptr_ptr
641 # Test: c_variable-4.22
642 # Desc: number of children of struct_declarations.func_ptr_ptr
643 gdbtk_test c_variable-4.22 {number of children of struct_declarations.func_ptr_ptr} {
644 $var(struct_declarations.func_ptr_ptr) numChildren
647 # Test: c_variable-4.23
648 # Desc: children of struct_declarations.u1
649 gdbtk_test c_variable-4.23 {children of struct_declarations.u1} {
650 get_children struct_declarations.u1
653 # Test: c_variable-4.24
654 # Desc: number of children of struct_declarations.u1
655 gdbtk_test c_variable-4.24 {number of children of struct_declarations.u1} {
656 $var(struct_declarations.u1) numChildren
659 # Test: c_variable-4.25
660 # Desc: children of struct_declarations.s2
661 gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
662 get_children struct_declarations.s2
665 # Test: c_variable-4.26
666 # Desc: number of children of struct_declarations.s2
667 gdbtk_test c_variable-4.26 {number of children of struct_declarations.s2} {
668 $var(struct_declarations.s2) numChildren
671 # Test: c_variable-4.27
672 # Desc: children of struct_declarations.long_array.1
673 gdbtk_test c_variable-4.27 {children of struct_declarations.long_array.1} {
674 get_children struct_declarations.long_array.1
677 # Test: c_variable-4.28
678 # Desc: number of children of struct_declarations.long_array.1
679 gdbtk_test c_variable-4.28 {number of children of struct_declarations.long_array.1} {
680 $var(struct_declarations.long_array.1) numChildren
683 # Test: c_variable-4.29
684 # Desc: children of struct_declarations.long_array.2
685 gdbtk_test c_variable-4.29 {children of struct_declarations.long_array.2} {
686 get_children struct_declarations.long_array.2
689 # Test: c_variable-4.30
690 # Desc: number of children of struct_declarations.long_array.2
691 gdbtk_test c_variable-4.30 {number of children of struct_declarations.long_array.2} {
692 $var(struct_declarations.long_array.2) numChildren
695 # Test: c_variable-4.31
696 # Desc: children of struct_declarations.long_array.3
697 gdbtk_test c_variable-4.31 {children of struct_declarations.long_array.3} {
698 get_children struct_declarations.long_array.3
701 # Test: c_variable-4.32
702 # Desc: number of children of struct_declarations.long_array.3
703 gdbtk_test c_variable-4.32 {number of children of struct_declarations.long_array.3} {
704 $var(struct_declarations.long_array.3) numChildren
707 # Test: c_variable-4.33
708 # Desc: children of struct_declarations.long_array.4
709 gdbtk_test c_variable-4.33 {children of struct_declarations.long_array.4} {
710 get_children struct_declarations.long_array.4
713 # Test: c_variable-4.34
714 # Desc: number of children of struct_declarations.long_array.4
715 gdbtk_test c_variable-4.34 {number of children of struct_declarations.long_array.4} {
716 $var(struct_declarations.long_array.4) numChildren
719 # Test: c_variable-4.35
720 # Desc: children of struct_declarations.long_array.5
721 gdbtk_test c_variable-4.35 {children of struct_declarations.long_array.5} {
722 get_children struct_declarations.long_array.5
725 # Test: c_variable-4.36
726 # Desc: number of children of struct_declarations.long_array.5
727 gdbtk_test c_variable-4.36 {number of children of struct_declarations.long_array.5} {
728 $var(struct_declarations.long_array.5) numChildren
731 # Test: c_variable-4.37
732 # Desc: children of struct_declarations.long_array.6
733 gdbtk_test c_variable-4.37 {children of struct_declarations.long_array.6} {
734 get_children struct_declarations.long_array.6
737 # Test: c_variable-4.38
738 # Desc: number of children of struct_declarations.long_array.6
739 gdbtk_test c_variable-4.38 {number of children of struct_declarations.long_array.6} {
740 $var(struct_declarations.long_array.6) numChildren
743 # Test: c_variable-4.39
744 # Desc: children of struct_declarations.long_array.7
745 gdbtk_test c_variable-4.39 {children of struct_declarations.long_array.7} {
746 get_children struct_declarations.long_array.7
749 # Test: c_variable-4.40
750 # Desc: number of children of struct_declarations.long_array.7
751 gdbtk_test c_variable-4.40 {number of children of struct_declarations.long_array.7} {
752 $var(struct_declarations.long_array.7) numChildren
755 # Test: c_variable-4.41
756 # Desc: children of struct_declarations.long_array.8
757 gdbtk_test c_variable-4.41 {children of struct_declarations.long_array.8} {
758 get_children struct_declarations.long_array.8
761 # Test: c_variable-4.42
762 # Desc: number of children of struct_declarations.long_array.8
763 gdbtk_test c_variable-4.42 {number of children of struct_declarations.long_array.8} {
764 $var(struct_declarations.long_array.8) numChildren
767 # Test: c_variable-4.43
768 # Desc: children of struct_declarations.long_array.9
769 gdbtk_test c_variable-4.43 {children of struct_declarations.long_array.9} {
770 get_children struct_declarations.long_array.9
773 # Test: c_variable-4.44
774 # Desc: number of children of struct_declarations.long_array.9
775 gdbtk_test c_variable-4.44 {number of children of struct_declarations.long_array.9} {
776 $var(struct_declarations.long_array.9) numChildren
779 # Test: c_variable-4.45
780 # Desc: children of struct_declarations.u1.a
781 gdbtk_test c_variable-4.45 {children of struct_declarations.u1.a} {
782 get_children struct_declarations.u1.a
785 # Test: c_variable-4.46
786 # Desc: number of children of struct_declarations.u1.a
787 gdbtk_test c_variable-4.46 {number of children of struct_declarations.u1.a} {
788 $var(struct_declarations.u1.a) numChildren
791 # Test: c_variable-4.47
792 # Desc: children of struct_declarations.u1.b
793 gdbtk_test c_variable-4.47 {children of struct_declarations.u1.b} {
794 get_children struct_declarations.u1.b
797 # Test: c_variable-4.48
798 # Desc: number of children of struct_declarations.u1.b
799 gdbtk_test c_variable-4.48 {number of children of struct_declarations.u1.b} {
800 $var(struct_declarations.u1.b) numChildren
803 # Test: c_variable-4.49
804 # Desc: children of struct_declarations.u1.c
805 gdbtk_test c_variable-4.49 {children of struct_declarations.u1.c} {
806 get_children struct_declarations.u1.c
809 # Test: c_variable-4.50
810 # Desc: number of children of struct_declarations.u1.c
811 gdbtk_test c_variable-4.50 {number of children of struct_declarations.u1.c} {
812 $var(struct_declarations.u1.c) numChildren
815 # Test: c_variable-4.51
816 # Desc: children of struct_declarations.u1.d
817 gdbtk_test c_variable-4.51 {children of struct_declarations.u1.d} {
818 get_children struct_declarations.u1.d
821 # Test: c_variable-4.52
822 # Desc: number of children of struct_declarations.u1.d
823 gdbtk_test c_variable-4.52 {number of children of struct_declarations.u1.d} {
824 $var(struct_declarations.u1.d) numChildren
827 # Test: c_variable-4.53
828 # Desc: children of struct_declarations.s2.u2
829 gdbtk_test c_variable-4.53 {children of struct_declarations.s2.u2} {
830 get_children struct_declarations.s2.u2
833 # Test: c_variable-4.54
834 # Desc: number of children of struct_declarations.s2.u2
835 gdbtk_test c_variable-4.54 {number of children of struct_declarations.s2.u2} {
836 $var(struct_declarations.s2.u2) numChildren
839 # Test: c_variable-4.55
840 # Desc: children of struct_declarations.s2.g
841 gdbtk_test c_variable-4.55 {children of struct_declarations.s2.g} {
842 get_children struct_declarations.s2.g
845 # Test: c_variable-4.56
846 # Desc: number of children of struct_declarations.s2.g
847 gdbtk_test c_variable-4.56 {number of children of struct_declarations.s2.g} {
848 $var(struct_declarations.s2.g) numChildren
851 # Test: c_variable-4.57
852 # Desc: children of struct_declarations.s2.h
853 gdbtk_test c_variable-4.57 {children of struct_declarations.s2.h} {
854 get_children struct_declarations.s2.h
857 # Test: c_variable-4.58
858 # Desc: number of children of struct_declarations.s2.h
859 gdbtk_test c_variable-4.58 {number of children of struct_declarations.s2.h} {
860 $var(struct_declarations.s2.h) numChildren
863 # Test: c_variable-4.59
864 # Desc: children of struct_declarations.s2.i
865 gdbtk_test c_variable-4.59 {children of struct_declarations.s2.i} {
866 get_children struct_declarations.s2.i
867 } {0 1 2 3 4 5 6 7 8 9}
869 # Test: c_variable-4.60
870 # Desc: number of children of struct_declarations.s2.i
871 gdbtk_test c_variable-4.60 {number of children of struct_declarations.s2.i} {
872 $var(struct_declarations.s2.i) numChildren
875 # Test: c_variable-4.61
876 # Desc: children of struct_declarations.s2.u2.u1s1
877 gdbtk_test c_variable-4.61 {children of struct_declarations.s2.u2.u1s1} {
878 get_children struct_declarations.s2.u2.u1s1
881 # Test: c_variable-4.62
882 # Desc: number of children of struct_declarations.s2.u2.u1s1
883 gdbtk_test c_variable-4.62 {number of children of struct_declarations.s2.u2.u1s1} {
884 $var(struct_declarations.s2.u2.u1s1) numChildren
887 # Test: c_variable-4.63
888 # Desc: children of struct_declarations.s2.u2.f
889 gdbtk_test c_variable-4.63 {children of struct_declarations.s2.u2.f} {
890 get_children struct_declarations.s2.u2.f
893 # Test: c_variable-4.64
894 # Desc: number of children of struct_declarations.s2.u2.f
895 gdbtk_test c_variable-4.64 {number of children of struct_declarations.s2.u2.f} {
896 $var(struct_declarations.s2.u2.f) numChildren
899 # Test: c_variable-4.65
900 # Desc: children of struct_declarations.s2.u2.u1s2
901 gdbtk_test c_variable-4.65 {children of struct_declarations.s2.u2.u1s2} {
902 get_children struct_declarations.s2.u2.u1s2
905 # Test: c_variable-4.66
906 # Desc: number of children of struct_declarations.s2.u2.u1s2
907 gdbtk_test c_variable-4.66 {number of children of struct_declarations.s2.u2.u1s2} {
908 $var(struct_declarations.s2.u2.u1s2) numChildren
911 # Test: c_variable-4.67
912 # Desc: children of struct_declarations.s2.u2.u1s1.d
913 gdbtk_test c_variable-4.67 {children of struct_declarations.s2.u2.u1s1.d} {
914 get_children struct_declarations.s2.u2.u1s1.d
917 # Test: c_variable-4.68
918 # Desc: number of children of struct_declarations.s2.u2.u1s1.d
919 gdbtk_test c_variable-4.68 {number of children of struct_declarations.s2.u2.u1s1.d} {
920 $var(struct_declarations.s2.u2.u1s1.d) numChildren
923 # Test: c_variable-4.69
924 # Desc: children of struct_declarations.s2.u2.u1s1.e
925 gdbtk_test c_variable-4.69 {children of struct_declarations.s2.u2.u1s1.e} {
926 get_children struct_declarations.s2.u2.u1s1.e
927 } {0 1 2 3 4 5 6 7 8 9}
929 # Test: c_variable-4.70
930 # Desc: number of children of struct_declarations.s2.u2.u1s1.e
931 gdbtk_test c_variable-4.70 {number of children of struct_declarations.s2.u2.u1s1.e} {
932 $var(struct_declarations.s2.u2.u1s1.e) numChildren
935 # Test: c_variable-4.71
936 # Desc: children of struct_declarations.s2.u2.u1s1.func
937 gdbtk_test c_variable-4.71 {children of struct_declarations.s2.u2.u1s1.func} {
938 get_children struct_declarations.s2.u2.u1s1.func
941 # Test: c_variable-4.72
942 # Desc: number of children of struct_declarations.s2.u2.u1s1.func
943 gdbtk_test c_variable-4.72 {number of children of struct_declarations.s2.u2.u1s1.func} {
944 $var(struct_declarations.s2.u2.u1s1.func) numChildren
947 # Test: c_variable-4.73
948 # Desc: children of struct_declarations.s2.u2.u1s1.foo
949 gdbtk_test c_variable-4.73 {children of struct_declarations.s2.u2.u1s1.foo} {
950 get_children struct_declarations.s2.u2.u1s1.foo
953 # Test: c_variable-4.74
954 # Desc: number of children of struct_declarations.s2.u2.u1s1.foo
955 gdbtk_test c_variable-4.74 {number of children of struct_declarations.s2.u2.u1s1.foo} {
956 $var(struct_declarations.s2.u2.u1s1.foo) numChildren
959 # Test: c_variable-4.75
960 # Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
961 gdbtk_test c_variable-4.75 {children of struct_declarations.s2.u2.u1s2.array_ptr} {
962 get_children struct_declarations.s2.u2.u1s2.array_ptr
965 # Test: c_variable-4.76
966 # Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
967 gdbtk_test c_variable-4.76 {number of children of struct_declarations.s2.u2.u1s2.array_ptr} {
968 $var(struct_declarations.s2.u2.u1s2.array_ptr) numChildren
971 # Test: c_variable-4.77
972 # Desc: children of struct_declarations.s2.u2.u1s2.func
973 gdbtk_test c_variable-4.77 {children of struct_declarations.s2.u2.u1s2.func} {
974 get_children struct_declarations.s2.u2.u1s2.func
977 # Test: c_variable-4.78
978 # Desc: number of children of struct_declarations.s2.u2.u1s2.func
979 gdbtk_test c_variable-4.78 {number of children of struct_declarations.s2.u2.u1s2.func} {
980 $var(struct_declarations.s2.u2.u1s2.func) numChildren
983 # Test: c_variable-4.79
984 # Desc: children of struct_declarations.*int_ptr_ptr
985 gdbtk_test c_variable-4.79 {children of struct_declarations.*int_ptr_ptr} {
986 get_children struct_declarations.int_ptr_ptr.*int_ptr_ptr
989 # Test: c_variable-4.80
990 # Desc: Number of children of struct_declarations.*int_ptr_ptr
991 gdbtk_test c_variable-4.80 {Number of children of struct_declarations.*int_ptr_ptr} {
992 $var(struct_declarations.int_ptr_ptr.*int_ptr_ptr) numChildren
995 # Step to "struct_declarations.integer = 123;"
998 # Test: c_variable-4.81
999 # Desc: create local variable "weird"
1000 gdbtk_test c_variable-4.81 {create local variable "weird"} {
1001 create_variable weird
1004 # Test: c_variable-4.82
1005 # Desc: children of weird
1006 gdbtk_test c_variable-4.82 {children of weird} {
1008 } {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}
1010 # Test: c_variable-4.83
1011 # Desc: number of children of weird
1012 gdbtk_test c_variable-4.83 {number of children of weird} {
1013 $var(weird) numChildren
1016 # Test: c_variable-4.84
1017 # Desc: children of weird->long_array
1018 gdbtk_test c_variable-4.84 {children of weird->long_array} {
1019 get_children weird.long_array
1020 } {0 1 2 3 4 5 6 7 8 9}
1022 # Test: c_variable-4.85
1023 # Desc: number of children of weird->long_array
1024 gdbtk_test c_variable-4.85 {number of children of weird->long_array} {
1025 $var(weird.long_array) numChildren
1028 # Test: c_variable-4.86
1029 # Desc: children of weird->int_ptr_ptr
1030 gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
1031 get_children weird.int_ptr_ptr
1034 # Test: c_variable-4.87
1035 # Desc: number of children of weird->int_ptr_ptr
1036 gdbtk_test c_variable-4.87 {number of children of weird->int_ptr_ptr} {
1037 $var(weird.int_ptr_ptr) numChildren
1040 # Test: c_variable-4.88
1041 # Desc: children of *weird->int_ptr_ptr
1042 gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
1043 get_children weird.int_ptr_ptr.*int_ptr_ptr
1046 # Test: c_variable-4.89
1047 # Desc: number of children *weird->int_ptr_ptr
1048 gdbtk_test c_variable-4.89 {number of children *weird->int_ptr_ptr} {
1049 $var(weird.int_ptr_ptr.*int_ptr_ptr) numChildren
1052 # Test: c_variable-4.90
1053 # Desc: create weird->int_ptr_ptr
1054 gdbtk_test c_variable-4.90 {create weird->int_ptr_ptr} {
1055 create_variable weird->int_ptr_ptr
1058 # Test: c_variable-4.91
1059 # Desc: children of weird->int_ptr_ptr
1060 gdbtk_test c_variable-4.91 {children of weird->int_ptr_ptr} {
1061 get_children weird->int_ptr_ptr
1062 } {*weird->int_ptr_ptr}
1064 # Test: c_variable-4.92
1065 # Desc: number of children of (weird->int_ptr_ptr)
1066 gdbtk_test c_variable-4.92 {number of children of (weird->int_ptr_ptr)} {
1067 $var(weird->int_ptr_ptr) numChildren
1070 # Test: c_variable-4.93
1071 # Desc: children of *(weird->int_ptr_ptr)
1072 gdbtk_test c_variable-4.93 {children of *(weird->int_ptr_ptr)} {
1073 get_children weird->int_ptr_ptr.*weird->int_ptr_ptr
1074 } {**weird->int_ptr_ptr}
1076 # Test: c_variable-4.94
1077 # Desc: number of children of *(weird->int_ptr_ptr)
1078 gdbtk_test c_variable-4.94 {number of children of *(weird->int_ptr_ptr)} {
1079 $var(weird->int_ptr_ptr.*weird->int_ptr_ptr) numChildren
1082 # Test: c_variable-4.95
1083 # Desc: children of *(*(weird->int_ptr_ptr))
1084 gdbtk_test c_variable-4.95 {children of *(*(weird->int_ptr_ptr))} {
1085 get_children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr
1088 # Test: c_variable-4.96
1089 # Desc: number of children of *(*(weird->int_ptr_ptr))
1090 gdbtk_test c_variable-4.96 {number of children of **weird->int_ptr_ptr} {
1091 $var(weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr) numChildren
1094 # Test: c_variable-4.97
1095 # Desc: is weird editable
1096 gdbtk_test c_variable-4.97 {is weird editable} {
1097 $var(weird) editable
1100 # Test: c_variable-4.98
1101 # Desc: is weird->int_ptr_ptr editable
1102 gdbtk_test c_variable-4.98 {is weird->int_ptr_ptr editable} {
1103 $var(weird.int_ptr_ptr) editable
1106 # Test: c_variable-4.99
1107 # Desc: is *(weird->int_ptr_ptr) editable
1108 gdbtk_test c_variable-4.99 {is *(weird->int_ptr_ptr) editable} {
1109 $var(weird.int_ptr_ptr.*int_ptr_ptr) editable
1112 # Test: c_variable-4.100
1113 # Desc: is *(*(weird->int_ptr_ptr)) editable
1114 gdbtk_test c_variable-4.100 {is *(*(weird->int_ptr_ptr)) editable} {
1115 $var(weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr) editable
1118 # Test: c_variable-4.101
1119 # Desc: is weird->u1 editable
1120 gdbtk_test c_variable-4.101 {is weird->u1 editable} {
1121 $var(weird.u1) editable
1124 # Test: c_variable-4.102
1125 # Desc: is weird->s2 editable
1126 gdbtk_test c_variable-4.102 {is weird->s2 editable} {
1127 $var(weird.s2) editable
1130 # Test: c_variable-4.103
1131 # Desc: is struct_declarations.u1.a editable
1132 gdbtk_test c_variable-4.103 {is struct_declarations.u1.a editable} {
1133 $var(struct_declarations.u1.a) editable
1136 # Test: c_variable-4.104
1137 # Desc: is struct_declarations.u1.b editable
1138 gdbtk_test c_variable-4.104 {is struct_declarations.u1.b editable} {
1139 $var(struct_declarations.u1.b) editable
1142 # Test: c_variable-4.105
1143 # Desc: is struct_declarations.u1.c editable
1144 gdbtk_test c_variable-4.105 {is struct_declarations.u1.c editable} {
1145 $var(struct_declarations.u1.c) editable
1148 # Test: c_variable-4.106
1149 # Desc: is struct_declarations.long_array editable
1150 gdbtk_test c_variable-4.106 {is struct_declarations.long_array editable} {
1151 $var(struct_declarations.long_array) editable
1154 # Test: c_variable-4.107
1155 # Desc: is struct_declarations.long_array[0] editable
1156 gdbtk_test c_variable-4.107 {is struct_declarations.long_array[0] editable} {
1157 $var(struct_declarations.long_array.0) editable
1160 # Test: c_variable-4.108
1161 # Desc: is struct_declarations editable
1162 gdbtk_test c_variable-4.108 {is struct_declarations editable} {
1163 $var(struct_declarations) editable
1166 delete_variable weird
1170 # children and update tests #
1174 # Test: c_variable-5.1
1175 # Desc: check that nothing changed
1176 gdbtk_test c_variable-5.1 {check that nothing changed} {
1178 } {{} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1180 # Step over "struct_declarations.integer = 123;"
1183 # Test: c_variable-5.2
1184 # Desc: check that integer changed
1185 gdbtk_test c_variable-5.2 {check that integer changed} {
1187 } {struct_declarations.integer {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1190 # weird->char_ptr = "hello";
1193 for {set i 0} {$i < 3} {incr i} {
1197 # Test: c_variable-5.3
1198 # Desc: check that char_ptr changed
1199 gdbtk_test c_variable-5.3 {check that char_ptr changed} {
1201 } {{{struct_declarations.char_ptr struct_declarations.char_ptr.*char_ptr}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1203 # Step over "struct_declarations.int_ptr_ptr = &foo;"
1206 # Test: c_variable-5.4
1207 # Desc: check that int_ptr_ptr and children changed
1208 gdbtk_test c_variable-5.4 {check that int_ptr_ptr and children changed} {
1210 } {{{struct_declarations.int_ptr_ptr struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1212 # Step over "weird->long_array[0] = 1234;"
1215 # Test: c_variable-5.5
1216 # Desc: check that long_array[0] changed
1217 gdbtk_test c_variable-5.5 {check that long_array[0] changed} {
1219 } {struct_declarations.long_array.0 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1221 # Step over "struct_declarations.long_array[1] = 2345;"
1224 # Test: c_variable-5.6
1225 # Desc: check that long_array[1] changed
1226 gdbtk_test c_variable-5.6 {check that long_array[1] changed} {
1228 } {struct_declarations.long_array.1 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1230 # Step over "weird->long_array[2] = 3456;"
1233 # Test: c_variable-5.7
1234 # Desc: check that long_array[2] changed
1235 gdbtk_test c_variable-5.7 {check that long_array[2] changed} {
1237 } {struct_declarations.long_array.2 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1240 # struct_declarations.long_array[3] = 4567;
1241 # weird->long_array[4] = 5678;
1242 # struct_declarations.long_array[5] = 6789;
1243 # weird->long_array[6] = 7890;
1244 # struct_declarations.long_array[7] = 8901;
1245 # weird->long_array[8] = 9012;
1246 # struct_declarations.long_array[9] = 1234;
1247 for {set i 0} {$i < 7} {incr i} {
1251 # Test: c_variable-5.8
1252 # Desc: check that long_array[3-9] changed
1253 gdbtk_test c_variable-5.8 {check that long_array[3-9] changed} {
1255 } {{{struct_declarations.long_array.3 struct_declarations.long_array.4 struct_declarations.long_array.5 struct_declarations.long_array.6 struct_declarations.long_array.7 struct_declarations.long_array.8 struct_declarations.long_array.9}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1257 # Step over "weird->func_ptr = nothing;"
1260 # Test: c_variable-5.9
1261 # Desc: check that func_ptr changed
1262 gdbtk_test c_variable-5.9 {check that func_ptr changed} {
1264 } {struct_declarations.func_ptr {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}}
1266 # Delete all variables
1267 delete_all_variables
1269 # Step over all lines:
1272 for {set i 0} {$i < 43} {incr i} {
1276 # Test: c_variable-5.10
1277 # Desc: create psnp->char_ptr
1278 gdbtk_test c_variable-5.10 {create psnp->char_ptr} {
1279 create_variable psnp->char_ptr
1282 # Test: c_variable-5.11
1283 # Desc: children of psnp->char_ptr
1284 gdbtk_test c_variable-5.11 {children of psnp->char_ptr} {
1285 get_children psnp->char_ptr
1288 # Test: c_variable-5.12
1289 # Desc: number of children of psnp->char_ptr
1290 gdbtk_test c_variable-5.12 {number of children of psnp->char_ptr} {
1291 $var(psnp->char_ptr) numChildren
1294 # Test: c_variable-5.13
1295 # Desc: children of *(psnp->char_ptr)
1296 gdbtk_test c_variable-5.13 {children of *(psnp->char_ptr)} {
1297 get_children psnp->char_ptr.*psnp->char_ptr
1298 } {**psnp->char_ptr}
1300 # Test: c_variable-5.14
1301 # Desc: number of children of *(psnp->char_ptr)
1302 gdbtk_test c_variable-5.14 {number of children of *(psnp->char_ptr)} {
1303 $var(psnp->char_ptr.*psnp->char_ptr) numChildren
1306 # Test: c_variable-5.15
1307 # Desc: children of *(*(psnp->char_ptr))
1308 gdbtk_test c_variable-5.15 {children of *(*(psnp->char_ptr))} {
1309 get_children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr
1310 } {***psnp->char_ptr}
1312 # Test: c_variable-5.16
1313 # Desc: number of children of *(*(psnp->char_ptr))
1314 gdbtk_test c_variable-5.16 {number of children of *(*(psnp->char_ptr))} {
1315 $var(psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr) numChildren
1318 # Test: c_variable-5.17
1319 # Desc: children of *(*(*(psnp->char_ptr)))
1320 gdbtk_test c_variable-5.17 {children of *(*(*(psnp->char_ptr)))} {
1321 get_children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr
1322 } {****psnp->char_ptr}
1324 # Test: c_variable-5.18
1325 # Desc: number of children of *(*(*(psnp->char_ptr)))
1326 gdbtk_test c_variable-5.18 {number of children of *(*(*(psnp->char_ptr)))} {
1327 $var(psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr) numChildren
1330 # Test: c_variable-5.19
1331 # Desc: create psnp->long_ptr
1332 gdbtk_test c_variable-5.19 {create psnp->long_ptr} {
1333 create_variable psnp->long_ptr
1336 # Test: c_variable-5.20
1337 # Desc: children of psnp->long_ptr
1338 gdbtk_test c_variable-5.20 {children of psnp->long_ptr} {
1339 get_children psnp->long_ptr
1342 # Test: c_variable-5.21
1343 # Desc: number of children of psnp->long_ptr
1344 gdbtk_test c_variable-5.21 {number of children of psnp->long_ptr} {
1345 $var(psnp->long_ptr) numChildren
1348 # Test: c_variable-5.22
1349 # Desc: children of *(psnp->long_ptr)
1350 gdbtk_test c_variable-5.22 {children of *(psnp->long_ptr)} {
1351 get_children psnp->long_ptr.*psnp->long_ptr
1352 } {**psnp->long_ptr}
1354 # Test: c_variable-5.23
1355 # Desc: number of children of *(psnp->long_ptr)
1356 gdbtk_test c_variable-5.23 {number of children of *(psnp->long_ptr)} {
1357 $var(psnp->long_ptr.*psnp->long_ptr) numChildren
1360 # Test: c_variable-5.24
1361 # Desc: children of *(*(psnp->long_ptr))
1362 gdbtk_test c_variable-5.24 {children of *(*(psnp->long_ptr))} {
1363 get_children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr
1364 } {***psnp->long_ptr}
1366 # Test: c_variable-5.25
1367 # Desc: number of children of *(*(psnp->long_ptr))
1368 gdbtk_test c_variable-5.25 {number of children of *(*(psnp->long_ptr))} {
1369 $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr) numChildren
1372 # Test: c_variable-5.26
1373 # Desc: children of *(*(*(psnp->long_ptr)))
1374 gdbtk_test c_variable-5.26 {children of *(*(*(psnp->long_ptr)))} {
1375 get_children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr
1376 } {****psnp->long_ptr}
1378 # Test: c_variable-5.27
1379 # Desc: number of children of *(*(*(psnp->long_ptr)))
1380 gdbtk_test c_variable-5.27 {number of children of *(*(*(psnp->long_ptr)))} {
1381 $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr) numChildren
1384 # Test: c_variable-5.28
1385 # Desc: children of *(*(*(*(psnp->long_ptr))))
1386 gdbtk_test c_variable-5.29 {children of *(*(*(*(psnp->long_ptr))))} {
1387 get_children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr
1390 # Test: c_variable-5.29
1391 # Desc: number of children of *(*(*(*(psnp->long_ptr))))
1392 gdbtk_test c_variable-5.29 {number of children of *(*(*(*(psnp->long_ptr))))} {
1393 $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr) numChildren
1396 # Test: c_variable-5.30
1397 # Desc: create psnp->ptrs
1398 gdbtk_test c_variable-5.30 {create psnp->ptrs} {
1399 create_variable psnp->ptrs
1402 # Test: c_variable-5.31
1403 # Desc: children of psnp->ptrs
1404 gdbtk_test c_variable-5.31 {children of psnp->ptrs} {
1405 get_children psnp->ptrs
1408 # Test: c_variable-5.32
1409 # Desc: number of children of psnp->ptrs
1410 gdbtk_test c_variable-5.32 {number of children of psnp->ptrs} {
1411 $var(psnp->ptrs) numChildren
1414 # Test: c_variable-5.33
1415 # Desc: children of psnp->ptrs[0]
1416 gdbtk_test c_variable-5.33 {children of psnp->ptrs[0]} {
1417 get_children psnp->ptrs.0
1418 } {char_ptr long_ptr ptrs next}
1420 # Test: c_variable-5.34
1421 # Desc: number of children of psnp->ptrs[0]
1422 gdbtk_test c_variable-5.34 {number of children of psnp->ptrs[0]} {
1423 $var(psnp->ptrs.0) numChildren
1426 # Test: c_variable-5.35
1427 # Desc: children of psnp->ptrs[0]->next
1428 gdbtk_test c_variable-5.35 {children of psnp->ptrs.0.next} {
1429 get_children psnp->ptrs.0.next
1430 } {char_ptr long_ptr ptrs next}
1432 # Test: c_variable-5.36
1433 # Desc: number of children of psnp->ptrs[0]->next
1434 gdbtk_test c_variable-5.36 {number of children of psnp->ptrs[0]->next} {
1435 $var(psnp->ptrs.0.next) numChildren
1438 # Test: c_variable-5.37
1439 # Desc: children of psnp->ptrs[0]->next->char_ptr
1440 gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} {
1441 get_children psnp->ptrs.0.next.char_ptr
1444 # Test: c_variable-5.38
1445 # Desc: number of children of psnp->ptrs[0]->next->char_ptr
1446 gdbtk_test c_variable-5.38 {number of children of psnp->ptrs[0]->next->char_ptr} {
1447 $var(psnp->ptrs.0.next.char_ptr) numChildren
1450 # Test: c_variable-5.39
1451 # Desc: children of *psnp->ptrs[0]->next->char_ptr
1452 gdbtk_test c_variable-5.39 {children of *psnp->ptrs[0]->next->char_ptr} {
1453 get_children psnp->ptrs.0.next.char_ptr.*char_ptr
1456 # Test: c_variable-5.40
1457 # Desc: number of children of *psnp->ptrs[0]->next->char_ptr
1458 gdbtk_test c_variable-5.40 {number of children of *psnp->ptrs[0]->next->char_ptr} {
1459 $var(psnp->ptrs.0.next.char_ptr.*char_ptr) numChildren
1462 # Test: c_variable-5.41
1463 # Desc: children of **psnp->ptrs[0]->next->char_ptr
1464 gdbtk_test c_variable-5.41 {children of **psnp->ptrs[0]->next->char_ptr} {
1465 get_children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr
1468 # Test: c_variable-5.42
1469 # Desc: number of children of **psnp->ptrs[0]->next->char_ptr
1470 gdbtk_test c_variable-5.42 {number of children of **psnp->ptrs[0]->next->char_ptr} {
1471 $var(psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr) numChildren
1474 # Test: c_variable-5.43
1475 # Desc: children of ***psnp->ptrs[0]->next->char_ptr
1476 gdbtk_test c_variable-5.43 {children of ***psnp->ptrs[0]->next->char_ptr} {
1477 get_children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr
1480 # Test: c_variable-5.44
1481 # Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
1482 gdbtk_test c_variable-5.44 {number of children of ***psnp->ptrs[0]->next->char_ptr} {
1483 $var(psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr) numChildren
1486 # Test: c_variable-5.45
1487 # Desc: children of psnp->ptrs[0]->next->next
1488 gdbtk_test c_variable-5.45 {children of psnp->ptrs[0]->next->next} {
1489 get_children psnp->ptrs.0.next.next
1490 } {char_ptr long_ptr ptrs next}
1492 # Test: c_variable-5.46
1493 # Desc: children of psnp->ptrs[0]->next->next->ptrs
1494 gdbtk_test c_variable-5.46 {children of psnp->ptrs[0]->next->next->ptrs} {
1495 get_children psnp->ptrs.0.next.next.ptrs
1498 # Step over "snp0.char_ptr = &b3;"
1501 # Test: c_variable-5.47
1502 # Desc: check that psnp->char_ptr (and [0].char_ptr) changed
1503 gdbtk_test c_variable-5.47 {check that psnp->char_ptr (and [0].char_ptr) changed} {
1505 } {{psnp->ptrs.0.char_ptr {psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
1507 # Step over "snp1.char_ptr = &c3;"
1510 # Test: c_variable-5.48
1511 # Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
1512 gdbtk_test c_variable-5.48 {check that psnp->next->char_ptr (and [1].char_ptr) changed} {
1514 } {{{psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
1516 # Step over "snp2.char_ptr = &a3;"
1519 # Test: c_variable-5.49
1520 # Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
1521 gdbtk_test c_variable-5.49 {heck that psnp->next->next->char_ptr (and [2].char_ptr) changed} {
1523 } {psnp->ptrs.0.next.next.char_ptr {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
1525 # Step over "snp0.long_ptr = &y3;"
1528 # Test: c_variable-5.50
1529 # Desc: check that psnp->long_ptr (and [0].long_ptr) changed
1530 gdbtk_test c_variable-5.50 {check that psnp->long_ptr (and [0].long_ptr) changed} {
1532 } {{psnp->ptrs.0.long_ptr {psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
1534 # Step over "snp1.long_ptr = &x3;"
1537 # Test: c_variable-5.51
1538 # Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
1539 gdbtk_test c_variable-5.51 {check that psnp->next->long_ptr (and [1].long_ptr) changed} {
1541 } {psnp->ptrs.0.next.long_ptr {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
1543 # Step over "snp2.long_ptr = &z3;"
1546 # Test: c_variable-5.52
1547 # Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
1548 gdbtk_test c_variable-5.52 {check that psnp->next->next->long_ptr (and [2].long_ptr) changed} {
1550 } {psnp->ptrs.0.next.next.long_ptr {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.next.ptrs psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr}}
1552 # Test: c_variable-5.53
1553 # Desc: names of editable variables
1554 gdbtk_test c_variable-5.53 {names of editable variables} {
1556 } {{psnp->ptrs.0.next psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->long_ptr psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr} {psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next.ptrs psnp->ptrs psnp->ptrs.0.ptrs}}
1564 delete_all_variables
1566 # Test: c_variable-6.1
1567 # Desc: create variable bar
1568 gdbtk_test c_variable-6.1 {create variable bar} {
1572 # Test: c_variable-6.2
1573 # Desc: type of variable bar
1574 gdbtk_test c_variable-6.2 {type of variable bar} {
1578 # Test: c_variable-6.3
1579 # Desc: format of variable bar
1580 gdbtk_test c_variable-6.3 {format of variable bar} {
1584 # Test: c_variable-6.4
1585 # Desc: value of variable bar
1586 gdbtk_test c_variable-6.4 {value of variable bar} {
1590 # Test: c_variable-6.5
1591 # Desc: change format of bar to hex
1592 gdbtk_test c_variable-6.5 {change format of bar to hex} {
1593 $var(bar) format hex
1597 # Test: c_variable-6.6
1598 # Desc: value of bar with new format
1599 gdbtk_test c_variable-6.6 {value of bar with new format} {
1603 # Test: c_variable-6.7
1604 # Desc: change value of bar
1605 gdbtk_test c_variable-6.7 {change value of bar} {
1610 # Test: c_variable-6.8
1611 # Desc: check new value of bar
1612 gdbtk_test c_variable-6.8 {change value of bar} {
1613 $var(bar) format decimal
1619 # Test: c_variable-6.11
1620 # Desc: create variable foo
1621 gdbtk_test c_variable-6.11 {create variable foo} {
1625 # Test: c_variable-6.12
1626 # Desc: type of variable foo
1627 gdbtk_test c_variable-6.12 {type of variable foo} {
1631 # Test: c_variable-6.13
1632 # Desc: format of variable foo
1633 gdbtk_test c_variable-6.13 {format of variable foo} {
1637 # Test: c_variable-6.14
1638 # Desc: value of variable foo
1639 gdbtk_test c_variable-6.14 {value of variable foo} {
1643 # Test: c_variable-6.15
1644 # Desc: change format of var to octal
1645 gdbtk_test c_variable-6.15 {change format of foo to octal} {
1646 $var(foo) format octal
1650 # Test: c_variable-6.16
1651 # Desc: value of foo with new format
1652 gdbtk_test c_variable-6.16 {value of foo with new format} {
1656 # Test: c_variable-6.17
1657 # Desc: change value of foo
1658 gdbtk_test c_variable-6.17 {change value of foo} {
1663 # Test: c_variable-6.18
1664 # Desc: check new value of foo
1665 gdbtk_test c_variable-6.18 {check new value of foo} {
1666 $var(foo) format decimal
1672 # Test: c_variable-6.21
1673 # Desc: create variable weird and children
1674 gdbtk_test c_variable-6.21 {create variable foo} {
1675 if {![create_variable weird]} {
1676 lsort [get_children weird]
1678 } {char_ptr character func_ptr func_ptr_ptr func_ptr_struct int_ptr_ptr integer long_array long_int s2 u1}
1680 # Test: c_variable-6.22
1681 # Desc: type of weird and children
1682 gdbtk_test c_variable-6.22 {type of weird and children} {
1684 foreach v [lsort [array names var]] {
1685 lappend types [$var($v) type]
1689 } {{weird_struct *} {char *} char {void (*)(void)} {struct _struct_decl *(*)(int, char *, long int)} {struct _struct_decl (*)(int, char *, long int)} {int **} int {long int [10]} {long int} struct union}
1691 # Test: c_variable-6.23
1692 # Desc: change format of weird.func_ptr and weird.func_ptr_ptr
1693 gdbtk_test c_variable-6.23 {change format of weird.func_ptr and weird.func_ptr_ptr} {
1694 $var(weird.func_ptr) format hexadecimal
1695 $var(weird.func_ptr_ptr) format hexadecimal
1697 lappend result [$var(weird.func_ptr) format]
1698 lappend result [$var(weird.func_ptr_ptr) format]
1700 } {hexadecimal hexadecimal}
1702 # Test: c_variable-6.24
1703 # Desc: format of weird and children
1704 gdbtk_test c_variable-6.24 {format of weird and children} {
1706 foreach v [lsort [array names var]] {
1707 lappend formats [$var($v) format]
1711 } {natural natural natural hexadecimal hexadecimal natural natural natural natural natural natural natural}
1713 # Test: c_variable-6.25
1714 # Desc: value of weird and children
1715 gdbtk_test c_variable-6.25 {value of weird and children} {
1717 foreach v [lsort [array names var]] f [list x "" "" x x x x d d d d d] {
1718 lappend values [value $v $f]
1722 } {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
1724 # Test: c_variable-6.26
1725 # Desc: change format of weird and children to octal
1726 gdbtk_test c_variable-6.26 {change format of weird and children to octal} {
1728 foreach v [lsort [array names var]] {
1729 $var($v) format octal
1730 lappend formats [$var($v) format]
1734 } {octal octal octal octal octal octal octal octal octal octal octal octal}
1736 # Test: c_variable-6.27
1737 # Desc: value of weird and children with new format
1738 gdbtk_test c_variable-6.27 {value of foo with new format} {
1740 foreach v [lsort [array names var]] {
1741 lappend values [value $v o]
1745 } {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
1747 # Test: c_variable-6.30
1748 # Desc: create more children of weird
1749 gdbtk_test c_variable-6.30 {create more children of weird} {
1750 foreach v [array names var] {
1754 # Do it twice to get more children
1755 foreach v [array names var] {
1759 lsort [array names var]
1760 } {weird weird.char_ptr weird.char_ptr.*char_ptr weird.character weird.func_ptr weird.func_ptr_ptr weird.func_ptr_struct weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.integer weird.long_array weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.long_int weird.s2 weird.s2.g weird.s2.h weird.s2.i weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9 weird.s2.u2 weird.s2.u2.f weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.u1 weird.u1.a weird.u1.b weird.u1.b.*b weird.u1.c weird.u1.d}
1762 # Test: c_variable-6.31
1763 # Desc: check that all children of weird change
1764 # Ok, obviously things like weird.s2 and weird.u1 will not change!
1765 gdbtk_test c_variable-6.31 {check that all children of weird change (ops, we are now reporting array names as changed in this case - seems harmless though)} {
1766 $var(weird) value 0x2121
1768 } {{{weird weird.integer weird.character weird.char_ptr weird.char_ptr.*char_ptr weird.long_int weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.func_ptr weird.func_ptr_struct weird.func_ptr_ptr weird.u1.a weird.u1.b weird.u1.c weird.u1.d weird.s2.u2.f weird.s2.g weird.s2.h weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9}} {weird.char_ptr weird.s2.u2.f weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.s2.g weird.s2.h weird.s2.i weird.func_ptr_ptr weird.func_ptr weird.s2.u2 weird.int_ptr_ptr weird.long_int weird.character weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.long_array.0 weird.u1.a weird.long_array.1 weird.s2 weird.func_ptr_struct weird.u1.b weird.long_array.2 weird.long_array weird.u1.c weird.long_array.3 weird.u1.d weird.long_array.4 weird.long_array.5 weird.s2.i.0 weird.long_array.6 weird.s2.i.1 weird.long_array.7 weird.s2.i.2 weird.long_array.8 weird.s2.i.3 weird.long_array.9 weird.s2.i.4 weird.integer weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.int_ptr_ptr.*int_ptr_ptr weird.s2.i.9 weird.char_ptr.*char_ptr weird.u1 weird.u1.b.*b}}
1770 delete_variable weird
1774 # Special Display Tests #
1778 # Stop in "do_special_tests"
1779 gdb_cmd "break do_special_tests"
1782 # Test: c_variable-7.1
1783 # Desc: stop in do_special_tests
1784 gdbtk_test c_variable-7.1 {stop in do_special_tests} {
1786 } {do_special_tests}
1788 # Test: c_variable-7.10
1789 # Desc: create union u
1790 gdbtk_test c_variable-7.10 {create union u} {
1794 # Test: c_variable-7.11
1796 gdbtk_test c_variable-7.11 {value of u} {
1800 # Test: c_variable-7.12
1802 gdbtk_test c_variable-7.12 {type of u} {
1804 } {union named_union}
1806 # Test: c_variable-7.13
1807 # Desc: is u editable
1808 gdbtk_test c_variable-7.13 {is u editable} {
1812 # Test: c_variable-7.14
1813 # Desc: number of children of u
1814 gdbtk_test c_variable-7.14 {number of children of u} {
1818 # Test: c_variable-7.15
1819 # Desc: children of u
1820 gdbtk_test c_variable-7.15 {children of u} {
1822 } {integer char_ptr}
1824 # Test: c_variable-7.20
1825 # Desc: create anonu
1826 gdbtk_test c_variable-7.20 {create anonu} {
1827 create_variable anonu
1830 # Test: c_variable-7.21
1831 # Desc: value of anonu
1832 gdbtk_test c_variable-7.21 {value of anonu} {
1836 # Test: c_variable-7.22
1837 # Desc: type of anonu
1838 gdbtk_test c_variable-7.22 {type of anonu} {
1842 # Test: c_variable-7.23
1843 # Desc: is anonu editable
1844 gdbtk_test c_variable-7.23 {is anonu editable} {
1845 $var(anonu) editable
1848 # Test: c_variable-7.24
1849 # Desc: number of children of anonu
1850 gdbtk_test c_variable-7.24 {number of children of anonu} {
1851 $var(anonu) numChildren
1854 # Test: c_variable-7.25
1855 # Desc: children of anonu
1856 gdbtk_test c_variable-7.25 {children of anonu} {
1860 # Test: c_variable-7.30
1861 # Desc: create struct s
1862 gdbtk_test c_variable-7.30 {create struct s} {
1866 # Test: c_variable-7.31
1868 gdbtk_test c_variable-7.31 {value of s} {
1872 # Test: c_variable-7.32
1874 gdbtk_test c_variable-7.32 {type of s} {
1876 } {struct _simple_struct}
1878 # Test: c_variable-7.33
1879 # Desc: is s editable
1880 gdbtk_test c_variable-7.33 {is s editable} {
1884 # Test: c_variable-7.34
1885 # Desc: number of children of s
1886 gdbtk_test c_variable-7.34 {number of children of s} {
1890 # Test: c_variable-7.35
1891 # Desc: children of s
1892 gdbtk_test c_variable-7.35 {children of s} {
1894 } {integer unsigned_integer character signed_character char_ptr array_of_10}
1896 # Test: c_variable-7.40
1897 # Desc: create anons
1898 gdbtk_test c_variable-7.40 {create anons} {
1899 create_variable anons
1902 # Test: c_variable-7.41
1903 # Desc: value of anons
1904 gdbtk_test c_variable-7.41 {value of anons} {
1908 # Test: c_variable-7.42
1909 # Desc: type of anons
1910 gdbtk_test c_variable-7.42 {type of anons} {
1914 # Test: c_variable-7.43
1915 # Desc: is anons editable
1916 gdbtk_test c_variable-7.43 {is anons editable} {
1917 $var(anons) editable
1920 # Test: c_variable-7.44
1921 # Desc: number of children of anons
1922 gdbtk_test c_variable-7.44 {number of children of anons} {
1923 $var(anons) numChildren
1926 # Test: c_variable-7.45
1927 # Desc: children of anons
1928 gdbtk_test c_variable-7.45 {children of anons} {
1932 # Test: c_variable-7.50
1933 # Desc: create enum e
1934 gdbtk_test c_variable-7.50 {create enum e} {
1938 # Test: c_variable-7.51
1940 gdbtk_test c_variable-7.51 {value of e} {
1945 # Test: c_variable-7.52
1947 gdbtk_test c_variable-7.52 {type of e} {
1951 # Test: c_variable-7.53
1952 # Desc: is e editable
1953 gdbtk_test c_variable-7.53 {is e editable} {
1957 # Test: c_variable-7.54
1958 # Desc: number of children of e
1959 gdbtk_test c_variable-7.54 {number of children of e} {
1963 # Test: c_variable-7.55
1964 # Desc: children of e
1965 gdbtk_test c_variable-7.55 {children of e} {
1969 # Test: c_variable-7.60
1970 # Desc: create anone
1971 gdbtk_test c_variable-7.60 {create anone} {
1972 create_variable anone
1975 # Test: c_variable-7.61
1976 # Desc: value of anone
1977 gdbtk_test c_variable-7.61 {value of e} {
1982 # Test: c_variable-7.62
1984 gdbtk_test c_variable-7.62 {type of e} {
1988 # Test: c_variable-7.63
1989 # Desc: is e editable
1990 gdbtk_test c_variable-7.63 {is e editable} {
1994 # Test: c_variable-7.64
1995 # Desc: number of children of e
1996 gdbtk_test c_variable-7.64 {number of children of e} {
2000 # Test: c_variable-7.65
2001 # Desc: children of e
2002 gdbtk_test c_variable-7.65 {children of e} {
2006 # Test: c_variable-7.70
2007 # Desc: create anone
2008 gdbtk_test c_variable-7.70 {try to create anone again (duplicate obj name} {
2009 create_variable anone
2012 # Test: c_variable-7.71
2013 # Desc: value of anone
2014 gdbtk_test c_variable-7.71 {value of anone} {
2019 # Test: c_variable-7.72
2020 # Desc: type of anone
2021 gdbtk_test c_variable-7.72 {type of anone} {
2025 # Test: c_variable-7.73
2026 # Desc: is anone editable
2027 gdbtk_test c_variable-7.73 {is anone editable} {
2028 $var(anone) editable
2031 # Test: c_variable-7.74
2032 # Desc: number of children of anone
2033 gdbtk_test c_variable-7.74 {number of children of anone} {
2034 $var(anone) numChildren
2037 # Test: c_variable-7.75
2038 # Desc: children of anone
2039 gdbtk_test c_variable-7.75 {children of anone} {
2044 set fp [gdb_cmd "output/x \$fp"]
2045 gdb_cmd {break incr_a}
2048 # Test: c_variable-7.80
2049 # Desc: stop in incr_a
2050 gdbtk_test c_variable-7.80 {stop in incr_a} {
2054 # Test: c_variable-7.81
2055 # Desc: Create variables in different scopes
2056 gdbtk_test c_variable-7.81 {create variables in different scopes} {
2057 set a1 [gdb_variable create -expr a]
2058 set a2 [gdb_variable create -expr a -frame $fp]
2061 lappend vals [$a1 value]
2062 lappend vals [$a2 value]