From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15051 invoked by alias); 17 Jul 2014 08:04:24 -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 15040 invoked by uid 89); 17 Jul 2014 08:04:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 17 Jul 2014 08:04:22 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6H84JDd011252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 17 Jul 2014 04:04:20 -0400 Received: from host2.jankratochvil.net (ovpn-116-54.ams2.redhat.com [10.36.116.54]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6H84GEM001643 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 17 Jul 2014 04:04:18 -0400 Date: Thu, 17 Jul 2014 08:35:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Handle partially optimized out values similarly to unavailable values (Re: [patchv2] Fix crash on optimized-out entry data values) Message-ID: <20140717080415.GA23435@host2.jankratochvil.net> References: <20140709103312.GA27884@host2.jankratochvil.net> <53BD2CE0.1000308@redhat.com> <20140709153121.GA7989@host2.jankratochvil.net> <53C41D5D.9030109@redhat.com> <20140716215838.GA29855@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140716215838.GA29855@host2.jankratochvil.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00453.txt.bz2 On Wed, 16 Jul 2014 23:58:38 +0200, Jan Kratochvil wrote: > On Mon, 14 Jul 2014 20:11:41 +0200, Pedro Alves wrote: > > + /* The contents only match equal if the invalid/unavailable > > + contents ranges match as well. */ > > + if (!find_first_range_overlap_and_match (&rp1[i], &rp2[i], > > + offset1, offset2, length, > > + &l_tmp, &h_tmp)) > > + return 0; > > + > > + /* We're interested in the lowest/first range found. */ > > + if (i == 0 || l_tmp < l) > > Here should be: > if (i == 0 || l_tmp < l || (l_tmp == l && h_tmp < h)) > > It could skip [0]'s part which is non-equal otherwise. No, the code was OK. This comes from the fact that 'unavailable' and 'optimized_out' ranges cannot overlap (probably, I ask for its clarification somewhere else in the mail). Maybe it would be all easier to have there single map and each range mapping into enum { VALID, OPTIMIZED_OUT, UNAVAILABLE }. Jan