This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix gdb.fortran/array-element.exp failures.
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Gabriel Krisman Bertazi <gabriel at krisman dot be>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 04 Jul 2014 12:35:18 -0300
- Subject: Re: [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>
On Friday, July 04 2014, Gabriel Krisman Bertazi wrote:
> This fixes two FAIL results when running this test file due to a
> misplaced "continue" command, which caused the inferior to end execution
> prematurely.
Thanks, this is great :-).
> 2014-07-04 Gabriel Krisman Bertazi <gabriel@krisman.be>
>
> * gdb.fortran/array-element.exp: Remove wrong "continue" command
> that caused test to fail.
>
> ---
> gdb/testsuite/gdb.fortran/array-element.exp | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.fortran/array-element.exp b/gdb/testsuite/gdb.fortran/array-element.exp
> index 579db03..3c87790 100644
> --- a/gdb/testsuite/gdb.fortran/array-element.exp
> +++ b/gdb/testsuite/gdb.fortran/array-element.exp
> @@ -41,8 +41,5 @@ gdb_test "continue" \
> "continue to breakpoint"
> gdb_test "print a(1)" ".*1 = 1.*" "print the first element of array a"
>
> -gdb_test "continue" \
> - "Continuing\\..*Breakpoint.*" \
> - "continue to breakpoint once again"
> gdb_test "print a(2)" ".*2 = 2.*" "print the second element of array a"
I am not a Fortran expert, but after looking at the testcase it seems
this is the right fix indeed.
BTW, I recommend that this testcase be simplified. Instead of:
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_test "print a(2)" ".*2 = 2.*" "print the second element of array a"
It could be written as:
gdb_breakpoint [gdb_get_line_number "continue"]
gdb_continue_to_breakpoint "continue"
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"
Would you like to do that?
Otherwise, it looks good to me (this is not an approval).
Thanks,
--
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/