This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] testsuite: store.exp: Cope with unrelated GCC PR debug/53948


Hi,

GCC PR debug/53948 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53948 is
completely unrelated to gdb.base/store.exp but it breaks it.

-Temporary breakpoint 2, wack_charest (u=-1 '\377', v=-2 '\376') at ./gdb.base/store.c:69^M
-69       register charest l = u, r = v;^M
-(gdb) PASS: gdb.base/store.exp: continue to wack_charest
-next^M
+Temporary breakpoint 2, wack_charest (u=-1 '\377', v=-2 '\376') at ./gdb.base/store.c:70^M
 70       l = add_charest (l, r);^M
-(gdb) PASS: gdb.base/store.exp: var charest l; next charest
+(gdb) FAIL: gdb.base/store.exp: continue to wack_charest

You can see FSF GCC HEAD no longer stops at the line 'register charest ...'
and the first function line where it stops is 'l = add_charest ...'

I am not sure if GCC is going to fix it, it is a very minor issue.

I find only a question whether there should be new PASS or XFAIL testcase in
GDB.  As no GDB feature depends on this feature I believe the test
of GCC PR debug/53948 belongs only to the GCC testsuite.


Thanks,
Jan


gdb/testsuite/
2012-07-16  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.base/store.exp (check_set): Import gdb_prompt.
	(continue to wack_${t}): Make it to conditional gdb_test_multiple.
	(${prefix}; next ${t}): Hide its name, handle it conditionally now.

diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp
index 851d134..913c705 100644
--- a/gdb/testsuite/gdb.base/store.exp
+++ b/gdb/testsuite/gdb.base/store.exp
@@ -48,12 +48,23 @@ if ![runto_main] then {
 #
 
 proc check_set { t l r new add } {
+    global gdb_prompt
+
     set prefix "var ${t} l"
     gdb_test "tbreak wack_${t}"
-    gdb_test "continue" "register ${t} l = u, r = v;" \
-	"continue to wack_${t}"
-    gdb_test "next" "l = add_${t} .l, r.;" \
-	"${prefix}; next ${t}"
+
+    set test "continue to wack_${t}"
+    gdb_test_multiple "continue" $test {
+	-re "register ${t} l = u, r = v;\r\n$gdb_prompt $" {
+	    # See GCC PR debug/53948.
+	    send_gdb "next\n"
+	    exp_continue
+	}
+	-re "l = add_${t} .l, r.;\r\n$gdb_prompt $" {
+	    pass $test
+	}
+    }
+
     gdb_test "print l" " = ${l}" \
 	"${prefix}; print old l, expecting ${l}"
     gdb_test "print r" " = ${r}" \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]