From: Pedro Alves <palves@redhat.com>
To: Walfred Tedeschi <walfred.tedeschi@intel.com>, qiyaoltc@gmail.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] icc: allow code path for newer versions of icc.
Date: Mon, 18 Sep 2017 15:34:00 -0000 [thread overview]
Message-ID: <59e18301-7b12-2e92-6277-0aef4164243e@redhat.com> (raw)
In-Reply-To: <1504687613-14649-1-git-send-email-walfred.tedeschi@intel.com>
Hi,
I read the patch and I found a few nits to pick.
See below.
On 09/06/2017 09:46 AM, Walfred Tedeschi wrote:
> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
> index 6678b33..4aa3b3e 100644
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -604,7 +604,7 @@ struct dwarf2_cu
> unsigned int checked_producer : 1;
...
>
> +#if defined GDB_SELF_TEST
> +#include "selftest.h"
> +
> +namespace selftests {
> +namespace gdbserver {
> +static void
> +dwarf_producer_test ()
Simon already pointed at the gdbserver namespace. I'd like
to add that it looks odd to me to define the actual
functionality in utils.c and define the corresponding self
tests in dwarf2read.c. Why not put the tests in utils.c as well?
BTW, I'd support moving all these producer checks to
a separate file (maybe producer.c), instead of putting
it all in the utils.c kitchen sync, though that's a
preexisting issue.
> + if (producer == NULL || !startswith (producer, "Intel(R)"))
> + return 0;
> +
> +/* Preparing the used fields. */
> + int maj, min;
Missing leading double-space in comment line.
> + if (major == NULL)
> + major = &maj;
> + if (minor == NULL)
> + minor = &min;
> + /* Not recognized as Intel, let user know. */
> + warning ("Intel producer: version not recognized.");
> + return 0;
> +}
If this ever triggers, won't the user get an annoying
flood of such warnings? If you hack your local copy to reach
the warning, what do you see?
I also wonder whether we should print a more-friend clearer
message, "intel producer" may mean nothing to a user, and I'm
not sure what they could do with that. Maybe at least print
the actual version string?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-09-18 15:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 8:47 Walfred Tedeschi
2017-09-06 8:47 ` [PATCH] symlookup: improves symbol lookup when a file is specified Walfred Tedeschi
2017-09-20 15:22 ` [ping][PATCH] " Tedeschi, Walfred
2017-10-09 7:35 ` Tedeschi, Walfred
2017-10-09 12:42 ` [PATCH] " Pedro Alves
2017-10-09 14:06 ` Tedeschi, Walfred
2017-09-06 8:47 ` [PATCH] gdb - avx512: tests were failing due to missing memory aligment Walfred Tedeschi
2017-09-16 13:57 ` Simon Marchi
2017-09-17 20:22 ` Yao Qi
2017-09-18 14:18 ` Tedeschi, Walfred
2017-09-20 13:39 ` [pushed] " Tedeschi, Walfred
2017-09-16 13:49 ` [PATCH] icc: allow code path for newer versions of icc Simon Marchi
2017-09-18 14:17 ` Tedeschi, Walfred
2017-09-18 15:34 ` Pedro Alves [this message]
2017-09-18 16:24 ` Simon Marchi
2017-09-18 16:34 ` Tedeschi, Walfred
2017-09-18 19:13 ` Simon Marchi
2017-09-20 15:19 ` Tedeschi, Walfred
2017-09-20 15:45 ` Pedro Alves
2017-09-20 15:55 ` Tedeschi, Walfred
2017-09-21 11:27 ` Tedeschi, Walfred
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=59e18301-7b12-2e92-6277-0aef4164243e@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
--cc=walfred.tedeschi@intel.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