From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by sourceware.org (Postfix) with ESMTPS id 9374B385BF83 for ; Tue, 14 Apr 2020 07:01:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9374B385BF83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=juliacomputing.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=keno@juliacomputing.com Received: by mail-il1-x142.google.com with SMTP id c17so7228414ilk.6 for ; Tue, 14 Apr 2020 00:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juliacomputing-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=g5hS0pmkly6S5k3ehb2UA93uVBm4aErCloNFcuylxJo=; b=nC90NTzmotottHGgxc45q1OVNG8zB8o4o8RZEcq5pr0x81D7F9ElkqecomEc+5QSW+ 9Xc8CFHBqDe/EoSt5yNAk5er1Smc3la+sPrI+Jr6L8xRm1fkJq6K9fqFkkdsFcRLvCaj 19iWtc3HCC1ezX2xv1L1mtlGh6ZPWogv3Pi6Znj60AqALtZrfs++nq+HAr0enK0g2oae 9KIErg8lPlH1MMpq+92QPgyFngH/QXWe2oRfriitLOcBR6laCVvGy188pAHYG9xBiOXE bNNONV/SpRjvyR0qmflEBa0M/AOkjXOEu/EBxTPfjtF1kzhluQaad+hU7sRVdkksxtdg CCEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=g5hS0pmkly6S5k3ehb2UA93uVBm4aErCloNFcuylxJo=; b=MKGF7ieBoW0AmnFQyE+QlU+wUfIRz1BVdxZS9s0EbRnLNDGYV9hJ+S77TriwYdpEJe N5tkhjmCE7j8yeuiXY6FSQXVWzFhTq73IiWPvgzPbKFZ+LoNw15C0tE83mZf45w4gBYH cYsTv5aNgyfdeg3OqqgCCXX3HsS9yWSlTnFldyhaaaodLu31DS/l4D2o30NFczX8/Am3 Fsvmy5dryrKbC7N+va0Lb4Gxg9VFLNykna9kPj32GzEZPaYBkRNM6SOJulz9uI/lKdfu EJ9ASUJkHMKP+sNUlrWBoPHn67WrGk9wuHghFWrgBWTdnys8Vo3LjxCsRTOefC8bydai h7wQ== X-Gm-Message-State: AGi0PubO1kYLdJ3I6O0K+Aj3SAxMKWskXhvye7lwfi+4L/MnHJhAgdZP dwLMZfcLJViXLEedItH+sLLWAtf3hG/XYRuhw39A8G/eKtM= X-Google-Smtp-Source: APiQypI3qCmN7b5BfHSdp2iEzg0ozW9GP++gsrrURVG/pnIXtqKLYsJ+eUtj3+weoYF8Et5HRUQyamtxEydSFEZsl64= X-Received: by 2002:a92:cf50:: with SMTP id c16mr20461204ilr.181.1586847710862; Tue, 14 Apr 2020 00:01:50 -0700 (PDT) MIME-Version: 1.0 References: <20200401013813.GA27550@juliacomputing.com> In-Reply-To: <20200401013813.GA27550@juliacomputing.com> From: Keno Fischer Date: Tue, 14 Apr 2020 03:01:15 -0400 Message-ID: Subject: Re: [PATCH] breakpoint: Make sure location types match before swapping To: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-25.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, 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, 14 Apr 2020 07:01:52 -0000 Bump. It would be great to get this fixed. On Tue, Mar 31, 2020 at 9:38 PM Keno Fischer wrote: > > This patch fixes PR gdb/25741 "GDB tries to set breakpoint using Z0, but remove it using z1". > In particular, what occurs in that case is that a hardware breakpoint is hit, > after which GDB removes it and establishes a single step breakpoint at the > same location. Afterwards, rather than simply removing this breakpoint and > re-enabling the hardware breakpoint, GDB simply swaps the activation, without > informing the server, leading to an inconsistency in GDB's view of the world > and the server's view of the world. To remidy this situation, this > patch adds a check that ensures two breakpoint locations have the > same type before they are considered equal and thus eligible for silent > swapping. > > gdb/ChangeLog: > * breakpoint.c (breakpoint_locations_match): Fix PR gdb/25741 > > Signed-off-by: Keno Fischer > --- > gdb/breakpoint.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index e49025461b..582dae1946 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -6838,7 +6838,7 @@ breakpoint_locations_match (struct bp_location *loc1, > /* We compare bp_location.length in order to cover ranged breakpoints. */ > return (breakpoint_address_match (loc1->pspace->aspace, loc1->address, > loc2->pspace->aspace, loc2->address) > - && loc1->length == loc2->length); > + && loc1->length == loc2->length && loc1->loc_type == loc2->loc_type); > } > > static void > -- > 2.24.0 >