summaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-06-29 20:01:59 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-06-29 20:01:59 +0000
commit1a91fd633326dc16c4ec2c76dfdb9e51c436d192 (patch)
tree2400e1641bf708fe5f7d6518a15a645aae79d77b /gdb/testsuite
parentbaf4cd8e735c0d427c04134c75ca923b95a9e3da (diff)
downloadgdb-1a91fd633326dc16c4ec2c76dfdb9e51c436d192.tar.gz
* gdb.base/constvars.exp: Remove most xfails for GCC 3.x.
* gdb.base/volatile.exp: Likewise.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp13
-rw-r--r--gdb/testsuite/gdb.base/volatile.exp9
3 files changed, 24 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8b5cfd41e45..429139dff26 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2003-06-29 Daniel Jacobowitz <drow@mvista.com>
+ * gdb.base/constvars.exp: Remove most xfails for GCC 3.x.
+ * gdb.base/volatile.exp: Likewise.
+
+2003-06-29 Daniel Jacobowitz <drow@mvista.com>
+
* gdb.threads/print-threads.exp (test_all_threads): Add kfail for
gdb/1265.
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index d58b9b65847..8a6b60b3ed5 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -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 -re ".*$gdb_prompt $"
# 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\]+\}"
diff --git a/gdb/testsuite/gdb.base/volatile.exp b/gdb/testsuite/gdb.base/volatile.exp
index efb271b6ec0..704369605eb 100644
--- a/gdb/testsuite/gdb.base/volatile.exp
+++ b/gdb/testsuite/gdb.base/volatile.exp
@@ -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 volatile unsigned char \\* const volatile.
# 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 $" {