From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1551) id 8ECFA383088A; Fri, 20 May 2022 19:42:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8ECFA383088A 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] ranged_breakpoint: don't use init_raw_breakpoint X-Act-Checkin: binutils-gdb X-Git-Author: Pedro Alves X-Git-Refname: refs/heads/master X-Git-Oldrev: 1c2cbcf1de2d3fcba119ff4ef01dc1b74923daeb X-Git-Newrev: f317d1eb2a7a7b9ec724630a7d70b51f435ff116 Message-Id: <20220520194238.8ECFA383088A@sourceware.org> Date: Fri, 20 May 2022 19:42:38 +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:42:38 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df317d1eb2a7a= 7b9ec724630a7d70b51f435ff116 commit f317d1eb2a7a7b9ec724630a7d70b51f435ff116 Author: Pedro Alves Date: Fri May 6 22:21:36 2022 +0100 ranged_breakpoint: don't use init_raw_breakpoint =20 ranged_breakpoint's ctor already sets the breakpoint's type to bp_hardware_breakpoint. =20 Since this is a "regular" breakpoint, b->pspace should remain NULL. =20 Thus, the only thing init_raw_breakpoint is needed for, is to add the breakpoint's location. Do that directly. =20 Change-Id: I1505de94c3919881c2b300437e2c0da9b05f76bd Diff: --- gdb/breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 8f6794511e7..f9332e1f998 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9439,7 +9439,7 @@ break_range_command (const char *arg, int from_tty) =20 /* Now set up the breakpoint. */ std::unique_ptr br (new ranged_breakpoint (get_current_arch = ())); - init_raw_breakpoint (br.get (), sal_start, bp_hardware_breakpoint); + br->add_location (sal_start); b =3D add_to_breakpoint_chain (std::move (br)); =20 set_breakpoint_count (breakpoint_count + 1);