[commit] Remove some more xpasses from constvars.exp and volatile.exp

Daniel Jacobowitz drow@mvista.com
Sun Jun 29 20:02:00 GMT 2003


On Tue, Jan 14, 2003 at 11:48:48AM -0600, Michael Elizabeth Chastain wrote:
> Looks good to me.
> 
> > Evenetually I want to update this fail to only XFAIL on gcc2.x + stabs
> > (and maybe early 3.x + stabs), since gcc 3.0.4 + stabs and later get
> > the consts correct.  That's for another day.  Checked in, obvious.
> 
> It's fine with me to ignore gcc 3.0.X and even gcc 3.1.X.  My position
> is that gdb can require that anyone using a gcc 3.X to have gcc 3.2
> or later (that is, two stable releases back).  I can see relaxing this
> to gcc 3.1, but if we start supporting gcc 3.0.X, that's a lot of
> work for minimal benefit.
> 
> It's easy to tell gcc v2 from gcc v3 in local_compiler_xfail_check.
> The gcc_compiled variable is not just a boolean.  It's the major
> version number of gcc.  So I think this one-liner would do it:
> 
>   - if {$gcc_compiled} then {
>   + if {$gcc_compiled == 2} then {

Michael is, of course, right.  I kept three of the existing xfails for
problems in GCC 3.3's output (after verifying that the compiler's
output was indeed bogus), and whacked away most the others.

Applying HEAD only; I'm still cleaning my todo list, so I took care of
this, but I hardly think it matters for GDB 6.0.  If someone works on
stabs test results on the branch feel free to move it.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-06-29  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.base/constvars.exp: Remove most xfails for GCC 3.x.
	* gdb.base/volatile.exp: Likewise.

Index: gdb.base/constvars.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/constvars.exp,v
retrieving revision 1.9
diff -u -p -r1.9 constvars.exp
--- gdb.base/constvars.exp	14 Jan 2003 17:36:49 -0000	1.9
+++ gdb.base/constvars.exp	29 Jun 2003 19:59:43 -0000
@@ -84,7 +84,7 @@ get_debug_format
 proc local_compiler_xfail_check { } {
     global gcc_compiled;
 
-    if {$gcc_compiled} then {
+    if {$gcc_compiled == 2} then {
 	if { ![test_debug_format "HP"] \
 		&& ![test_debug_format "DWARF 2"] } then {
 	    setup_xfail "*-*-*" 
@@ -128,6 +128,10 @@ send_gdb "break marker1\n" ; gdb_expect 
 # test function parameters
 
 local_compiler_xfail_check
+if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+    # With stabs, even GCC 3 does not get the const char arguments correct.
+    setup_xfail "*-*-*"
+}
 send_gdb "ptype qux1\n"
 gdb_expect {
     -re "type = int \\(const char, const char, const char \\*, char \\* const\\).*$gdb_prompt $" {
@@ -140,6 +144,8 @@ gdb_expect {
 # test vars and pointers
 
 proc do_constvar_tests {} {
+    global gcc_compiled
+
     gdb_test "print lave" " = 66 'B'"
     gdb_test "ptype lave" "type = char"
     gdb_test "print lavish" " = 10 '\\\\n'"
@@ -279,6 +285,11 @@ proc do_constvar_tests {} {
     gdb_test "ptype locust" "type = double \\* const"
 
     local_compiler_xfail_check
+    if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+	# With stabs, even GCC 3 does not get the constant structure member
+	# correct.
+	setup_xfail "*-*-*"
+    }
     gdb_test "ptype crass" "type = struct crass \{\[\r\n\]+\[\ \t\]+char \\* const ptr;\[\r\n\]+\}"
     local_compiler_xfail_check
     gdb_test "ptype crisp" "type = struct crisp \{\[\r\n\]+\[\ \t\]+char \\* const \\*ptr;\[\r\n\]+\}"
Index: gdb.base/volatile.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/volatile.exp,v
retrieving revision 1.5
diff -u -p -r1.5 volatile.exp
--- gdb.base/volatile.exp	19 Dec 2001 21:08:45 -0000	1.5
+++ gdb.base/volatile.exp	29 Jun 2003 19:59:43 -0000
@@ -1,4 +1,4 @@
-#   Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+#   Copyright 1997, 1998, 1999, 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
@@ -90,7 +90,7 @@ get_debug_format
 proc local_compiler_xfail_check { } {
     global gcc_compiled;
 
-    if {$gcc_compiled} then {
+    if {$gcc_compiled == 2} then {
 	if { ![test_debug_format "HP"] \
 		&& ![test_debug_format "DWARF 2"] } then {
 	    setup_xfail "*-*-*" 
@@ -258,6 +258,11 @@ gdb_test "ptype vendor" "type = const vo
 
 # test function parameters
 local_compiler_xfail_check
+if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+    # For reasons unknown, GCC 3 with stabs mangles several cv-qualified
+    # arguments to this function.
+    setup_xfail "*-*-*"
+}
 send_gdb "ptype qux2\n"
 gdb_expect {
     -re "type = int \\(volatile unsigned char, const volatile int, volatile short( int)?, volatile long( int)? \\*, float \\* volatile, const volatile signed char \\* const volatile\\).*$gdb_prompt $" {



More information about the Gdb-patches mailing list