diff options
author | Michael Chastain <mec@google.com> | 2004-01-02 04:46:45 +0000 |
---|---|---|
committer | Michael Chastain <mec@google.com> | 2004-01-02 04:46:45 +0000 |
commit | 184ad4855fc2a50df9af4ff22995c167ef98c842 (patch) | |
tree | ee6e62d31b6021d1c24e6583601f90f1c8046754 /gdb/testsuite/gdb.cp/derivation.exp | |
parent | 5d3786c41d60c07f0609ec85847badbbbb0f8a6a (diff) | |
download | gdb-184ad4855fc2a50df9af4ff22995c167ef98c842.zip gdb-184ad4855fc2a50df9af4ff22995c167ef98c842.tar.gz gdb-184ad4855fc2a50df9af4ff22995c167ef98c842.tar.bz2 |
2004-01-01 Michael Chastain <mec.gnu@mindspring.com>
* gdb.cp/classes.exp: Generate identical results as old version.
* gdb.cp/derivation.exp: Likewise.
* gdb.cp/overload.exp: Likewise.
* gdb.cp/virtfunc.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.cp/derivation.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/derivation.exp | 87 |
1 files changed, 61 insertions, 26 deletions
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp index 984219e..0dec65b 100644 --- a/gdb/testsuite/gdb.cp/derivation.exp +++ b/gdb/testsuite/gdb.cp/derivation.exp @@ -74,59 +74,90 @@ set re_methods "A\\((void|)\\);${ws}int afoo\\((void|)\\);${ws}int foo\\((void| set re_synth_gcc_23 "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);" set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)" +gdb_test "print a_instance" "\\$\[0-9\]+ = \{a = 1, aa = 2\}" "print value of a_instance" + gdb_test_multiple "ptype a_instance" "ptype a_instance" { - -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { - pass "ptype a_instance" + -re "type = $re_class${ws}$re_fields${ws}$re_methods$nl\}$nl$gdb_prompt $" { + pass "ptype a_instance (no synth ops)" + } + -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23${ws}$re_methods${ws}$nl\}$nl$gdb_prompt $" { + pass "ptype a_instance (with synth ops)" + } + -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" { + # TODO: this is fine, it's just gcc abi 2 + # pass "ptype a_instance (with synth ops) (abi 2)" + fail "ptype a_instance" } } -gdb_test "print a_instance" "\\$\[0-9\]+ = \{a = 1, aa = 2\}" "print value of a_instance" - # class D set re_class "class D : private A, public B, protected C \{${ws}public:" -set re_class_BAD "class D : private A, public B, private C \{${ws}public:" +set XX_class "class D : private A, public B, private C \{${ws}public:" set re_fields "int d;${ws}int dd;" set re_methods "D\\((void|)\\);${ws}int dfoo\\((void|)\\);${ws}int foo\\((void|)\\);" set re_synth_gcc_23 "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);" set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)" +gdb_test_multiple "print d_instance" "print value of d_instance" { + -re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, d = 7, dd = 8\}$nl$gdb_prompt $" { + pass "print value of d_instance" + } +} + gdb_test_multiple "ptype d_instance" "ptype d_instance" { + -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" { + # TODO: this is okay, gcc abi 2. + fail "ptype d_instance" + } -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { pass "ptype d_instance" } - -re "type = $re_class_BAD${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { - kfail "gdb/1498" "ptype d_instance" + -re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" { + # TODO: this is okay, gcc abi 2. + # kfail "gdb/1498" "ptype d_instance" + fail "ptype d_instance" } -} - -gdb_test_multiple "print d_instance" "print value of d_instance" { - -re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, d = 7, dd = 8\}$nl$gdb_prompt $" { - pass "print value of d_instance" + -re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { + # TODO: this is a gcc bug. + # kfail "gdb/1498" "ptype d_instance" + pass "ptype d_instance" } } # class E set re_class "class E : public A, private B, protected C \{${ws}public:" -set re_class_BAD "class E : public A, private B, private C \{${ws}public:" +set XX_class "class E : public A, private B, private C \{${ws}public:" set re_fields "int e;${ws}int ee;" set re_methods "E\\((void|)\\);${ws}int efoo\\((void|)\\);${ws}int foo\\((void|)\\);" set re_synth_gcc_23 "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);" set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)" +gdb_test_multiple "print e_instance" "print value of e_instance" { + -re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, e = 9, ee = 10\}$nl$gdb_prompt $" { + pass "print value of e_instance" + } +} + gdb_test_multiple "ptype e_instance" "ptype e_instance" { + -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" { + # TODO: this is okay, just gcc abi 2 + fail "ptype e_instance" + } -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { pass "ptype e_instance" } - -re "type = $re_class_BAD${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { - kfail "gdb/1498" "ptype e_instance" + -re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" { + # TODO: this is okay, just gcc abi 2 + # TODO: this is a gcc bug. + # kfail "gdb/1498" "ptype e_instance" + fail "ptype e_instance" } -} - -gdb_test_multiple "print e_instance" "print value of e_instance" { - -re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, e = 9, ee = 10\}$nl$gdb_prompt $" { - pass "print value of e_instance" + -re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { + # TODO: this is a gcc bug. + # kfail "gdb/1498" "ptype e_instance" + pass "ptype e_instance" } } @@ -138,18 +169,22 @@ set re_methods "F\\((void|)\\);${ws}int ffoo\\((void|)\\);${ws}int foo\\((void| set re_synth_gcc_23 "F & operator=\\(F const ?&\\);${ws}F\\(F const ?&\\);" set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)" -gdb_test_multiple "ptype f_instance" "ptype f_instance" { - -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { - pass "ptype f_instance" - } -} - gdb_test_multiple "print f_instance" "print value of f_instance" { -re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, f = 11, ff = 12\}$nl$gdb_prompt $" { pass "print value of f_instance" } } +gdb_test_multiple "ptype f_instance" "ptype f_instance" { + -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" { + # TODO: this is okay, just gcc abi 2 + fail "ptype f_instance" + } + -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" { + pass "ptype f_instance" + } +} + # Print individual fields. gdb_test "print d_instance.a" "\\$\[0-9\]+ = 1" "print value of d_instance.a" |