[PATCH V2] icc: allow code path for newer versions of icc.
Tedeschi, Walfred
walfred.tedeschi@intel.com
Mon Sep 25 14:54:00 GMT 2017
On 09/22/2017 05:18 PM, Pedro Alves wrote:
> 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
Hello Pedro,
Thanks for your comments!
I have tried to address all of them.
Best regards,
/Fred
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list