gcc 4 outputs AT_location attributes which are not blocks. Prevent core-dumping

by not trying to dereference non block attributes as block.
This commit is contained in:
christos 2006-11-26 04:45:39 +00:00
parent 3267e61df1
commit 7a47f15696

View File

@ -4880,7 +4880,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
break;
case DW_TAG_formal_parameter:
attr = dwarf_attr (die, DW_AT_location);
if (attr)
if (attr && attr_form_is_block (attr))
{
SYMBOL_VALUE (sym) =
decode_locdesc (DW_BLOCK (attr), objfile, cu_header);