From: Tom de Vries <tdevries@suse.de>
To: Carl Love <cel@us.ibm.com>,
gdb-patches@sourceware.org,
Will Schmidt <will_schmidt@vnet.ibm.com>,
Rogerio Alves <rogealve@br.ibm.com>
Subject: Re: [PATCH] Fix for the gdb.base/sigstep.exp test.
Date: Fri, 12 Nov 2021 18:15:45 +0100 [thread overview]
Message-ID: <322b39d3-ba27-66f5-bcf4-8f876ce0fda3@suse.de> (raw)
In-Reply-To: <162c8301e0faa032ae13e2c2b89d91858e71e3ab.camel@us.ibm.com>
On 11/12/21 5:52 PM, Carl Love wrote:
> Tom:
>
> I updated the commit log as suggested and removed the unused variable
> set from the patch. The patch has been retested on PowerPC and X86.
>
> I beleve I have fixed all of your comments on the patch. Thank you for
> your feedback and input to improve the patch.
>
> Please let me know if this is now acceptable for committing to
> mainline.
>
Ok for committing to mainline, thanks for working on this. I'm looking
forward to seeing the FAIL count drop yet further :)
Thanks,
- Tom
> Carl
>
> -----------------------------------------------------------------
>
> Fix gdb.base/sigstep.exp test for ppc
>
> The test stops at <signal_handler called> which is the call to the handler
> rather than in the handler as intended. This patch replaces the
> gdb_test "$enter_cmd to handler" with a gdb_test_multiple test. The multiple
> test looks for the stop at <signal_handler called>. If found, the command
> is issued again. The test passes if gdb stops in the handler as expected.
>
>
> (gdb) PASS: gdb.base/sigstep.exp: stepi to handler, nothing in handler, step
> from handler: continue to signal
> stepi
> <signal handler called>
> 1: x/i $pc
> => 0x7ffff7f80440 <__kernel_start_sigtramp_rt64>: bctrl
> (gdb) stepi
> handler (sig=551) at sigstep.c:32
> 32 {
> 1: x/i $pc
> => 0x10000097c <handler>: addis r2,r12,2
> (gdb) PASS: gdb.base/sigstep.exp: stepi to handler, nothing in handler,
> step from handler: stepi to handler
>
> Patch has been tested on x86_64-linux and ppc64le-linux with no test failures.
>
> ---
> gdb/testsuite/gdb.base/sigstep.exp | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp
> index ea254af5297..176918b67d6 100644
> --- a/gdb/testsuite/gdb.base/sigstep.exp
> +++ b/gdb/testsuite/gdb.base/sigstep.exp
> @@ -79,6 +79,7 @@ validate_backtrace
> proc advance { enter_cmd in_handler_prefix in_handler exit_cmd } {
> global gdb_prompt inferior_exited_re
> global clear_done other_handler_location
> + global decimal
>
> set prefix "$enter_cmd to handler, $in_handler_prefix in handler, $exit_cmd from handler"
>
> @@ -93,7 +94,16 @@ proc advance { enter_cmd in_handler_prefix in_handler exit_cmd } {
> gdb_test "handle SIGVTALRM print pass stop"
> gdb_test "continue" "Program received signal.*" "continue to signal"
> }
> - gdb_test "$enter_cmd" ".*handler .*" "$enter_cmd to handler"
> +
> + gdb_test_multiple "$enter_cmd" "$enter_cmd to handler" {
> + -re -wrap "\r\n<signal handler called>.*" {
> + send_gdb "$enter_cmd\n"
> + exp_continue
> + }
> + -re -wrap "\r\n(Breakpoint $decimal, )?handler \\(sig=.*" {
> + pass $gdb_test_name
> + }
> + }
>
> delete_breakpoints
>
>
prev parent reply other threads:[~2021-11-12 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 18:26 Carl Love
2021-11-10 23:17 ` Tom de Vries
2021-11-12 0:28 ` Carl Love
2021-11-12 8:08 ` Tom de Vries
2021-11-12 16:52 ` Carl Love
2021-11-12 17:15 ` Tom de Vries [this message]
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=322b39d3-ba27-66f5-bcf4-8f876ce0fda3@suse.de \
--to=tdevries@suse.de \
--cc=cel@us.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=rogealve@br.ibm.com \
--cc=will_schmidt@vnet.ibm.com \
/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).