2010-06-01 Roland McGrath <roland@redhat.com>
+ * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling.
+
* dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc.
* libdw_findcu.c (__libdw_findcu): Accept version 4.
/* Return unsigned constant represented by attribute.
- Copyright (C) 2003-2009 Red Hat, Inc.
+ Copyright (C) 2003-2010 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2003.
}
else if (attr->cu->version > 3)
goto invalid;
-
- switch (attr->form)
- {
- case DW_FORM_data4:
- case DW_FORM_data8:
- if (__libdw_read_offset (attr->cu->dbg, IDX_debug_info, attr->valp,
- attr->form == DW_FORM_data4 ? 4 : 8,
- &offset, sec_index, 0))
- return NULL;
- break;
-
- default:
- if (INTUSE(dwarf_formudata) (attr, &offset))
- return NULL;
- };
+ else
+ switch (attr->form)
+ {
+ case DW_FORM_data4:
+ case DW_FORM_data8:
+ if (__libdw_read_offset (attr->cu->dbg, IDX_debug_info, attr->valp,
+ attr->form == DW_FORM_data4 ? 4 : 8,
+ &offset, sec_index, 0))
+ return NULL;
+ break;
+
+ default:
+ if (INTUSE(dwarf_formudata) (attr, &offset))
+ return NULL;
+ };
unsigned char *readp = d->d_buf + offset;
unsigned char *endp = d->d_buf + d->d_size;