This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
anon-union.exp stabs debug problem
- From: Randolph Chung <randolph at tausq dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 25 Feb 2006 19:12:20 +0800
- Subject: anon-union.exp stabs debug problem
I had this patch lying around in my tree, dunno if others find it useful
- should I commit it?
randolph
2006-02-25 Randolph Chung <tausq@debian.org>
* gdb.cp/anon-union.exp: XFAIL tests that hit a gcc bug.
Index: testsuite/gdb.cp/anon-union.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/anon-union.exp,v
retrieving revision 1.2
diff -u -p -r1.2 anon-union.exp
--- testsuite/gdb.cp/anon-union.exp 11 Feb 2004 14:01:25 -0000 1.2
+++ testsuite/gdb.cp/anon-union.exp 24 Feb 2006 23:57:32 -0000
@@ -41,18 +41,23 @@ if { [gdb_compile "${srcdir}/${subdir}/
continue
}
+if [get_compiler_info ${binfile} "c++"] {
+ return -1
+}
+
# Start with a fresh gdb
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-
if ![runto_main] then {
perror "couldn't run to breakpoint"
continue
}
+get_debug_format
+
send_gdb "set width 0\n"
gdb_expect -re "$gdb_prompt $"
@@ -267,6 +272,9 @@ gdb_expect {
# Tests for anon unions that are not members of a class or struct
+if { [test_compiler_info gcc-3-4-*] && [test_debug_format "stabs"] } {
+ setup_xfail *-*-* gcc/20998
+}
send_gdb "print w\n"
gdb_expect {
-re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" {
@@ -276,6 +284,9 @@ gdb_expect {
timeout { fail "(timeout) print w 1" }
}
+if { [test_compiler_info gcc-3-4-*] && [test_debug_format "stabs"] } {
+ setup_xfail *-*-* gcc/20998
+}
send_gdb "print z\n"
gdb_expect {
-re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" {
@@ -296,6 +307,9 @@ gdb_expect {
}
# See if the change in value is noticed
+if { [test_compiler_info gcc-3-4-*] && [test_debug_format "stabs"] } {
+ setup_xfail *-*-* gcc/20998
+}
send_gdb "print w\n"
gdb_expect {
-re "\\$\[0-9\]* = 45\r\n$gdb_prompt $" {
@@ -306,6 +320,9 @@ gdb_expect {
}
# See if z shows the same value
+if { [test_compiler_info gcc-3-4-*] && [test_debug_format "stabs"] } {
+ setup_xfail *-*-* gcc/20998
+}
send_gdb "print z\n"
gdb_expect {
-re "\\$\[0-9\]* = 45\r\n$gdb_prompt $" {
@@ -325,6 +342,9 @@ gdb_expect {
}
# See if the change in value is noticed
+if { [test_compiler_info gcc-3-4-*] && [test_debug_format "stabs"] } {
+ setup_xfail *-*-* gcc/20998
+}
send_gdb "print w\n"
gdb_expect {
-re "\\$\[0-9\]* = 27\r\n$gdb_prompt $" {
@@ -335,6 +355,9 @@ gdb_expect {
}
# See if z shows the same value
+if { [test_compiler_info gcc-3-4-*] && [test_debug_format "stabs"] } {
+ setup_xfail *-*-* gcc/20998
+}
send_gdb "print z\n"
gdb_expect {
-re "\\$\[0-9\]* = 27\r\n$gdb_prompt $" {