}
-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"
}
}
}
-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"
}
}
}
-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"
}
}
}
-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"
}
}
}
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)"
}
}
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.
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.
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"
set kk3 ""
set kk4 ""
set kk5 ""
-set fk5 ""
proc kk_debug { } {
global kk0
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 } {
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 $" {
}
-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"
}
}
set kk3 ""
set kk4 ""
set kk5 ""
- set fk5 ""
}
proc test_ptype_of_classes {} {
global kk3
global kk4
global kk5
- global fk5
# class VA
# 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 \{)" \
"" \
# 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:" \
"" \
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);" \
# 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);" \
# 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 \{)" \
"" \
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);" \
# 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:|)" \
"" \
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);" \
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);" \
# 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 \{)" \
"" \
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);" \
# 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);" \
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);" \
# 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:|)" \
"" \
# 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:" \
"" \
# 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 \{)" \
"" \
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);" \
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);" \
# 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);" \
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);" \
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);" \
# 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:" \
"" \
# 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:" \
"" \
# 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:" \
"" \
# 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:" \
"" \
# 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 \{)" \
"" \
# 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:|)" \
"" \
# 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 \{)" \
"" \