From: Yao Qi <qiyaoltc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: John Baldwin <jhb@freebsd.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Fix PR gdb/18653: gdb disturbs inferior's inherited signal dispositions
Date: Fri, 12 Aug 2016 08:21:00 -0000 [thread overview]
Message-ID: <86inv6cs8o.fsf@gmail.com> (raw)
In-Reply-To: <86d1ddee-9841-d332-27d5-15c8c185063e@redhat.com> (Pedro Alves's message of "Fri, 5 Aug 2016 11:56:56 +0100")
Pedro Alves <palves@redhat.com> writes:
> + else
> + {
> + int m;
> +
> + fprintf (out, "sigaction={sa_handler=", i);
The redundant "i" causes a compilation warning,
gdb/testsuite/gdb.base/signals-state-child.c:77:4: warning: too many arguments for format [-Wformat-extra-args]
fprintf (out, "sigaction={sa_handler=", i);
^
The patch blow fixes this. With this patch applied, the test case can
be compiled successfully. However test fails,
shell diff -s /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/outputs/gdb.base/signals-state-child/standalone.txt /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/outputs/gdb.base/signals-state-child/gdb.txt^M
13c13^M
< signal 13: sigaction={sa_handler=SIG_DFL, sa_mask=0000000000000000000000000000000000000000000000000000000000000000, sa_flags=0}, masked=0^M
---^M
> signal 13: sigaction={sa_handler=SIG_IGN, sa_mask=0000000000000000000000000000000000000000000000000000000000000000, sa_flags=0}, masked=0^M
25c25^M
< signal 25: sigaction={sa_handler=SIG_DFL, sa_mask=0000000000000000000000000000000000000000000000000000000000000000, sa_flags=0}, masked=0^M
---^M
> signal 25: sigaction={sa_handler=SIG_IGN, sa_mask=0000000000000000000000000000000000000000000000000000000000000000, sa_flags=0}, masked=0^M
(gdb) FAIL: gdb.base/signals-state-child.exp: signals states are identical
--
Yao (齐尧)
From e1a1f81d96575dfda32022c599652cefae762798 Mon Sep 17 00:00:00 2001
From: Yao Qi <yao.qi@linaro.org>
Date: Fri, 12 Aug 2016 09:08:44 +0100
Subject: [PATCH] Fix warning in gdb.base/signals-state-child.c
I see the following warning when running signals-state-child.exp.
gdb/testsuite/gdb.base/signals-state-child.c:77:4: warning: too many arguments for format [-Wformat-extra-args]
fprintf (out, "sigaction={sa_handler=", i);
^
this patch is to remove the argument from fprintf.
gdb/testsuite:
2016-08-12 Yao Qi <yao.qi@linaro.org>
* gdb.base/signals-state-child.c (main): Remove "i" from fprintf's
argument list.
diff --git a/gdb/testsuite/gdb.base/signals-state-child.c b/gdb/testsuite/gdb.base/signals-state-child.c
index e11fa93..f934c86 100644
--- a/gdb/testsuite/gdb.base/signals-state-child.c
+++ b/gdb/testsuite/gdb.base/signals-state-child.c
@@ -74,7 +74,7 @@ main (int argc, char **argv)
{
int m;
- fprintf (out, "sigaction={sa_handler=", i);
+ fprintf (out, "sigaction={sa_handler=");
if (oldact.sa_handler == SIG_DFL)
fprintf (out, "SIG_DFL");
next prev parent reply other threads:[~2016-08-12 8:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 17:37 [PATCH] " Pedro Alves
2016-08-05 0:08 ` John Baldwin
2016-08-05 1:04 ` Pedro Alves
2016-08-05 10:57 ` [PATCH v2] " Pedro Alves
2016-08-08 17:28 ` John Baldwin
2016-08-12 8:21 ` Yao Qi [this message]
2016-08-12 9:08 ` Pedro Alves
2016-08-22 14:28 ` Yao Qi
2016-08-22 14:34 ` Pedro Alves
2016-08-23 13:20 ` Yao Qi
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=86inv6cs8o.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
--cc=palves@redhat.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