+2021-04-08 Felix Willgerodt <felix.willgerodt@intel.com>
+
+ * i386-tdep.c (i386_skip_prologue): Use symbol table to find the
+ prologue end for Intel compilers.
+ * amd64-tdep.c (amd64_skip_prologue): Likewise.
+ * producer.c (producer_is_icc_ge_19): New function.
+ * producer.h (producer_is_icc_ge_19): New declaration.
+
2021-04-08 Felix Willgerodt <felix.willgerodt@intel.com>
* producer.c: (producer_is_icc): Update for new version scheme.
struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr);
/* LLVM backend (Clang/Flang) always emits a line note before the
- prologue and another one after. We trust clang to emit usable
- line notes. */
+ prologue and another one after. We trust clang and newer Intel
+ compilers to emit usable line notes. */
if (post_prologue_pc
&& (cust != NULL
&& COMPUNIT_PRODUCER (cust) != NULL
- && producer_is_llvm (COMPUNIT_PRODUCER (cust))))
- return std::max (start_pc, post_prologue_pc);
+ && (producer_is_llvm (COMPUNIT_PRODUCER (cust))
+ || producer_is_icc_ge_19 (COMPUNIT_PRODUCER (cust)))))
+ return std::max (start_pc, post_prologue_pc);
}
amd64_init_frame_cache (&cache);
struct compunit_symtab *cust = find_pc_compunit_symtab (func_addr);
/* LLVM backend (Clang/Flang) always emits a line note before the
- prologue and another one after. We trust clang to emit usable
- line notes. */
+ prologue and another one after. We trust clang and newer Intel
+ compilers to emit usable line notes. */
if (post_prologue_pc
&& (cust != NULL
&& COMPUNIT_PRODUCER (cust) != NULL
- && producer_is_llvm (COMPUNIT_PRODUCER (cust))))
- return std::max (start_pc, post_prologue_pc);
+ && (producer_is_llvm (COMPUNIT_PRODUCER (cust))
+ || producer_is_icc_ge_19 (COMPUNIT_PRODUCER (cust)))))
+ return std::max (start_pc, post_prologue_pc);
}
cache.locals = -1;
return 0;
}
+/* See producer.h. */
+
+bool
+producer_is_icc_ge_19 (const char *producer)
+{
+ int major, minor;
+
+ if (! producer_is_icc (producer, &major, &minor))
+ return false;
+
+ return major >= 19;
+}
/* See producer.h. */
is NULL or it isn't GCC. */
extern int producer_is_gcc (const char *producer, int *major, int *minor);
+/* Check for Intel compilers >= 19.0. */
+extern bool producer_is_icc_ge_19 (const char *producer);
+
/* Returns true if the given PRODUCER string is Intel or false
otherwise. Sets the MAJOR and MINOR versions when not NULL. */
extern bool producer_is_icc (const char *producer, int *major, int *minor);