This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Fix crash on reading gcc HEAD Fortran module
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 1 Sep 2008 15:02:12 +0200
- Subject: [patch] Fix crash on reading gcc HEAD Fortran module
Hi,
with the current gcc snapshot this testcase
MODULE m
integer :: varx
END MODULE m
USE m, a=>varx
end
crashes gdb HEAD on `break 2' with:
dwarf2read.c:2766: internal-error: process_die: Assertion `die->child == NULL' failed.
A problem internal to GDB has been detected,
While it still cannot reach the imported variables it at least no longer
crashes now. Notified by Tobias Burnus.
Regards,
Jan
2008-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
Stay compatible after the GCC PR fortran/29635 fix.
* dwarf2read.c (process_die <DW_TAG_imported_module>): Accept (ignored)
child DIEs. Only COMPLAINT for non-Fortran languages.
--- gdb/dwarf2read.c 29 Aug 2008 17:06:05 -0000 1.278
+++ gdb/dwarf2read.c 1 Sep 2008 12:56:19 -0000
@@ -2763,7 +2763,10 @@ process_die (struct die_info *die, struc
Fortran case, so we'll have to replace this gdb_assert if
Fortran compilers start generating that info. */
processing_has_namespace_info = 1;
- gdb_assert (die->child == NULL);
+ if (cu->language != language_fortran && die->child == NULL)
+ complaint (&symfile_complaints,
+ _("%s at offset %d has unexpected children"),
+ dwarf_tag_name (die->tag), die->offset);
break;
default:
new_symbol (die, NULL, cu);