This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/testsuite] accept gcc-4-* for some setup_xfail
- From: Michael Chastain <mec dot gnu at mindspring dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 23 Sep 2004 14:18:31 -0400
- Subject: [patch/testsuite] accept gcc-4-* for some setup_xfail
gcc HEAD recently changed its version number from 3.5.0 to 4.0.0.
There are three tests that check for "gcc-3-*" to check for
setup_xfail. This is just a band-aid patch to add "gcc-4-*"
to that test. The xfail's are still incomplete because there
is no gcc PR for them.
I tested this on:
native i686-pc-linux-gnu
gcc 2.95.3, 3.3.4, 3.4.2, HEAD%20040922
dwarf-2, stabs+
I am committing this now.
===
2004-09-23 Michael Chastain <mec.gnu@mindspring.com>
* gdb.base/constvars.exp (local_compiler_xfail_check_2):
New proc. Accept both gcc 3.x.x and gcc 4.x.x.
* gdb.base/volatile.exp (local_compiler_xfail_check_2):
Likewise.
Index: gdb.base/constvars.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/constvars.exp,v
retrieving revision 1.12
diff -c -3 -p -r1.12 constvars.exp
*** gdb.base/constvars.exp 7 Jan 2004 22:44:54 -0000 1.12
--- gdb.base/constvars.exp 23 Sep 2004 18:11:07 -0000
***************
*** 15,23 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# written by Elena Zannoni (elz@apollo.hp.com)
#
# This file is part of the gdb testsuite
--- 15,20 ----
*************** if ![runto_main] then {
*** 68,73 ****
--- 65,73 ----
get_debug_format
+ # Many tests xfail with gcc 2 -gstabs+.
+ # TODO: check out the hp side of this.
+
proc local_compiler_xfail_check { } {
if { [test_compiler_info gcc-2-*] } then {
if { ![test_debug_format "HP"] \
*************** proc local_compiler_xfail_check { } {
*** 82,87 ****
--- 82,97 ----
}
}
+ # A few tests still xfail with gcc 3 -gstabs+ and gcc 4 -gstabs+.
+
+ proc local_compiler_xfail_check_2 { } {
+ if { [test_compiler_info gcc-3-*] || [test_compiler_info gcc-4-*] } {
+ if { [test_debug_format "stabs" ] } {
+ setup_xfail "*-*-*"
+ }
+ }
+ }
+
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
send_gdb "cont\n"
*************** send_gdb "break marker1\n" ; gdb_expect
*** 118,127 ****
# test function parameters
local_compiler_xfail_check
! if { [test_compiler_info gcc-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 $" {
--- 128,135 ----
# test function parameters
local_compiler_xfail_check
! local_compiler_xfail_check_2
!
send_gdb "ptype qux1\n"
gdb_expect {
-re "type = int \\(const char, const char, const char \\*, char \\* const\\).*$gdb_prompt $" {
*************** proc do_constvar_tests {} {
*** 273,283 ****
gdb_test "ptype locust" "type = double \\* const"
local_compiler_xfail_check
! if { [test_compiler_info gcc-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\]+\}"
--- 281,287 ----
gdb_test "ptype locust" "type = double \\* const"
local_compiler_xfail_check
! local_compiler_xfail_check_2
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.9
diff -c -3 -p -r1.9 volatile.exp
*** gdb.base/volatile.exp 7 Jan 2004 22:44:54 -0000 1.9
--- gdb.base/volatile.exp 23 Sep 2004 18:11:07 -0000
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Written by Satish Pai <pai@apollo.hp.com> 1997-07-07
# In the spirit of constvars.exp: added volatile, const-volatile stuff.
--- 14,19 ----
*************** if ![runto_main] then {
*** 74,79 ****
--- 71,79 ----
get_debug_format
+ # Many tests xfail with gcc 2 -gstabs+.
+ # TODO: check out the hp side of this.
+
proc local_compiler_xfail_check { } {
if { [test_compiler_info gcc-2-*] } then {
if { ![test_debug_format "HP"] \
*************** proc local_compiler_xfail_check { } {
*** 88,93 ****
--- 88,103 ----
}
}
+ # A few tests still xfail with gcc 3 -gstabs+ and gcc 4 -gstabs+.
+
+ proc local_compiler_xfail_check_2 { } {
+ if { [test_compiler_info gcc-3-*] || [test_compiler_info gcc-4-*] } {
+ if { [test_debug_format "stabs" ] } {
+ setup_xfail "*-*-*"
+ }
+ }
+ }
+
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
send_gdb "cont\n"
*************** gdb_test "ptype vendor" "type = const vo
*** 248,258 ****
# test function parameters
local_compiler_xfail_check
! if { [test_compiler_info gcc-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 $" {
--- 258,264 ----
# test function parameters
local_compiler_xfail_check
! local_compiler_xfail_check_2
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 $" {