From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1551) id BC0DF3856DEA; Fri, 20 May 2022 19:44:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC0DF3856DEA Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pedro Alves To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Momentary breakpoints should have no breakpoint number X-Act-Checkin: binutils-gdb X-Git-Author: Pedro Alves X-Git-Refname: refs/heads/master X-Git-Oldrev: 9a71ed14cb3c28238a12f19847a9f4f22ca20fd2 X-Git-Newrev: f9703051465a03bace3cc17b80fcd12c19a60821 Message-Id: <20220520194404.BC0DF3856DEA@sourceware.org> Date: Fri, 20 May 2022 19:44:04 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2022 19:44:04 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df9703051465a= 03bace3cc17b80fcd12c19a60821 commit f9703051465a03bace3cc17b80fcd12c19a60821 Author: Pedro Alves Date: Thu May 12 21:04:42 2022 +0100 Momentary breakpoints should have no breakpoint number =20 Momentary breakpoints have no breakpoint number, their breakpoint number should be always 0, to avoid constantly incrementing (or decrementing) the internal breakpoint count. =20 Indeed, set_momentary_breakpoint installs the created breakpoint without a number. =20 However, momentary_breakpoint_from_master incorrectly gives an internal breakpoint number to the new breakpoint. This commit fixes that. =20 Change-Id: Iedcae5432cdf232db9e9a6e1a646d358abd34f95 Diff: --- gdb/breakpoint.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0c3946cbc36..9006311b4bf 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -7945,7 +7945,6 @@ momentary_breakpoint_from_master (struct breakpoint *= orig, =20 copy->enable_state =3D bp_enabled; copy->disposition =3D disp_donttouch; - copy->number =3D internal_breakpoint_number--; =20 breakpoint *b =3D add_to_breakpoint_chain (std::move (copy)); update_global_location_list_nothrow (UGLL_DONT_INSERT);