This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/PATCH] Fix dwarf2read.c:dwarf2_find_containing_comp_unit's binary search
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Keith Seitz <keiths at redhat dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Date: Fri, 30 Nov 2018 13:05:46 -0500
- Subject: Re: [RFC/PATCH] Fix dwarf2read.c:dwarf2_find_containing_comp_unit's binary search
- References: <20181130172148.18830-1-sergiodj@redhat.com> <87ftvi1mi3.fsf@tromey.com>
On Friday, November 30 2018, Tom Tromey wrote:
>>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
>
> Sergio> https://bugzilla.redhat.com/show_bug.cgi?id=1613614
> Sergio> * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
> Sergio> 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
> Sergio> inside the CU.
>
> Thanks for the extensive analysis.
> I agree this is correct; please check this in.
Thanks for the quick review. This has been pushed:
81fbbaf96216ed88973a069e4ed25379d7421ec8
> It's weird that cu_off is a pointer in this code.
> It seems like that local could be removed entirely.
> But, no need to do that in this patch.
Yeah, as I told you on IRC, I also noticed this. I'll see about sending
a subsequent patch later.
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/