gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 13 Jul 2012 20:15:03 +0000 (20:15 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 13 Jul 2012 20:15:03 +0000 (20:15 +0000)
* dwarf2read.c (read_call_site_scope): Do not gdb_assert for invalid
read-in CALL_SITE_PARAMETER_PARAM_OFFSET.

gdb/ChangeLog
gdb/dwarf2read.c

index 092bab2151ecd21aed54d32e498eb3576a377136..48ace52e766588738d52ee2dfa91181540e591db 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * dwarf2read.c (read_call_site_scope): Do not gdb_assert for invalid
+       read-in CALL_SITE_PARAMETER_PARAM_OFFSET.
+
 2012-07-13  Doug Evans  <dje@google.com>
 
        * symtab.c (output_source_filename): Delete unnecessary forward decl.
index abb630cfefcca9e45c6c952dceb5394c8ee1b962..9e3be9f4c61f478980c307beaa6a71386908280b 100644 (file)
@@ -8878,7 +8878,18 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
 
          parameter->kind = CALL_SITE_PARAMETER_PARAM_OFFSET;
          offset = dwarf2_get_ref_die_offset (origin);
-         gdb_assert (offset.sect_off >= cu->header.offset.sect_off);
+         if (!offset_in_cu_p (&cu->header, offset))
+           {
+             /* As DW_OP_GNU_parameter_ref uses CU-relative offset this
+                binding can be done only inside one CU.  Such referenced DIE
+                therefore cannot be even moved to DW_TAG_partial_unit.  */
+             complaint (&symfile_complaints,
+                        _("DW_AT_abstract_origin offset is not in CU for "
+                          "DW_TAG_GNU_call_site child DIE 0x%x "
+                          "[in module %s]"),
+                        child_die->offset.sect_off, objfile->name);
+             continue;
+           }
          parameter->u.param_offset.cu_off = (offset.sect_off
                                              - cu->header.offset.sect_off);
        }