This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PING] [PATCH] Fix gdb.fortran/array-element.exp failures.
- From: Gabriel Krisman Bertazi <gabriel at krisman dot be>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 09 Sep 2014 11:55:46 -0300
- Subject: Re: [PING] [PATCH] Fix gdb.fortran/array-element.exp failures.
- Authentication-results: sourceware.org; auth=none
- References: <1404453487-20108-1-git-send-email-gabriel at krisman dot be> <m3iondcf2h dot fsf at redhat dot com> <87zjgobth0 dot fsf at Argo dot krisman dot be> <m3pphk9f53 dot fsf at redhat dot com> <8761jbbu6l dot fsf at Argo dot krisman dot be> <m3bnt28g3s dot fsf at redhat dot com> <87lhrv36pm dot fsf at Argo dot krisman dot be> <87zjf3sqrd dot fsf at krisman dot be> <87r4048546 dot fsf_-_ at krisman dot be> <20140909130901 dot GG28404 at adacore dot com>
Joel,
> To help us out, it's useful to show what the patch does in practice.
> In this case, I'd like to do what's not working before the patch
> gets applied, and how things change once your patch is applied.
> GDB transcripts before and after usually help with that.
Sorry I didn't resend the original message with my pings. Here it goes.
This fixes two FAIL results when running this test file due to a
misplaced "continue" command, which caused the inferior to end execution
prematurely.
On trunk, we have:
FAIL: gdb.fortran/array-element.exp: continue to breakpoint once again
(the program exited)
FAIL: gdb.fortran/array-element.exp: print the second element of array a
=== gdb Summary ===
# of expected passes 3
# of unexpected failures 2
And now, we get:
=== gdb Summary ===
# of expected passes 3
Is this ok?
2014-07-04 Gabriel Krisman Bertazi <gabriel@krisman.be>
* gdb.fortran/array-element.exp: Remove wrong "continue"
command. Simplify test case.
diff --git a/gdb/testsuite/gdb.fortran/array-element.exp b/gdb/testsuite/gdb.fortran/array-element.exp
index 579db03..1ac3623 100644
--- a/gdb/testsuite/gdb.fortran/array-element.exp
+++ b/gdb/testsuite/gdb.fortran/array-element.exp
@@ -31,18 +31,9 @@ if ![runto sub_] then {
continue
}
-set bp_location [gdb_get_line_number "continue"]
-gdb_test "break $bp_location" \
- "Breakpoint.*at.* file .*$srcfile, line $bp_location\\." \
- "breakpoint at continue"
-
-gdb_test "continue" \
- "Continuing\\..*Breakpoint.*" \
- "continue to breakpoint"
-gdb_test "print a(1)" ".*1 = 1.*" "print the first element of array a"
+gdb_breakpoint [gdb_get_line_number "continue"]
+gdb_continue_to_breakpoint "continue"
-gdb_test "continue" \
- "Continuing\\..*Breakpoint.*" \
- "continue to breakpoint once again"
+gdb_test "print a(1)" ".*1 = 1.*" "print the first element of array a"
gdb_test "print a(2)" ".*2 = 2.*" "print the second element of array a"
--
Gabriel Krisman Bertazi