From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96581 invoked by alias); 30 Nov 2018 18:05:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 96567 invoked by uid 89); 30 Nov 2018 18:05:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=BAYES_00,SPF_HELO_PASS,TRACKER_ID autolearn=no version=3.3.2 spammy=IRC, irc, encrypted X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Nov 2018 18:05:50 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CEBAC3099FD4; Fri, 30 Nov 2018 18:05:49 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id B7BCA18510; Fri, 30 Nov 2018 18:05:46 +0000 (UTC) From: Sergio Durigan Junior To: Tom Tromey Cc: GDB Patches , Keith Seitz , Jan Kratochvil 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> Date: Fri, 30 Nov 2018 18:05:00 -0000 In-Reply-To: <87ftvi1mi3.fsf@tromey.com> (Tom Tromey's message of "Fri, 30 Nov 2018 10:52:20 -0700") Message-ID: <87zhtqqw3p.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg00578.txt.bz2 On Friday, November 30 2018, Tom Tromey wrote: >>>>>> "Sergio" == Sergio Durigan Junior 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/