From: Michael Chastain Date: Thu, 23 Sep 2004 18:18:58 +0000 (+0000) Subject: 2004-09-23 Michael Chastain X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=190e2f916b9658702ad050cffae35f287bb6753e;p=pf3gnuchains%2Fpf3gnuchains3x.git 2004-09-23 Michael Chastain * 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. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 73d79a94c6..cdb8af76c2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2004-09-23 Michael Chastain + + * 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. + 2004-09-20 Jeff Johnston * gdb.java/jprint.exp: New test case for java inferior call. diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp index 68732867d5..25f7434e53 100644 --- a/gdb/testsuite/gdb.base/constvars.exp +++ b/gdb/testsuite/gdb.base/constvars.exp @@ -15,9 +15,6 @@ # 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 @@ -68,6 +65,9 @@ if ![runto_main] then { 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"] \ @@ -82,6 +82,16 @@ proc local_compiler_xfail_check { } { } } +# 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" @@ -118,10 +128,8 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $" # 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 "*-*-*" -} +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 $" { @@ -273,11 +281,7 @@ proc do_constvar_tests {} { 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 "*-*-*" - } + 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\]+\}" diff --git a/gdb/testsuite/gdb.base/volatile.exp b/gdb/testsuite/gdb.base/volatile.exp index c12e3d88ea..b6623f8ce9 100644 --- a/gdb/testsuite/gdb.base/volatile.exp +++ b/gdb/testsuite/gdb.base/volatile.exp @@ -14,9 +14,6 @@ # 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 1997-07-07 # In the spirit of constvars.exp: added volatile, const-volatile stuff. @@ -74,6 +71,9 @@ if ![runto_main] then { 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"] \ @@ -88,6 +88,16 @@ proc local_compiler_xfail_check { } { } } +# 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" @@ -248,11 +258,7 @@ gdb_test "ptype vendor" "type = const volatile unsigned char \\* const volatile. # 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 "*-*-*" -} +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 $" {