A recent change added code in front of the attr_ok check. This
breaks existing code that assumes it can pass NULL to the ATTR
parameter. Move the attr_ok check back to the front.
+2010-05-28 Ulrich Drepper <drepper@redhat.com>
+
+ * dwarf_getlocation.c (dwarf_getlocation): Move attr_ok call back to
+ the front.
+
2010-05-27 Roland McGrath <roland@redhat.com>
* dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name,
2003-08-11 Ulrich Drepper <drepper@redhat.com>
- * Moved to CVS archive.
+ * Moved to CVS archive.
Dwarf_Op **llbuf;
size_t *listlen;
{
+ if (! attr_ok (attr))
+ return -1;
+
int result = check_constant_offset (attr, llbuf, listlen);
if (result != 1)
return result;
- if (! attr_ok (attr))
- return -1;
-
/* If it has a block form, it's a single location expression. */
Dwarf_Block block;
if (INTUSE(dwarf_formblock) (attr, &block) != 0)