This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH 3/3] libdw: save startp/endp boundaries in Dwarf_CU
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 11 Dec 2014 13:06:25 +0100
- Subject: Re: [PATCH 3/3] libdw: save startp/endp boundaries in Dwarf_CU
On Wed, 2014-12-10 at 18:48 -0800, Josh Stone wrote:
> Rather than looking up section data every time, we can simply save the
> range of each CU as pointers in Dwarf_CU.
> 2014-12-10 Josh Stone <email@example.com>
> + * libdwP.h (Dwarf_CU): Add startp and endp boundaries.
> + * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp.
> + * dwarf_child.c (dwarf_child): Use cu->endp.
> + * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp.
> + * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp.
> + * dwarf_siblingof.c (dwarf_siblingof): Use both.
This looks good, thanks. (Nitpick, blank line again.)
It also gave me an idea how to better handle bounds checking in the
dwarf_form functions when we have "fake" attributes.