This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V2] icc: allow code path for newer versions of icc.
- From: Pedro Alves <palves at redhat dot com>
- To: Walfred Tedeschi <walfred dot tedeschi at intel dot com>, simon dot marchi at polymtl dot ca
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 22 Sep 2017 16:18:10 +0100
- Subject: Re: [PATCH V2] icc: allow code path for newer versions of icc.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 800317E44D
- References: <1506010792-19642-1-git-send-email-walfred.tedeschi@intel.com>
On 09/21/2017 05:19 PM, Walfred Tedeschi wrote:
>
> +
> +
> +
Spurious spaces.
> /* Check whether the producer field indicates either of GCC < 4.6, or the
> Intel C/C++ compiler, and cache the result in CU. */
>
> @@ -12853,8 +12869,8 @@ check_producer (struct dwarf2_cu *cu)
> cu->producer_is_gxx_lt_4_6 = major < 4 || (major == 4 && minor < 6);
> cu->producer_is_gcc_lt_4_3 = major < 4 || (major == 4 && minor < 3);
> }
> - else if (startswith (cu->producer, "Intel(R) C"))
> - cu->producer_is_icc = 1;
> + else if (producer_is_icc (cu->producer, &major, &minor))
> + cu->producer_is_icc_lt_14 = major < 14;
Bad formatting.
> --- a/gdb/producer.c
> +++ b/gdb/producer.c
> @@ -22,9 +22,15 @@
> #include "defs.h"
> #include "dyn-string.h"
> #include <ctype.h>
> +
> #include "common/common-types.h"
> #include "common/common-exceptions.h"
> #include "common/common-utils.h"
> +
> +#if defined GDB_SELF_TEST
> +#include "selftest.h"
> +#endif
> +
> #include "utils.h"
>
> /* See documentation in the producer.h file. */
> @@ -124,3 +130,80 @@ producer_is_icc (const char *producer, int *major, int *minor)
> }
> return FALSE;
> }
> +
> +#if defined GDB_SELF_TEST
> +namespace selftests {
> +namespace dwarf2utils {
Stale namespace name.
> +
> +static void
> +dwarf_producer ()
Stale function name.
> +
> +/* Provide a prototype to silence -Wmissing-prototypes. */
> +extern initialize_file_ftype _initialize_dwarf2utils;
John just removed these declarations throughout.
> +
> +void
> +_initialize_dwarf2utils (void)
Stale function name. "(void)" -> "()".
> +{
> +#if defined GDB_SELF_TEST
> + selftests::register_test ("dwarf-producer", selftests::dwarf2utils::dwarf_producer);
> +#endif
> +}
Thanks,
Pedro Alves