2004-01-08 Michael Chastain <mec.gnu@mindspring.com>

* gdb.cp/classes.exp: Accept gnu abi 2.
	* gdb.cp/derivation.exp: Likewise.
	* gdb.cp/overload.exp: Likewise.
	* gdb.cp/virtfunc.exp: Likewise.
This commit is contained in:
Michael Chastain 2004-01-09 04:57:09 +00:00
parent 78849248c0
commit 8f25f06bfe
5 changed files with 20 additions and 64 deletions

View File

@ -1,3 +1,10 @@
2004-01-08 Michael Chastain <mec.gnu@mindspring.com>
* gdb.cp/classes.exp: Accept gnu abi 2.
* gdb.cp/derivation.exp: Likewise.
* gdb.cp/overload.exp: Likewise.
* gdb.cp/virtfunc.exp: Likewise.
2004-01-08 Michael Chastain <mec.gnu@mindspring.com>
* gdb.mi/pthreads.c (done_making_threads): Remove extraneous

View File

@ -347,8 +347,7 @@ proc test_ptype_class_objects {} {
}
-re "type = class Static \{${ws}public:${ws}static void ii\\(int, int\\);${ws}Static ?& ?operator ?=\\(Static const ?&\\);${ws}Static\\(Static const ?&\\);${ws}Static\\((void|)\\);$nl\}$nl$gdb_prompt $" {
# gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
# TODO: this is okay. It is just ABI 2.
fail "ptype class Static"
pass "ptype class Static"
}
}
@ -495,8 +494,7 @@ proc test_ptype_class_objects {} {
}
-re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1\\(int\\);${ws}Base1 ?& ?operator ?=\\(Base1 const ?&\\);${ws}Base1\\(Base1 const ?&\\);$nl\}$nl$gdb_prompt $" {
# gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
# TODO: this is not obsolescent!
pass "ptype class Base1 (obsolescent gcc or gdb)"
pass "ptype class Base1"
}
}
@ -522,8 +520,7 @@ proc test_ptype_class_objects {} {
}
-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);${ws}Foo ?& ?operator ?=\\(Foo const ?&\\);${ws}Foo\\(Foo const ?&\\);$nl\}$nl$gdb_prompt $" {
# gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
# TODO: this is okay, just the new ABI
fail "ptype class Foo"
pass "ptype class Foo"
}
}
@ -544,8 +541,7 @@ proc test_ptype_class_objects {} {
}
-re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar\\(int, int, int\\);${ws}Bar ?& ?operator ?=\\(Bar const ?&\\);${ws}Bar\\(Bar const ?&\\);$nl\}$nl$gdb_prompt $" {
# gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
# TODO: this is not obsolescent!
pass "ptype class Bar (obsolescent gcc or gdb)"
pass "ptype class Bar"
}
}
}

View File

@ -84,9 +84,7 @@ gdb_test_multiple "ptype a_instance" "ptype a_instance" {
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"
pass "ptype a_instance (with synth ops)"
}
}
@ -107,16 +105,15 @@ gdb_test_multiple "print d_instance" "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"
pass "ptype d_instance"
}
-re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
pass "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.
# TODO: this is a gcc bug
# kfail "gdb/1498" "ptype d_instance"
fail "ptype d_instance"
pass "ptype d_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
# TODO: this is a gcc bug.
@ -142,17 +139,15 @@ gdb_test_multiple "print e_instance" "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"
pass "ptype e_instance"
}
-re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
pass "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"
pass "ptype e_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
# TODO: this is a gcc bug.
@ -177,8 +172,7 @@ gdb_test_multiple "print f_instance" "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"
pass "ptype f_instance"
}
-re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
pass "ptype f_instance"

View File

@ -64,7 +64,6 @@ gdb_test "up" ".*main.*" "up from marker1"
#
# This is hairy to begin with. It is even more hairy because of the
# XX_* alternate patterns to catch the KFAIL and XFAIL cases.
# TODO: And then hair^3 to reutrn the same results as the old tests.
set re_class "((struct|class) foo \{${ws}public:|struct foo \{)"
set re_fields "int ifoo;${ws}const char ?\\* ?ccpfoo;"
@ -143,9 +142,7 @@ gdb_test_multiple "ptype foo_instance1" "ptype foo_instance1" {
}
-re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods${ws}$re_synth$nl\}$nl$gdb_prompt $" {
# gcc HEAD -gstabs+ (abi-2)
# TODO: just pass this
# pass "ptype foo_instance1"
fail "ptype foo_instance1"
pass "ptype foo_instance1 (shorter match)"
}
}

View File

@ -98,7 +98,6 @@ set kk2 ""
set kk3 ""
set kk4 ""
set kk5 ""
set fk5 ""
proc kk_debug { } {
global kk0
@ -107,14 +106,12 @@ proc kk_debug { } {
global kk3
global kk4
global kk5
global fk5
set kk0 " (0)"
set kk1 " (1)"
set kk2 " (2)"
set kk3 " (3)"
set kk4 " (4)"
set kk5 " (5)"
set fk5 ""
}
proc test_one_ptype { command testname re_class re_vbptr re_access_fields re_fields re_access_methods re_methods re_synth_gcc_2 re_synth_gcc_3 re_star } {
@ -129,7 +126,6 @@ proc test_one_ptype { command testname re_class re_vbptr re_access_fields re_fie
global kk3
global kk4
global kk5
global fk5
gdb_test_multiple "$command" "$testname" {
-re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
@ -158,11 +154,7 @@ proc test_one_ptype { command testname re_class re_vbptr re_access_fields re_fie
}
-re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_methods${wsopt}$re_synth_gcc_3$nl\}$re_star$nl$gdb_prompt $" {
# gcc 3.X, abi 2, stabs+
if { "$fk5" == "fail" } {
fail "$testname$kk5"
} else {
pass "$testname$kk5"
}
pass "$testname$kk5"
}
}
@ -172,7 +164,6 @@ proc test_one_ptype { command testname re_class re_vbptr re_access_fields re_fie
set kk3 ""
set kk4 ""
set kk5 ""
set fk5 ""
}
proc test_ptype_of_classes {} {
@ -186,7 +177,6 @@ proc test_ptype_of_classes {} {
global kk3
global kk4
global kk5
global fk5
# class VA
@ -203,7 +193,6 @@ proc test_ptype_of_classes {} {
# class VB
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype VB" "ptype VB" \
"((struct|class) VB \{${ws}public:|struct VB \{)" \
"" \
@ -216,7 +205,6 @@ proc test_ptype_of_classes {} {
# class V
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype V" "ptype V" \
"class V : public VA, public VB \{${ws}public:" \
"" \
@ -230,7 +218,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype A" "ptype A" \
"class A : public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -243,7 +230,6 @@ proc test_ptype_of_classes {} {
# class B
set kk0 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype B" "ptype B" \
"class B : public A \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -269,7 +255,6 @@ proc test_ptype_of_classes {} {
# class AD
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype AD" "ptype AD" \
"((struct|class) AD \{${ws}public:|struct AD \{)" \
"" \
@ -283,7 +268,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype D" "ptype D" \
"class D : public AD, public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -297,7 +281,6 @@ proc test_ptype_of_classes {} {
# TODO: E does not show a vbptr for V. That seems strange.
set kk0 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype E" "ptype E" \
"class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
"" \
@ -311,7 +294,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype dd" "ptype dd" \
"class D : public AD, public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -325,7 +307,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype ppd" "ptype ppd" \
"class D : public AD, public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -339,7 +320,6 @@ proc test_ptype_of_classes {} {
# TODO: this should be named pADd, not pAd.
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype pAd" "ptype pAd" \
"((struct|class) AD \{${ws}public:|struct AD \{)" \
"" \
@ -353,7 +333,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype a" "ptype a" \
"class A : public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -366,7 +345,6 @@ proc test_ptype_of_classes {} {
# An instance of B
set kk0 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype b" "ptype b" \
"class B : public A \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -393,7 +371,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype d" "ptype d" \
"class D : public AD, public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -406,7 +383,6 @@ proc test_ptype_of_classes {} {
# An instance of E
set kk0 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype e" "ptype e" \
"class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
"" \
@ -419,7 +395,6 @@ proc test_ptype_of_classes {} {
# An instance of V
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype v" "ptype v" \
"class V : public VA, public VB \{${ws}public:" \
"" \
@ -432,7 +407,6 @@ proc test_ptype_of_classes {} {
# An instance of VB
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype vb" "ptype vb" \
"((struct|class) VB \{${ws}public:|struct VB \{)" \
"" \
@ -446,7 +420,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype pAa" "ptype pAa" \
"class A : public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -460,7 +433,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype pAe" "ptype pAe" \
"class A : public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -473,7 +445,6 @@ proc test_ptype_of_classes {} {
# An instance of B *
set kk0 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype pBe" "ptype pBe" \
"class B : public A \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -487,7 +458,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype pDd" "ptype pDd" \
"class D : public AD, public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -501,7 +471,6 @@ proc test_ptype_of_classes {} {
set kk0 " (aCC)"
set kk1 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype pDe" "ptype pDe" \
"class D : public AD, public virtual V \{(${ws}private:|)" \
"V \\*(_vb.1V|_vb.V);" \
@ -514,7 +483,6 @@ proc test_ptype_of_classes {} {
# An instance of V *
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype pVa" "ptype pVa" \
"class V : public VA, public VB \{${ws}public:" \
"" \
@ -527,7 +495,6 @@ proc test_ptype_of_classes {} {
# An instance of V *
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype pVv" "ptype pVv" \
"class V : public VA, public VB \{${ws}public:" \
"" \
@ -540,7 +507,6 @@ proc test_ptype_of_classes {} {
# An instance of V *
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype pVe" "ptype pVe" \
"class V : public VA, public VB \{${ws}public:" \
"" \
@ -553,7 +519,6 @@ proc test_ptype_of_classes {} {
# An instance of V *
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype pVd" "ptype pVd" \
"class V : public VA, public VB \{${ws}public:" \
"" \
@ -566,7 +531,6 @@ proc test_ptype_of_classes {} {
# An instance of AD *
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype pADe" "ptype pADe" \
"((struct|class) AD \{${ws}public:|struct AD \{)" \
"" \
@ -579,7 +543,6 @@ proc test_ptype_of_classes {} {
# An instance of E *
set kk0 " (obsolescent gcc or gdb)"
set fk5 "fail"
test_one_ptype "ptype pEe" "ptype pEe" \
"class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
"" \
@ -592,7 +555,6 @@ proc test_ptype_of_classes {} {
# An instance of VB *
set kk0 " (obsolescent gcc or gdb)"
set kk5 " (obsolescent gcc or gdb)"
test_one_ptype "ptype pVB" "ptype pVB" \
"((struct|class) VB \{${ws}public:|struct VB \{)" \
"" \