aboutsummaryrefslogtreecommitdiff
path: root/gdb/producer.h
diff options
context:
space:
mode:
authorWalfred Tedeschi <walfred.tedeschi@intel.com>2017-09-26 18:26:41 +0100
committerPedro Alves <palves@redhat.com>2017-09-26 18:32:00 +0100
commit5230b05a94b964da335a0758686b92a8efcc823d (patch)
tree04f3120f9304f303e353adec7e04d17a7b949d50 /gdb/producer.h
parentb32b108aba2c0119d0e231d203d3284539da2379 (diff)
downloadgdb-5230b05a94b964da335a0758686b92a8efcc823d.zip
gdb-5230b05a94b964da335a0758686b92a8efcc823d.tar.gz
gdb-5230b05a94b964da335a0758686b92a8efcc823d.tar.bz2
dwarf2read: Restrict ICC workaround to ICC<14
GDB has a workaround for DWARF output by ICC, related to missing DW_AT_declaration on incomplete types. The bug was fixed in ICC 14, so this commit adjusts GDB accordingly. For the version check, this adds a new parser function for the ICC producer string. While at it, it also adds unit tests for the producer parsing covering the new function and preexisting parsers. gdb/ChangeLog: 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com> Pedro Alves <palves@redhat.com> * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add producer_is_icc_lt_14. (producer_is_icc_lt_14): New function. (check_producer): Add code for checking version of ICC. (producer_is_icc): Move to producer.c. (read_structure_type): Restrict ICC workaround to ICC<14. * producer.c: Include selftest.h. (producer_is_icc, producer_parsing_tests, _initialize_producer): New functions. * producer.h (producer_is_icc): New declaration.
Diffstat (limited to 'gdb/producer.h')
-rw-r--r--gdb/producer.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/producer.h b/gdb/producer.h
index 143d4e1..3aac59d 100644
--- a/gdb/producer.h
+++ b/gdb/producer.h
@@ -30,4 +30,26 @@ extern int producer_is_gcc_ge_4 (const char *producer);
is NULL or it isn't GCC. */
extern int producer_is_gcc (const char *producer, int *major, int *minor);
+/* Returns true if the given PRODUCER string is Intel or false
+ otherwise. Sets the MAJOR and MINOR versions when not NULL.
+
+ Internal and external ICC versions have to be taken into account.
+ PRODUCER strings for internal releases are slightly different than
+ for public ones. Internal releases have a major release number and
+ 0 as minor release. External releases have 4 fields, 3 of them are
+ not 0 and only two are of interest, major and update.
+
+ Examples are:
+
+ Public release:
+ "Intel(R) Fortran Intel(R) 64 Compiler XE for applications
+ running on Intel(R) 64, Version 14.0.1.074 Build 20130716";
+ "Intel(R) C++ Intel(R) 64 Compiler XE for applications
+ running on Intel(R) 64, Version 14.0.1.074 Build 20130716";
+
+ Internal releases:
+ "Intel(R) C++ Intel(R) 64 Compiler for applications
+ running on Intel(R) 64, Version 18.0 Beta ....". */
+extern bool producer_is_icc (const char *producer, int *major, int *minor);
+
#endif