From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id 636D3384B0C1 for ; Tue, 21 Apr 2020 18:31:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 636D3384B0C1 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-403-9mbZ3H6EO4SruCxODNrt8w-1; Tue, 21 Apr 2020 14:31:55 -0400 X-MC-Unique: 9mbZ3H6EO4SruCxODNrt8w-1 Received: by mail-ed1-f72.google.com with SMTP id m5so3290124edv.8 for ; Tue, 21 Apr 2020 11:31:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=smF7XHwZVFMut4p7A+aQ1EYObdokDRGF29iS0F7Vodw=; b=QWFW2lDvpS7jixJG+V9U/HbD7NbA5CWCvK+H0xgjfHBOf/o532lrqdcExrz7u5VdjE 3cjSPWTs+1QvcTwQMfG35W+9HgnI2vRb9fV35SeYWxbMnKZ6nbIFjqF8CMN27RcbdDG8 3MdX/jLFr06KtnVtv/K1WLWJpak+i5rpyO/oC9MpdcmVRK2hvaKWIHn10LA4g19lDalK /Fpqpf15VsT4f1V4xt1EGA3TaEB4gcF+0KdVDOtqscxUqSdNzNR17n49lqvZjm/ye5TX XZRGrloM7qlcxtcmn9KdICMIQnf6u11dLT+gBzXm7/cf9WdG3rbX9rl6ZK1xVjXtDgR6 MX8w== X-Gm-Message-State: AGi0PuY+TML953KWmhhki+OyItEaVHMYnWrt47h6M7BNFnUzAhiASTNh vAJd7enN7D8sNOZj4Hem5ACRqpbvxa1WXUr2zjUrH2q0wL1U4RgKI2i/ukJdLBtfRYAFtvm1Jlt Ml36qa5KwopEBco859u8aTg== X-Received: by 2002:a17:906:9518:: with SMTP id u24mr12387162ejx.320.1587493913989; Tue, 21 Apr 2020 11:31:53 -0700 (PDT) X-Google-Smtp-Source: APiQypK0jkfU1dJsYmGaT3Mn8FDKGZVbs7gpgC7pAc57qD9kHgoQ9NuRA/4RxzIoNMYegwG7i7Q2tQ== X-Received: by 2002:a17:906:9518:: with SMTP id u24mr12387137ejx.320.1587493913722; Tue, 21 Apr 2020 11:31:53 -0700 (PDT) Received: from ?IPv6:2001:8a0:f909:7b00:2327:23ca:3e56:ef5f? ([2001:8a0:f909:7b00:2327:23ca:3e56:ef5f]) by smtp.gmail.com with ESMTPSA id mj1sm552587ejb.6.2020.04.21.11.31.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Apr 2020 11:31:53 -0700 (PDT) Subject: Re: [PATCH] Stop considering hw and sw breakpoints duplicates (Re: [PATCH] breakpoint: Make sure location types match before swapping) To: Christian Biesinger References: <20200401013813.GA27550@juliacomputing.com> <372f95e1-4591-7e0d-90c7-168477e032ba@simark.ca> <20200414160059.GG2366@embecosm.com> <41e51f15-6729-ccbf-7833-3a621006cdbf@redhat.com> <20200417122839.GK2366@embecosm.com> <16bb0282-652d-c6c5-3e47-a81dd827eef5@redhat.com> Cc: Simon Marchi , Keno Fischer , gdb-patches From: Pedro Alves Message-ID: Date: Tue, 21 Apr 2020 19:31:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-21.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 18:31:58 -0000 On 4/21/20 5:24 PM, Christian Biesinger via Gdb-patches wrote: > On Sun, Apr 19, 2020 at 1:49 PM Pedro Alves via Gdb-patches > wrote: >> From 10d0944768e6ce59861c1522ed48449422a76736 Mon Sep 17 00:00:00 2001 >> From: Pedro Alves >> Date: Sun, 19 Apr 2020 18:25:55 +0100 >> Subject: [PATCH] Stop considering hw and sw breakpoints duplicates >> >> --- >> gdb/breakpoint.c | 269 ++++++++++++++------- >> gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp | 2 +- >> 2 files changed, 183 insertions(+), 88 deletions(-) >> >> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c >> index e49025461ba..27799e89807 100644 >> --- a/gdb/breakpoint.c >> +++ b/gdb/breakpoint.c >> @@ -144,6 +144,10 @@ static void describe_other_breakpoints (struct gdbarch *, >> static int watchpoint_locations_match (struct bp_location *loc1, >> struct bp_location *loc2); >> >> +static int breakpoint_locations_match (struct bp_location *loc1, >> + struct bp_location *loc2, >> + bool sw_hw_bps_match = false); >> + > > Should this return a bool? > >> static int breakpoint_location_address_match (struct bp_location *bl, >> const struct address_space *aspace, >> CORE_ADDR addr); > > And this, I guess. Yeah, they should. Old, pre-C++ code. It feels like an orthogonal change though, particularly since I think we could change all of those two, plus watchpoint_locations_match at the same time. Thanks, Pedro Alves