Fix PR gdb/19208 - SIGSEV while opening Fortran program compiled with ifort
Commit Message
Hi all,
Find attached a patch that fixes a SIGSEV for me when trying to open a
Fortran program compiled with ifort (using version 16.0.1.150).
The error can be reproduced with a most simple file only containing "end"
and no additional compiler flags.
---
break;
case DW_AT_inline:
--
Jonas Hahnfeld, MATSE-Auszubildender
IT Center
Group: High Performance Computing
Division: Computational Science and Engineering
RWTH Aachen University
Seffenter Weg 23
D 52074 Aachen (Germany)
Hahnfeld@itc.rwth-aachen.de
www.itc.rwth-aachen.de
@@ -1,3 +1,8 @@
+2016-01-04 Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>
+
+ * dwarf2read.c (read_partial_die): Fix PR gdb/19208 -
+ SIGSEV while opening Fortran program compiled with ifort
+
2016-01-04 Markus Metzger <markus.t.metzger@intel.com>
* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
@@ -15936,7 +15936,8 @@ read_partial_die (const struct die_reader_specs
*reader,
compilers pick up the new representation, we'll support this
practice. */
if (DW_UNSND (&attr) == DW_CC_program
- && cu->language == language_fortran)
+ && cu->language == language_fortran
+ && part_die->name != NULL)
set_objfile_main_name (objfile, part_die->name,
language_fortran);