diff options
author | Michael Chastain <mec@google.com> | 2003-02-13 21:33:20 +0000 |
---|---|---|
committer | Michael Chastain <mec@google.com> | 2003-02-13 21:33:20 +0000 |
commit | 40f235b7e218cc05a6cc5eea2aaac15d1e292058 (patch) | |
tree | 478161a31332a9d844deae772b7e193c429b47b3 /gdb | |
parent | 427bfd905da0f6acce66519e17ba5ccbbef19677 (diff) | |
download | gdb-40f235b7e218cc05a6cc5eea2aaac15d1e292058.zip gdb-40f235b7e218cc05a6cc5eea2aaac15d1e292058.tar.gz gdb-40f235b7e218cc05a6cc5eea2aaac15d1e292058.tar.bz2 |
2003-02-12 Michael Chastain <mec@shout.net>
* gdb.c++/classes.exp: Remove setup_xfail_format for DWARF 1.
* gdb.c++/inherit.exp: Likewise.
* gdb.c++/cplusfuncs.exp: Remove suppression logic for DWARF 1.
* gdb.c++/templates.exp: Likewise.
* gdb.c++/virtfunc.exp: Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/classes.exp | 29 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/cplusfuncs.exp | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/inherit.exp | 60 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/templates.exp | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/virtfunc.exp | 13 |
6 files changed, 14 insertions, 122 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4811365..74addf2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2003-02-12 Michael Chastain <mec@shout.net> + + * gdb.c++/classes.exp: Remove setup_xfail_format for DWARF 1. + * gdb.c++/inherit.exp: Likewise. + * gdb.c++/cplusfuncs.exp: Remove suppression logic for DWARF 1. + * gdb.c++/templates.exp: Likewise. + * gdb.c++/virtfunc.exp: Likewise. + 2003-02-06 Jason Molenda (jason-cl@molenda.com) * gdb.mi/mi-syn-frame.c (subroutine): Add a comment explaining diff --git a/gdb/testsuite/gdb.c++/classes.exp b/gdb/testsuite/gdb.c++/classes.exp index dbdea5d..f6f35f4 100644 --- a/gdb/testsuite/gdb.c++/classes.exp +++ b/gdb/testsuite/gdb.c++/classes.exp @@ -1,5 +1,5 @@ -# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -92,7 +92,6 @@ proc test_ptype_class_objects {} { # Accept it as an expected failure if gdb just fails to distinguish between # class and struct, and everything else is OK. - setup_xfail_format "DWARF 1" send_gdb "ptype struct protected_struct\n" gdb_expect { -re "type = struct protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" { @@ -109,7 +108,6 @@ proc test_ptype_class_objects {} { # Accept it as an expected failure if gdb just fails to distinguish between # class and struct, and everything else is OK. - setup_xfail_format "DWARF 1" send_gdb "ptype struct private_struct\n" gdb_expect { -re "type = struct private_struct \{${ws}private:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" { @@ -126,7 +124,6 @@ proc test_ptype_class_objects {} { # Accept it as an expected failure if gdb just fails to distinguish between # class and struct, and everything else is OK. - setup_xfail_format "DWARF 1" send_gdb "ptype struct mixed_protection_struct\n" gdb_expect { -re "type = struct mixed_protection_struct \{${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" { @@ -177,7 +174,6 @@ proc test_ptype_class_objects {} { # structs (where we don't print the "public:" attribute) we don't print # the "private:" attribute. - setup_xfail_format "DWARF 1" send_gdb "ptype class default_private_class\n" gdb_expect { -re "type = class default_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { @@ -236,7 +232,6 @@ proc test_ptype_class_objects {} { } } - setup_xfail_format "DWARF 1" send_gdb "ptype class B\n" gdb_expect { -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}\}$nl$gdb_prompt $" { @@ -254,7 +249,6 @@ proc test_ptype_class_objects {} { } } - setup_xfail_format "DWARF 1" send_gdb "ptype class C\n" gdb_expect { -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;${ws}C & operator=\\(C const ?&\\);${ws}C\\((C const|const C) ?&\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" { @@ -272,7 +266,6 @@ proc test_ptype_class_objects {} { } } - setup_xfail_format "DWARF 1" send_gdb "ptype class D\n" gdb_expect { -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}\}$nl$gdb_prompt $" { @@ -290,7 +283,6 @@ proc test_ptype_class_objects {} { } } - setup_xfail_format "DWARF 1" send_gdb "ptype class E\n" gdb_expect { -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}\}$nl$gdb_prompt $" { @@ -354,7 +346,6 @@ proc test_ptype_class_objects {} { # The format of a g++ virtual base pointer. set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?" - setup_xfail_format "DWARF 1" send_gdb "ptype class vB\n" gdb_expect { -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const ?&\\);${ws}vB\\((vB const|const vB) ?&\\);${ws}vB\\((void|)\\);${ws}\}$nl$gdb_prompt $" { @@ -384,7 +375,6 @@ proc test_ptype_class_objects {} { # for now, but with a FIXME. At some future point, gdb should use a # portable representation for the virtual table constructs. - setup_xfail_format "DWARF 1" send_gdb "ptype class vC\n" gdb_expect { -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const ?&\\);${ws}vC\\((vC const|const vC) ?&\\);${ws}vC\\((void|)\\);${ws}\}$nl$gdb_prompt $" { @@ -414,7 +404,6 @@ proc test_ptype_class_objects {} { # for now, but with a FIXME. At some future point, gdb should use a # portable representation for the virtual table constructs. - setup_xfail_format "DWARF 1" send_gdb "ptype class vD\n" gdb_expect { -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const ?&\\);${ws}vD\\((vD const|const vD) ?&\\);${ws}vD\\((void|)\\);${ws}\}$nl$gdb_prompt $" { @@ -444,7 +433,6 @@ proc test_ptype_class_objects {} { # for now, but with a FIXME. At some future point, gdb should use a # portable representation for the virtual table constructs. - setup_xfail_format "DWARF 1" send_gdb "ptype class vE\n" gdb_expect { -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const ?&\\);${ws}vE\\((vE const|const vE) ?&\\);${ws}vE\\((void|)\\);${ws}\}$nl$gdb_prompt $" { @@ -470,7 +458,6 @@ proc test_ptype_class_objects {} { } } - setup_xfail_format "DWARF 1" send_gdb "ptype class Base1\n" gdb_expect { -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1 & operator=\\(Base1 const ?&\\);${ws}Base1\\(((Base1 const)|(const Base1)) ?&\\);${ws}Base1\\(int\\);${ws}\}$nl$gdb_prompt $" { @@ -491,7 +478,6 @@ proc test_ptype_class_objects {} { } } - setup_xfail_format "DWARF 1" send_gdb "ptype class Foo\n" gdb_expect { -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;\r\n${ws}Foo\\(int, int\\);${ws}int operator!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" { @@ -512,7 +498,6 @@ proc test_ptype_class_objects {} { } } - setup_xfail_format "DWARF 1" send_gdb "ptype class Bar\n" gdb_expect { -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar & operator=\\(Bar const ?&\\);${ws}Bar\\((Bar const|const Bar) ?&\\);${ws}Bar\\(int, int, int\\);${ws}\}$nl$gdb_prompt $" { @@ -737,7 +722,6 @@ proc test_pointers_to_class_members {} { } clear_xfail "*-*-*" - setup_xfail_format "DWARF 1" gdb_test "print (int)pmi == sizeof(int)" ".* = false" "print (int)pmi == sizeof(int)" } @@ -822,11 +806,9 @@ proc test_static_members {} { "print cnsi without static members" gdb_test "set print static-members on" "" - setup_xfail_format "DWARF 1" gdb_test "print csi" \ "{x = 10, y = 20, static null = {x = 0, y = 0, static null = <same as static member of an already seen type>}}" \ "print csi with static members" - setup_xfail_format "DWARF 1" gdb_test "print cnsi" \ "{x = 30, y = 40, static null = {x = 0, y = 0, static null = <same as static member of an already seen type>, static yy = {z = 5, static xx = {x = 1, y = 2, static null = <same as static member of an already seen type>, static yy = <same as static member of an already seen type>}}}, static yy = <same as static member of an already seen type>}" \ "print cnsi with static members" @@ -856,12 +838,7 @@ proc do_tests {} { send_gdb "set width 0\n" gdb_expect -re "$gdb_prompt $" - # Get the debug format for the compiled test case. - - if [ runto_main ] then { - get_debug_format - } - + runto_main test_ptype_class_objects if [ runto 'inheritance2' ] then { diff --git a/gdb/testsuite/gdb.c++/cplusfuncs.exp b/gdb/testsuite/gdb.c++/cplusfuncs.exp index 6f92817..0a5e1b3 100644 --- a/gdb/testsuite/gdb.c++/cplusfuncs.exp +++ b/gdb/testsuite/gdb.c++/cplusfuncs.exp @@ -552,18 +552,7 @@ proc do_tests {} { send_gdb "set width 0\n" gdb_expect -re "$gdb_prompt $" - # Get the debug format for the compiled test case. If that - # format is DWARF 1 then just skip all the tests since none of - # them will pass. - - if [ runto_main] then { - get_debug_format - if [ setup_xfail_format "DWARF 1" ] then { - fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format" - return - } - clear_xfail "*-*-*" - } + runto_main probe_demangler test_paddr_overloaded_functions diff --git a/gdb/testsuite/gdb.c++/inherit.exp b/gdb/testsuite/gdb.c++/inherit.exp index 66c2a52..ea0d7c6 100644 --- a/gdb/testsuite/gdb.c++/inherit.exp +++ b/gdb/testsuite/gdb.c++/inherit.exp @@ -79,7 +79,6 @@ proc test_print_si_members {} { # Print members of g_B using nonambiguous compact form. - setup_xfail_format "DWARF 1" gdb_test "print g_B.a" ".* = 3" "print g_B.a" gdb_test "print g_B.b" ".* = 5" "print g_B.b" @@ -98,7 +97,6 @@ proc test_print_si_members {} { # Print members of g_C using nonambiguous compact form. - setup_xfail_format "DWARF 1" gdb_test "print g_C.a" ".* = 7" "print g_C.a" gdb_test "print g_C.c" ".* = 9" "print g_C.c" @@ -163,32 +161,26 @@ proc test_ptype_si {} { # Print class B as a type. - setup_xfail_format "DWARF 1" gdb_test "ptype B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype B" # Print class B as an explicit class. - setup_xfail_format "DWARF 1" gdb_test "ptype class B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype class B" # Print type of an object of type B. - setup_xfail_format "DWARF 1" gdb_test "ptype g_B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype g_B" # Print class C as a type. - setup_xfail_format "DWARF 1" gdb_test "ptype C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype C" # Print class C as an explicit class. - setup_xfail_format "DWARF 1" gdb_test "ptype class C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype class C" # Print type of an object of type g_C. - setup_xfail_format "DWARF 1" gdb_test "ptype g_C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype g_C" # gcc cygnus-2.3.3 (Q1) has this bug, but it was fixed as of @@ -243,12 +235,10 @@ proc test_print_si_classes {} { # Print all members of g_B. - setup_xfail_format "DWARF 1" gdb_test "print g_B" ".* = \{\<(class |)A\> = \{a = 3, x = 4\}, b = 5, x = 6\}" "print g_B" # Print all members of g_C. - setup_xfail_format "DWARF 1" gdb_test "print g_C" ".* = \{\<(class |)A\> = \{a = 7, x = 8\}, c = 9, x = 10\}" "print g_C" } @@ -266,9 +256,7 @@ proc test_print_anon_union {} { global ws global nl - setup_xfail_format "DWARF 1" gdb_test "print g_anon_union.a" ".* = 2" "print anonymous union member" - setup_xfail_format "DWARF 1" send_gdb "print g_anon_union\n" gdb_expect { -re ".* = \{one = 1, ( = |)\{a = 2, b = 2\}\}$nl$gdb_prompt $" { @@ -284,7 +272,6 @@ proc test_print_anon_union {} { fail "print variableof type anonymous union (timeout)" } } - setup_xfail_format "DWARF 1" send_gdb "ptype g_anon_union\n" gdb_expect { -re "type = class class_with_anon_union \{${ws}public:${ws}int one;${ws}union \{${ws}public:${ws}int a;${ws}long int b;${ws}union \{\.\.\.\} & operator=\\(union \{\.\.\.\} &\\);${ws}\\\$_0 \\(union \{\.\.\.\} &\\);${ws}\\\$_0 \\(\\);${ws}\};${ws}class_with_anon_union & operator=\\(class_with_anon_union const &\\);${ws}class_with_anon_union\\(class_with_anon_union const &\\);${ws}class_with_anon_union\\(void\\);${ws}\}$nl$gdb_prompt $" { @@ -393,10 +380,8 @@ proc test_print_mi_members {} { gdb_test "print g_D.B::x" ".* = 14" "print g_D.B::x" - setup_xfail_format "DWARF 1" gdb_test "print g_D.C::c" ".* = 17" "print g_D.C::c" - setup_xfail_format "DWARF 1" gdb_test "print g_D.C::x" ".* = 18" "print g_D.C::x" gdb_test "print g_D.D::d" ".* = 19" "print g_D.D::d" @@ -447,10 +432,8 @@ proc test_print_mi_members {} { gdb_test "print g_E.B::x" ".* = 24" "print g_E.B::x" - setup_xfail_format "DWARF 1" gdb_test "print g_E.C::c" ".* = 27" "print g_E.C::c" - setup_xfail_format "DWARF 1" gdb_test "print g_E.C::x" ".* = 28" "print g_E.C::x" gdb_test "print g_E.D::d" ".* = 29" "print g_E.D::d" @@ -469,22 +452,16 @@ proc test_print_mi_members {} { proc test_ptype_mi {} { global nl - setup_xfail_format "DWARF 1" gdb_test "ptype D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype D" - setup_xfail_format "DWARF 1" gdb_test "ptype class D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype class D" - setup_xfail_format "DWARF 1" gdb_test "ptype g_D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype g_D" - setup_xfail_format "DWARF 1" gdb_test "ptype E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype E" - setup_xfail_format "DWARF 1" gdb_test "ptype class E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype class E" - setup_xfail_format "DWARF 1" gdb_test "ptype g_E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype g_E" } @@ -495,12 +472,10 @@ proc test_ptype_mi {} { proc test_print_mi_classes {} { # Print all members of g_D. - setup_xfail_format "DWARF 1" gdb_test "print g_D" ".* = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 11, x = 12\}, b = 13, x = 14\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 15, x = 16\}, c = 17, x = 18\}, d = 19, x = 20\}" "print g_D" # Print all members of g_E. - setup_xfail_format "DWARF 1" gdb_test "print g_E" ".* = \{\<(class |)D\> = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 21, x = 22\}, b = 23, x = 24\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 25, x = 26\}, c = 27, x = 28\}, d = 29, x = 30\}, e = 31, x = 32\}" "print g_E" } @@ -527,7 +502,6 @@ proc test_print_svi_members {} { # Print all members of g_vB. - setup_xfail_format "DWARF 1" send_gdb "print g_vB.vA::va\n" gdb_expect { -re ".* = 3$nl$gdb_prompt $" { pass "print g_vB.vA::va" } @@ -541,7 +515,6 @@ proc test_print_svi_members {} { timeout { fail "print g_vB.vA::va (timeout)" ; return } } - setup_xfail_format "DWARF 1" gdb_test "print g_vB.vA::vx" ".* = 4" "print g_vB.vA::vx" gdb_test "print g_vB.vB::vb" ".* = 5" "print g_vB.vB::vb" @@ -550,7 +523,6 @@ proc test_print_svi_members {} { # Print members of g_vB using compact form. - setup_xfail_format "DWARF 1" gdb_test "print g_vB.va" ".* = 3" "print g_vB.va" gdb_test "print g_vB.vb" ".* = 5" "print g_vB.vb" @@ -559,10 +531,8 @@ proc test_print_svi_members {} { # Print all members of g_vC. - setup_xfail_format "DWARF 1" gdb_test "print g_vC.vA::va" ".* = 7" "print g_vC.vA::va" - setup_xfail_format "DWARF 1" gdb_test "print g_vC.vA::vx" ".* = 8" "print g_vC.vA::vx" gdb_test "print g_vC.vC::vc" ".* = 9" "print g_vC.vC::vc" @@ -571,7 +541,6 @@ proc test_print_svi_members {} { # Print members of g_vC using compact form. - setup_xfail_format "DWARF 1" gdb_test "print g_vC.va" ".* = 7" "print g_vC.va" gdb_test "print g_vC.vc" ".* = 9" "print g_vC.vc" @@ -631,7 +600,6 @@ proc test_ptype_vi {} { timeout { fail "ptype g_vA (timeout)" ; return } } - setup_xfail_format "DWARF 1" send_gdb "ptype vB\n" gdb_expect { -re "ptype vB${nl}type = class vB : public virtual vA \{$nl private:${ws}vA \\*${vbptr}vA;$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" { @@ -644,7 +612,6 @@ proc test_ptype_vi {} { timeout { fail "ptype vB (timeout)" } } - setup_xfail_format "DWARF 1" send_gdb "ptype class vB\n" gdb_expect { -re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" { @@ -657,7 +624,6 @@ proc test_ptype_vi {} { timeout { fail "ptype class vB (timeout)" } } - setup_xfail_format "DWARF 1" send_gdb "ptype g_vB\n" gdb_expect { -re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" { @@ -670,7 +636,6 @@ proc test_ptype_vi {} { timeout { fail "ptype g_vB (timeout)" } } - setup_xfail_format "DWARF 1" send_gdb "ptype vC\n" gdb_expect { -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" { @@ -683,7 +648,6 @@ proc test_ptype_vi {} { timeout { fail "ptype vC (timeout)" } } - setup_xfail_format "DWARF 1" send_gdb "ptype class vC\n" gdb_expect { -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" { @@ -696,7 +660,6 @@ proc test_ptype_vi {} { timeout { fail "ptype class vC (timeout)" } } - setup_xfail_format "DWARF 1" send_gdb "ptype g_vC\n" gdb_expect { -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" { @@ -727,7 +690,6 @@ proc test_print_svi_classes {} { # Print all members of g_vB. - setup_xfail_format "DWARF 1" send_gdb "print g_vB\n" gdb_expect { -re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, Virtual table at $hex\}$nl$gdb_prompt $" { @@ -754,7 +716,6 @@ proc test_print_svi_classes {} { # Print all members of g_vC. - setup_xfail_format "DWARF 1" send_gdb "print g_vC\n" gdb_expect { -re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, Virtual table at $hex\}$nl$gdb_prompt $" { @@ -785,7 +746,6 @@ proc test_print_mvi_members {} { # Print all members of g_vD. - setup_xfail_format "DWARF 1" send_gdb "print g_vD.vA::va\n" gdb_expect { -re ".* = 19$nl$gdb_prompt $" { pass "print g_vD.vA::va" } @@ -799,19 +759,14 @@ proc test_print_mvi_members {} { timeout { fail "print g_vD.vA::va (timeout)" ; return } } - setup_xfail_format "DWARF 1" gdb_test "print g_vD.vA::vx" ".* = 20" "print g_vD.vA::vx" - setup_xfail_format "DWARF 1" gdb_test "print g_vD.vB::vb" ".* = 21" "print g_vD.vB::vb" - setup_xfail_format "DWARF 1" gdb_test "print g_vD.vB::vx" ".* = 22" "print g_vD.vB::vx" - setup_xfail_format "DWARF 1" gdb_test "print g_vD.vC::vc" ".* = 23" "print g_vD.vC::vc" - setup_xfail_format "DWARF 1" gdb_test "print g_vD.vC::vx" ".* = 24" "print g_vD.vC::vx" gdb_test "print g_vD.vD::vd" ".* = 25" "print g_vD.vD::vd" @@ -820,25 +775,18 @@ proc test_print_mvi_members {} { # Print all members of g_vE. - setup_xfail_format "DWARF 1" gdb_test "print g_vE.vA::va" ".* = 0" "print g_vE.vA::va" - setup_xfail_format "DWARF 1" gdb_test "print g_vE.vA::vx" ".* = 0" "print g_vE.vA::vx" - setup_xfail_format "DWARF 1" gdb_test "print g_vE.vB::vb" ".* = 0" "print g_vE.vB::vb" - setup_xfail_format "DWARF 1" gdb_test "print g_vE.vB::vx" ".* = 0" "print g_vE.vB::vx" - setup_xfail_format "DWARF 1" gdb_test "print g_vE.vC::vc" ".* = 0" "print g_vE.vC::vc" - setup_xfail_format "DWARF 1" gdb_test "print g_vE.vC::vx" ".* = 0" "print g_vE.vC::vx" - setup_xfail_format "DWARF 1" gdb_test "print g_vE.vD::vd" ".* = 0" "print g_vE.vD::vd" gdb_test "print g_vE.vD::vx" ".* = 0" "print g_vE.vD::vx" @@ -858,7 +806,6 @@ proc test_ptype_mvi {} { global nl global vbptr - setup_xfail_format "DWARF 1" send_gdb "ptype vD\n" gdb_expect { -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" { @@ -871,7 +818,6 @@ proc test_ptype_mvi {} { timeout { fail "(timeout) ptype vD" } } - setup_xfail_format "DWARF 1" send_gdb "ptype class vD\n" gdb_expect { -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" { @@ -884,7 +830,6 @@ proc test_ptype_mvi {} { timeout { fail "(timeout) ptype class vD" } } - setup_xfail_format "DWARF 1" send_gdb "ptype g_vD\n" gdb_expect { -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" { @@ -897,7 +842,6 @@ proc test_ptype_mvi {} { timeout { fail "(timeout) ptype g_vD" } } - setup_xfail_format "DWARF 1" send_gdb "ptype vE\n" gdb_expect { -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" { @@ -910,7 +854,6 @@ proc test_ptype_mvi {} { timeout { fail "(timeout) ptype vE" } } - setup_xfail_format "DWARF 1" send_gdb "ptype class vE\n" gdb_expect { -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" { @@ -923,7 +866,6 @@ proc test_ptype_mvi {} { timeout { fail "(timeout) ptype class vE" } } - setup_xfail_format "DWARF 1" send_gdb "ptype g_vE\n" gdb_expect { -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" { @@ -950,7 +892,6 @@ proc test_print_mvi_classes {} { # Print all members of g_vD. - setup_xfail_format "DWARF 1" send_gdb "print g_vD\n" gdb_expect { -re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, Virtual table at $hex\}, \<class vC\> = \{vc = 23, vx = 24, Virtual table at $hex\}, vd = 25, vx = 26, Virtual table at $hex\}$nl$gdb_prompt $" { @@ -977,7 +918,6 @@ proc test_print_mvi_classes {} { # Print all members of g_vE. - setup_xfail_format "DWARF 1" send_gdb "print g_vE\n" gdb_expect { -re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, Virtual table at $hex\}, \<class vC\> = \{vc = 0, vx = 0, Virtual table at $hex\}, vd = 0, vx = 0, Virtual table at $hex\}, ve = 27, vx = 28, Virtual table at $hex\}$nl$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.c++/templates.exp b/gdb/testsuite/gdb.c++/templates.exp index a6d35fc..919e16c 100644 --- a/gdb/testsuite/gdb.c++/templates.exp +++ b/gdb/testsuite/gdb.c++/templates.exp @@ -192,18 +192,7 @@ proc do_tests {} { return } - # Get the debug format for the compiled test case. If that - # format is DWARF 1 then just skip all the tests since none of - # them will pass. - - if [ runto_main] then { - get_debug_format - if [ setup_xfail_format "DWARF 1" ] then { - fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format" - return - } - clear_xfail "*-*-*" - } + runto_main test_ptype_of_templates test_template_breakpoints diff --git a/gdb/testsuite/gdb.c++/virtfunc.exp b/gdb/testsuite/gdb.c++/virtfunc.exp index 2741cf6..af33da2 100644 --- a/gdb/testsuite/gdb.c++/virtfunc.exp +++ b/gdb/testsuite/gdb.c++/virtfunc.exp @@ -937,18 +937,7 @@ proc do_tests {} { gdb_start; gdb_virtfunc_init; - # Get the debug format for the compiled test case. If that - # format is DWARF 1 then just skip all the tests since none of - # them will pass. - - if [ runto_main ] then { - get_debug_format - if [ setup_xfail_format "DWARF 1" ] then { - fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format" - return - } - clear_xfail "*-*-*" - } + runto_main test_ptype_of_classes |