aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-07-13 20:15:03 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-07-13 20:15:03 +0000
commitd76b7dbc5f5faacd9804b8aa387858a41eb20488 (patch)
treefff8404a98007049b63f852f57b7521e4b1154bb /gdb/dwarf2read.c
parent9fdc877be243c5330410dd3274d583542e07737c (diff)
downloadgdb-d76b7dbc5f5faacd9804b8aa387858a41eb20488.zip
gdb-d76b7dbc5f5faacd9804b8aa387858a41eb20488.tar.gz
gdb-d76b7dbc5f5faacd9804b8aa387858a41eb20488.tar.bz2
gdb/
* dwarf2read.c (read_call_site_scope): Do not gdb_assert for invalid read-in CALL_SITE_PARAMETER_PARAM_OFFSET.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index abb630c..9e3be9f 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -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);
}