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/testsuite] gdb.c++/inherit.exp: accept gcc 3.3 output


This patch relaxes gdb.c++/inherit.exp so that it accepts both
of these outputs:

  # gcc 3.2.3 -gstabs+
  print g_vB
  $73 = {<vA> = {va = 3, vx = 4}, _vptr.vB = 0x804fe6c, vb = 5, vx = 6}

  # gcc 3.3 -gstabs+
  print g_vB
  $73 = {<vA> = {va = 3, vx = 4}, _vptr.vB = 0x804ea74 <VTT for vB>, vb = 5, vx = 6}

The current test considers the first output a PASS and the second output
a FAIL.  I am simply adding a PASS for the second output as well.

This is #1 of 3 places where the gdb test suite has regressions
when comparing gcc 3.2.3 to gcc 3.3.

Testing: native i686-pc-linux-gnu, gcc 2.95.3, gcc 3.2.3, gcc 3.3,
gcc gcc-3_3-branch, gcc HEAD, with both -gdwarf-2 and -gstabs+.

I am committing this to gdb HEAD now.  After a few days, I may also
commit it to the 6.0 branch.

Michael C

===

2003-06-29  Michael Chastain  <mec@shout.net>

	* gdb.c++/inherit.exp (test_print_svi_classes): Accept gdb
	output of '<VTT for class>' for virtual base classes.

Index: inherit.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/inherit.exp,v
retrieving revision 1.10
diff -u -r1.10 inherit.exp
--- inherit.exp	13 Feb 2003 22:42:59 -0000	1.10
+++ inherit.exp	29 Jun 2003 23:59:03 -0000
@@ -704,6 +704,14 @@
 	-re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vptr.vB = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
 	    pass "print g_vB (FIXME v3 vtbl ptr)"
 	}
+	-re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vptr.vB = $hex <VTT for vB>, vb = 5, vx = 6\}$nl$gdb_prompt $" {
+	    # Happens with gcc 3.3 -gstabs+
+	    # Does not happen with gcc 3.2.3 -gstabs+.
+	    # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
+	    # -- chastain 2003-06-29
+	    pass "print g_vB"
+	}
+
 	-re ".*invalid address 0x0.*$gdb_prompt $" {
 	    # Does not happen with gcc cygnus-2.4.5-930828
 	    fail "print g_vB (known bug with gcc cygnus-2.4.5-930417)"
@@ -730,6 +738,13 @@
 	-re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vptr.vC = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
 	    pass "print g_vC (FIXME v3 vtbl ptr)"
 	}
+	-re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vptr.vC = $hex <VTT for vC>, vc = 9, vx = 10\}$nl$gdb_prompt $" {
+	    # Happens with gcc 3.3 -gstabs+
+	    # Does not happen with gcc 3.2.3 -gstabs+.
+	    # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
+	    # -- chastain 2003-06-29
+	    pass "print g_vC"
+	}
 	-re ".*$gdb_prompt $" { fail "print g_vC" }
 	timeout { fail "print g_vC (timeout)" }
     }
@@ -905,6 +920,13 @@
 	}
 	-re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vptr.vB = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vptr.vC = $hex, vc = 23, vx = 24\}, _vptr.vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
 	    pass "print g_vD (FIXME v3 vtbl ptr)"
+	}
+	-re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vptr.vB = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vptr.vC = $hex <VTT for vD>, vc = 23, vx = 24\}, _vptr.vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
+	    # Happens with gcc 3.3 -gstabs+
+	    # Does not happen with gcc 3.2.3 -gstabs+.
+	    # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
+	    # -- chastain 2003-06-29
+	    pass "print g_vD"
 	}
 	-re ".*invalid address 0x0.*$gdb_prompt $" {
 	    # Does not happen with gcc cygnus-2.4.5-930828


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