aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorMichael Chastain <mec@google.com>2004-01-09 04:57:09 +0000
committerMichael Chastain <mec@google.com>2004-01-09 04:57:09 +0000
commit8f25f06bfe2d8077867b96f82102cef1b5139c08 (patch)
tree1f3732f72498776f7ae164996cec8b88bb8923f3 /gdb/testsuite
parent78849248c05bbfd4aec63ab945195eac6e4224b0 (diff)
downloadgdb-8f25f06bfe2d8077867b96f82102cef1b5139c08.zip
gdb-8f25f06bfe2d8077867b96f82102cef1b5139c08.tar.gz
gdb-8f25f06bfe2d8077867b96f82102cef1b5139c08.tar.bz2
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.cp/classes.exp12
-rw-r--r--gdb/testsuite/gdb.cp/derivation.exp20
-rw-r--r--gdb/testsuite/gdb.cp/overload.exp5
-rw-r--r--gdb/testsuite/gdb.cp/virtfunc.exp40
5 files changed, 20 insertions, 64 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 352e5f2..2ceaf62 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,12 @@
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
semicolon after end of function.
diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp
index 20ab8cd..0c3057d 100644
--- a/gdb/testsuite/gdb.cp/classes.exp
+++ b/gdb/testsuite/gdb.cp/classes.exp
@@ -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"
}
}
}
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp
index 0dec65b..5f75899 100644
--- a/gdb/testsuite/gdb.cp/derivation.exp
+++ b/gdb/testsuite/gdb.cp/derivation.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overload.exp
index abb9f5b..2925b50 100644
--- a/gdb/testsuite/gdb.cp/overload.exp
+++ b/gdb/testsuite/gdb.cp/overload.exp
@@ -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)"
}
}
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index 77bbbb8..7edb876 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -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 \{)" \
"" \