This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix detection of gfortran compilers.
- From: Bernhard Heckel <bernhard dot heckel at intel dot com>
- To: brobecker at adacore dot com
- Cc: gdb-patches at sourceware dot org, "bernhard.heckel" <bernhard dot heckel at intel dot com>
- Date: Mon, 22 Feb 2016 15:49:15 +0100
- Subject: [PATCH] Fix detection of gfortran compilers.
- Authentication-results: sourceware.org; auth=none
From: "bernhard.heckel" <bernhard.heckel@intel.com>
Newer gfortran compilers changed naming convention in DW_AT_producer tag.
For example "GNU Fortran 4.6.3" vs "GNU Fortran2008 5.3.0"
2016-02-10 Bernhard Heckel <bernhard.heckel@intel.com>
gdb/Changelog:
* dwarf2read.c (new_symbol_full): Fix detection of gfortran compilers.
---
gdb/dwarf2read.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 1020c12..dcd49e3 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -18506,7 +18506,7 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
if (cu->language == language_fortran && die->parent
&& die->parent->tag == DW_TAG_module
&& cu->producer
- && startswith (cu->producer, "GNU Fortran "))
+ && startswith (cu->producer, "GNU Fortran"))
SYMBOL_ACLASS_INDEX (sym) = LOC_UNRESOLVED;
/* A variable with DW_AT_external is never static,
--
2.7.1.339.g0233b80