public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Gabriel Krisman Bertazi <gabriel@krisman.be>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix gdb.fortran/array-element.exp failures.
Date: Fri, 04 Jul 2014 15:35:00 -0000	[thread overview]
Message-ID: <m3iondcf2h.fsf@redhat.com> (raw)
In-Reply-To: <1404453487-20108-1-git-send-email-gabriel@krisman.be> (Gabriel	Krisman Bertazi's message of "Fri, 4 Jul 2014 02:58:07 -0300")

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/

  reply	other threads:[~2014-07-04 15:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04  5:58 Gabriel Krisman Bertazi
2014-07-04 15:35 ` Sergio Durigan Junior [this message]
2014-07-04 23:20   ` Gabriel Krisman Bertazi
2014-07-05 12:14     ` Sergio Durigan Junior
2014-07-05 17:17       ` Gabriel Krisman Bertazi
2014-07-06 19:03         ` Sergio Durigan Junior
2014-07-14 23:28           ` Gabriel Krisman Bertazi
2014-08-17  4:07             ` Gabriel Krisman Bertazi
2014-08-26  0:30               ` [PING] " Gabriel Krisman Bertazi
2014-09-04 19:31                 ` Gabriel Krisman Bertazi
2014-09-09 13:09                 ` Joel Brobecker
2014-09-09 14:55                   ` Gabriel Krisman Bertazi
2014-09-09 15:45                     ` Joel Brobecker
2014-09-09 18:17                       ` Gabriel Krisman Bertazi
2014-09-10 12:50                         ` Joel Brobecker
2014-09-10 16:11                           ` Sergio Durigan Junior
2014-09-11  3:25                           ` Gabriel Krisman Bertazi
2014-09-09 15:08                   ` Sergio Durigan Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3iondcf2h.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=gabriel@krisman.be \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).