This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] clean up gdb.c++ tests for dwarf 1


It's been a week ...

This patch removes special handling for DWARF 1 from gdb.c++/*.exp.

The gdb mailing list had a discussion about this starting on 2003-02-05
with broad support and no objections.

Indeed, the gdb test suite is not even usable with DWARF 1.  Here are
some numbers:

  target=native, host=i686-pc-linux-gnu, osversion=red-hat-8.0,
  gdb=HEAD%20030206, gcc=2.95.3, binutils=2.13.2.1, glibc=2.2.93-5-rh
  gformat=dwarf

    41 ERROR, 1 WARNING
    4264 PASS, 3464 FAIL, 0 KPASS, 4 KFAIL, 1 XPASS, 1 145 XFAIL
    37 UNRESOLVED, 3 UNTESTED, 1 UNSUPPORTED

  target=native, host=i686-pc-linux-gnu, osversion=red-hat-8.0,
  gdb=HEAD%20030206, gcc=3.2.1, binutils=2.13.2.1, glibc=2.2.93-5-rh
  gformat=dwarf

    46 ERROR, 7 WARNING
    4277 PASS, 3463 FAIL, 0 KPASS, 6 KFAIL, 1 XPASS, 144 XFAIL
    39 UNRESOLVED, 0 UNTESTED, 1 UNSUPPORTED

Some scripts such as gdb.c++/virtfunc.exp try to skip all their tests if
the debug format is DWARF 1.  But the detection logic in
get_debug_format and setup_xfail_format does not even work for DWARF 1:
it never successfully detects DWARF 1.  So the tests run anyways.  Thus
I am ripping out the useless detection logic.

I ran before-and-after tests with this patch and there were no
significant changes.  No XFAIL's morphed back to FAILs at all.  No new
batches of FAIL's showed up for scripts like gdb.c++/virtfunc.exp.

Testing: I tested this on native i686-pc-linux-gnu with:

  gcc      => 2.95.3, 3.2.1
  binutils => 2.13.2.1
  libc     => 2.2.93-5-rh
  gformat  => dwarf, dwarf+, dwarf-2, stabs+

I will wait 24 hours and then commit this patch.

Michael C

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.

Index: classes.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/classes.exp,v
retrieving revision 1.13
diff -u -r1.13 classes.exp
--- classes.exp	3 Apr 2002 01:35:23 -0000	1.13
+++ classes.exp	6 Feb 2003 16:32:20 -0000
@@ -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 @@
     # 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 @@
     # 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,8 +124,6 @@
     # 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 $" {
 	    pass "ptype struct mixed_protection_struct (FIXME)"
@@ -177,7 +173,6 @@
     # 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 +231,6 @@
 	}
     }
 
-    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 +248,6 @@
 	}
     }
 
-    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 +265,6 @@
 	}
     }
 
-    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 +282,6 @@
 	}
     }
 
-    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 +345,6 @@
     # 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 +374,6 @@
     # 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 +403,6 @@
     # 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 +432,6 @@
     # 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 +457,6 @@
 	}
     }
 
-    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 +477,6 @@
 	}
     }
 
-    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 +497,6 @@
 	}
     }
 
-    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 +721,6 @@
     }
     clear_xfail "*-*-*"
 
-    setup_xfail_format "DWARF 1"
     gdb_test "print (int)pmi == sizeof(int)" ".* = false" "print (int)pmi == sizeof(int)"
 }
 
@@ -822,11 +805,9 @@
 	"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 +837,7 @@
     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 {
Index: cplusfuncs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/cplusfuncs.exp,v
retrieving revision 1.6
diff -u -r1.6 cplusfuncs.exp
--- cplusfuncs.exp	17 Jan 2003 19:22:27 -0000	1.6
+++ cplusfuncs.exp	6 Feb 2003 16:32:20 -0000
@@ -552,18 +552,7 @@
     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
Index: inherit.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/inherit.exp,v
retrieving revision 1.8
diff -u -r1.8 inherit.exp
--- inherit.exp	17 Jan 2003 19:24:16 -0000	1.8
+++ inherit.exp	6 Feb 2003 16:32:22 -0000
@@ -79,7 +79,6 @@
 
     # 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 @@
 
     # 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 @@
 
     # 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 @@
 
     # 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 @@
     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 @@
 	    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 @@
 
     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 @@
 
     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_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_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 @@
 
     # 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 @@
 	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 @@
 
     # 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 @@
 
     # 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 @@
 
     # 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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 
     # 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 @@
 
     # 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 @@
 
     # 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 @@
 	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 @@
 
     # 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 @@
     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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 
     # 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 @@
 
     # 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 $" {
Index: templates.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/templates.exp,v
retrieving revision 1.12
diff -u -r1.12 templates.exp
--- templates.exp	23 Feb 2002 20:57:10 -0000	1.12
+++ templates.exp	6 Feb 2003 16:32:22 -0000
@@ -192,18 +192,7 @@
 	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
Index: virtfunc.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/virtfunc.exp,v
retrieving revision 1.12
diff -u -r1.12 virtfunc.exp
--- virtfunc.exp	20 Jan 2003 15:40:07 -0000	1.12
+++ virtfunc.exp	6 Feb 2003 16:32:23 -0000
@@ -937,18 +937,7 @@
     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
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]