2009-04-23 Petr Machata <pmachata@redhat.com>
* libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc,
- __libdw_read_addr, __libdw_read_off): Declare four new internal
+ __libdw_read_addr, __libdw_read_off): Add four new internal
functions.
- * dwarf_readhooks.c: New file, implements the above.
- * Makefile.am (libdw_a_SOURCES): Add the new file
2009-04-15 Roland McGrath <roland@redhat.com>
if (attr == NULL)
return NULL;
+ const Elf_Data *d = attr->cu->dbg->sectiondata[sec_index];
+ if (unlikely (d == NULL))
+ {
+ __libdw_seterrno (err_nodata);
+ return NULL;
+ }
+
Dwarf_Word offset;
switch (attr->form)
{
return NULL;
};
- const Elf_Data *d = attr->cu->dbg->sectiondata[sec_index];
- if (unlikely (d == NULL))
- {
- __libdw_seterrno (err_nodata);
- return NULL;
- }
-
unsigned char *readp = d->d_buf + offset;
unsigned char *endp = d->d_buf + d->d_size;
if (unlikely (readp >= endp))