Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] testsuite: inline-cmds.exp: adjust checks with 'finish' command
Date: Sat, 30 Apr 2011 14:54:00 -0000	[thread overview]
Message-ID: <20110430145414.GA8989@host1.jankratochvil.net> (raw)
In-Reply-To: <4DB7BAEF.3070303@linux.vnet.ibm.com>

On Wed, 27 Apr 2011 08:42:55 +0200, Edjunior Barbosa Machado wrote:
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I could not apply the patch to test it as it is corrupted, both if taken as
raw and if taken as flowed-decoded (at least according to the Mutt decoding).

I am fine with "Content-Disposition: inline" text/plain attachment otherwise
(but not everyone is fine with it here).


> --- a/gdb/testsuite/ChangeLog
> +++ b/gdb/testsuite/ChangeLog
> @@ -1,3 +1,8 @@
> +2011-04-27  Edjunior Machado  <emachado@linux.vnet.ibm.com>
> +
> +	* gdb.opt/inline-cmds.exp: Adjust checks with "finish" command to
> +	accept to show the caller line again as well as the line after.
> +
>  2011-04-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
>  	* gdb.base/gdbindex-stabs-dwarf.c: New file.

It is more convenient to provide ChangeLog entry as text - not as diff - as it
is out of sync now.


> diff --git a/gdb/testsuite/gdb.opt/inline-cmds.exp b/gdb/testsuite/gdb.opt/inline-cmds.exp
> index cde86f5..cbf3160 100644
> --- a/gdb/testsuite/gdb.opt/inline-cmds.exp
> +++ b/gdb/testsuite/gdb.opt/inline-cmds.exp
> @@ -263,7 +263,20 @@ gdb_continue_to_breakpoint "finish into func1"
>  gdb_test "next" ".*marker \\\(\\\);" "next to finish marker"
>  gdb_test "step" ".*set breakpoint 2 here.*" "step into finish marker"
> -gdb_test "finish" "func1 \\\(\\\);" "finish from marker to func1"
> +
> +# Some architectures will have one or more instructions after
> +# the call instruction which still are part of the call sequence,
> +# so it should be expected to return to the caller line after issue
> +# a 'finish' command.
> +gdb_test_multiple "finish" "finish from marker" {
> +    -re "func1 \\\(\\\);.*" {

Missing prompt (it is assumed by gdb_test but not by gdb_test_multiple):
       -re "func1 \\\(\\\);.*\r\n$gdb_prompt $" {

> +        pass "finish from marker to func1"
> +    }
> +    -re "marker \\\(\\\);.*" {

Missing prompt.

> +        pass "finish from marker"
> +        gdb_test "step" "func1 \\\(\\\);.*" "step after marker to reach func1"

Here should be <tab> used for the indentation but that may have been corrupted
by your MUA.


> +    }
> +}
>  gdb_test "step" "bar \\\(\\\);" "step into func1 for finish"
>  gdb_test "finish" "func3 \\\(\\\);" "finish from func1 to func3"
> @@ -273,7 +286,15 @@ set line6 [gdb_get_line_number "set breakpoint 6 here"]
>  gdb_breakpoint $line6
>  gdb_continue_to_breakpoint "before the outer_inline call"
>  gdb_test "step" "marker \\\(\\\) at .*" "reach 1 the outer_inline call"
> -gdb_test "finish" "main \\\(\\\) at .*outer_inline2 \\\(\\\);" "reach outer_inline2"
> +gdb_test_multiple "finish" "finish from marker" {
> +    -re "main \\\(\\\) at .*outer_inline2 \\\(\\\);.*" {

The same prompt issue as above.

> +        pass "reach outer_inline2"
> +    }
> +    -re "main \\\(\\\) at .*marker \\\(\\\);.*" {

The same prompt issue as above.

> +        pass "finish from marker"
> +        gdb_test "step" "outer_inline2 \\\(\\\);.*" "step after marker to reach outer_inline2"

{"outer_inline2 \(\);.*}  would be the same but sure your choice.

> +    }
> +}


Otherwise it would be best if "finish" always stays on the caller line, even
if no instruction is present there.  But that is sure outside of the scope of
this testcase fix.


Thanks,
Jan


  reply	other threads:[~2011-04-30 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27  6:43 Edjunior Barbosa Machado
2011-04-30 14:54 ` Jan Kratochvil [this message]
2011-05-02 14:36   ` Edjunior Barbosa Machado
2011-05-02 15:16     ` Jan Kratochvil
2011-05-02 17:11       ` Edjunior Barbosa Machado

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=20110430145414.GA8989@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=emachado@linux.vnet.ibm.com \
    --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