+send_gdb "p values\[0\].a\t"
+sleep 3
+gdb_expect {
+ -re "^p values.0..a_field $"\
+ { send_gdb "\n"
+ sleep 1
+ gdb_expect {
+ -re "^.* = 0.*$gdb_prompt $"\
+ { pass "complete 'p values\[0\].a'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p values\[0\].a'"}
+ timeout {fail "(timeout) complete 'p values\[0\].a'"}
+ }
+ }
+ -re ".*$gdb_prompt $" { fail "complete 'p values\[0\].a'" }
+ timeout { fail "(timeout) complete 'p values\[0\].a' 2" }
+ }
+
+send_gdb "p values\[0\] . a\t"
+gdb_expect {
+ -re "^p values.0. . a_field $"\
+ { send_gdb "\n"
+ gdb_expect {
+ -re "^.* = 0.*$gdb_prompt $"\
+ { pass "complete 'p values\[0\] . a'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p values\[0\] . a'"}
+ timeout {fail "(timeout) complete 'p values\[0\] . a'"}
+ }
+ }
+ -re ".*$gdb_prompt $" { fail "complete 'p values\[0\] . a'" }
+ timeout { fail "(timeout) complete 'p values\[0\] . a' 2" }
+ }
+
+send_gdb "p &values\[0\] -> a\t"
+gdb_expect {
+ -re "^p &values.0. -> a_field $"\
+ { send_gdb "\n"
+ gdb_expect {
+ -re "^.* = .*0x\[0-9a-fA-F\]*.*$gdb_prompt $"\
+ { pass "complete 'p &values\[0\] -> a'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p &values\[0\] -> a'"}
+ timeout {fail "(timeout) complete 'p &values\[0\] -> a'"}
+ }
+ }
+ -re ".*$gdb_prompt $" { fail "complete 'p &values\[0\] -> a'" }
+ timeout { fail "(timeout) complete 'p &values\[0\] -> a' 2" }
+ }