diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-08-02 23:48:37 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-08-02 23:48:37 +0000 |
commit | a0b3c4fd32cf8336bf7b69f373ef86d5c54035f6 (patch) | |
tree | cf8f31bccdd267252e6b3c9636a1d323397673e2 /gdb/testsuite/gdb.c++/anon-union.exp | |
parent | 30727aa6d12fb866494020c0b62ab265a2bdcdfe (diff) | |
download | fsf-binutils-gdb-a0b3c4fd32cf8336bf7b69f373ef86d5c54035f6.zip fsf-binutils-gdb-a0b3c4fd32cf8336bf7b69f373ef86d5c54035f6.tar.gz fsf-binutils-gdb-a0b3c4fd32cf8336bf7b69f373ef86d5c54035f6.tar.bz2 |
import gdb-1999-08-02 snapshot
Diffstat (limited to 'gdb/testsuite/gdb.c++/anon-union.exp')
-rw-r--r-- | gdb/testsuite/gdb.c++/anon-union.exp | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/gdb/testsuite/gdb.c++/anon-union.exp b/gdb/testsuite/gdb.c++/anon-union.exp index 83171a2..5ed924f 100644 --- a/gdb/testsuite/gdb.c++/anon-union.exp +++ b/gdb/testsuite/gdb.c++/anon-union.exp @@ -76,6 +76,16 @@ gdb_expect -re "$gdb_prompt $" # NOTE: Add -- ptype foo.x, etc. when things are working +#Initialize foo +send_gdb "next\n" +gdb_expect { + -re "40\[ \t\]*foo.paper = 33;\r\n$gdb_prompt $" { + pass "next 1" + } + -re ".*$gdb_prompt $" { fail "next 1" } + timeout { fail "(timeout) next 1" } +} + # Print out the big anon union. send_gdb "print foo\n" gdb_expect { @@ -245,10 +255,10 @@ gdb_expect { } -# Step over next two assignments -send_gdb "next 2\n" +# Step over next four assignments +send_gdb "next 4\n" gdb_expect { - -re "52\[ \t\]*w = 45;\r\n$gdb_prompt $" { + -re "53\[ \t\]*w = 45;\r\n$gdb_prompt $" { pass "next 3" } -re ".*$gdb_prompt $" { fail "next 3" } @@ -257,30 +267,28 @@ gdb_expect { # Tests for anon unions that are not members of a class or struct -# w is not yet initialized; it contains garbage -#send_gdb "print w\n" -#gdb_expect { -# -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" { -# pass "print w 1" -# } -# -re ".*$gdb_prompt $" { fail "print w 1" } -# timeout { fail "(timeout) print w 1" } -#} -# -# z is not yet initialized; it contains garbage -#send_gdb "print z\n" -#gdb_expect { -# -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" { -# pass "print z 1" -# } -# -re ".*$gdb_prompt $" { fail "print z 1" } -# timeout { fail "(timeout) print z 1" } -#} +send_gdb "print w\n" +gdb_expect { + -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" { + pass "print w 1" + } + -re ".*$gdb_prompt $" { fail "print w 1" } + timeout { fail "(timeout) print w 1" } +} + +send_gdb "print z\n" +gdb_expect { + -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" { + pass "print z 1" + } + -re ".*$gdb_prompt $" { fail "print z 1" } + timeout { fail "(timeout) print z 1" } +} # Step over next assignment to w send_gdb "next\n" gdb_expect { - -re "54\[ \t\]*\}\r\n$gdb_prompt $" { + -re "55\[ \t\]*\}\r\n$gdb_prompt $" { pass "next 4" } -re ".*$gdb_prompt $" { fail "next 4" } |