From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 51DE1385E00B; Sat, 28 Mar 2020 04:01:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51DE1385E00B From: "keno at juliacomputing dot com" To: gdb-prs@sourceware.org Subject: [Bug remote/25741] GDB tries to set breakpoint using Z0, but remove it using z1 Date: Sat, 28 Mar 2020 04:01:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: keno at juliacomputing dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2020 04:01:51 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25741 --- Comment #1 from Keno Fischer --- I have debugged this and have a proposed patch: ``` diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index e49025461b..9854754c7d 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 =3D=3D loc2->length); + && loc1->length =3D=3D loc2->length && loc1->loc_type =3D=3D loc2->loc_type); } static void ``` The issue is that gdb thinks it can just switch over the breakpoint, since there's a breakpoint already there (a bp_hp_step_resume breakpoint), but that shouldn't work if one of them is a hardware and one of them is a software breakpoint. I don't have a enough of a global view to know if this is the right place to fix that, but it does solve my issue. --=20 You are receiving this mail because: You are on the CC list for the bug.=