From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25801 invoked by alias); 8 Feb 2012 17:28:05 -0000 Received: (qmail 25785 invoked by uid 22791); 8 Feb 2012 17:28:04 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Feb 2012 17:27:38 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q18HRYkm031073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Feb 2012 12:27:34 -0500 Received: from host2.jankratochvil.net (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q18HRTPh015243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 8 Feb 2012 12:27:33 -0500 Date: Wed, 08 Feb 2012 17:28:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: "Gustavo, Luis" , gdb-patches@sourceware.org Subject: [patch] update_global_location_list my comment fix [Re: [PATCH] Fix breakpoint updates for multi-inferior] Message-ID: <20120208172728.GA6951@host2.jankratochvil.net> References: <4F20610B.5010403@mentor.com> <4F3291D9.80705@redhat.com> <4F329468.3020307@mentor.com> <4F32990B.7060203@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F32990B.7060203@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-02/txt/msg00106.txt.bz2 On Wed, 08 Feb 2012 16:47:23 +0100, Pedro Alves wrote: > We're already sorting by address first, so I'm not really sure what is > it that's user-visible that we're trying to preserve. Jan? I no longer remember if (a) I was wrongly expecting "duplicate"-marked locations are somehow visible in "info breakpoints". or (b) . I will check the comment change in, I hope everyone agrees with the reason. > Even if that is still necessary, would it be ok to sort by address, then > pspace, and only after by bkpt number? I agree with Pedro, update_global_location_list was introduced as GDB acceleration as the breakpoints performance became no longer bearable. While update_global_location_list is far from perfect (it should be incremental) we should not regress performance when it is enough to do it just in a bit different way as Pedro suggests. Thanks, Jan gdb/ 2012-02-08 Jan Kratochvil * breakpoint.c (bp_location_compare): Fix comment. --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -10589,8 +10589,9 @@ bp_location_compare (const void *ap, const void *bp) if (a_perm != b_perm) return (a_perm < b_perm) - (a_perm > b_perm); - /* Make the user-visible order stable across GDB runs. Locations of - the same breakpoint can be sorted in arbitrary order. */ + /* Make the internal GDB representation stable across GDB runs + where A and B memory inside GDB can differ. Breakpoint locations of + the same type at the same address can be sorted in arbitrary order. */ if (a->owner->number != b->owner->number) return (a->owner->number > b->owner->number)