diff options
author | Roland McGrath <roland@redhat.com> | 2009-10-05 17:36:43 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2009-10-05 17:36:43 +0000 |
commit | fcaf740c16004e36e5bdb7152ae49d25805d9dea (patch) | |
tree | 82367c77356c38df5ed8fb6f51bcd66e9f3bbd30 /elfutils/libdw/dwarf_getpubnames.c | |
parent | 5a4cef9b6c2899944308fdb8f78559fc0df766cc (diff) | |
download | elfutils-196fbacf6ba3d672b7b9c93261503eaeebcee3c1.tar.gz |
0.143-10.143-1
- Update to 0.143
- libdw: Various convenience functions for individual attributes now use
dwarf_attr_integrate to look up indirect inherited attributes.
Location expression handling now supports DW_OP_implicit_value.
- libdwfl: Support automatic decompression of files in XZ format,
and of Linux kernel images made with bzip2 or LZMA
(as well as gzip).
Diffstat (limited to 'elfutils/libdw/dwarf_getpubnames.c')
-rw-r--r-- | elfutils/libdw/dwarf_getpubnames.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/elfutils/libdw/dwarf_getpubnames.c b/elfutils/libdw/dwarf_getpubnames.c index 1b054e26..5560a758 100644 --- a/elfutils/libdw/dwarf_getpubnames.c +++ b/elfutils/libdw/dwarf_getpubnames.c @@ -102,7 +102,6 @@ get_offsets (Dwarf *dbg) else if (unlikely (len >= DWARF3_LENGTH_MIN_ESCAPE_CODE && len <= DWARF3_LENGTH_MAX_ESCAPE_CODE)) { - invalid_dwarf: __libdw_seterrno (DWARF_E_INVALID_DWARF); goto err_return; } @@ -124,18 +123,12 @@ get_offsets (Dwarf *dbg) } /* Get the CU offset. */ - if (len_bytes == 4) - mem[cnt].cu_offset = read_4ubyte_unaligned (dbg, readp + 2); - else - mem[cnt].cu_offset = read_8ubyte_unaligned (dbg, readp + 2); + if (__libdw_read_offset (dbg, IDX_debug_pubnames, readp + 2, len_bytes, + &mem[cnt].cu_offset, IDX_debug_info, 3)) + /* Error has been already set in reader. */ + goto err_return; /* Determine the size of the CU header. */ - if (unlikely (dbg->sectiondata[IDX_debug_info] == NULL - || dbg->sectiondata[IDX_debug_info]->d_buf == NULL - || (mem[cnt].cu_offset + 3 - >= dbg->sectiondata[IDX_debug_info]->d_size))) - goto invalid_dwarf; - unsigned char *infop = ((unsigned char *) dbg->sectiondata[IDX_debug_info]->d_buf + mem[cnt].cu_offset); |