public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Pedro Alves <palves@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] ranged_breakpoint: don't use init_raw_breakpoint Date: Fri, 20 May 2022 19:42:38 +0000 (GMT) [thread overview] Message-ID: <20220520194238.8ECFA383088A@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f317d1eb2a7a7b9ec724630a7d70b51f435ff116 commit f317d1eb2a7a7b9ec724630a7d70b51f435ff116 Author: Pedro Alves <pedro@palves.net> Date: Fri May 6 22:21:36 2022 +0100 ranged_breakpoint: don't use init_raw_breakpoint ranged_breakpoint's ctor already sets the breakpoint's type to bp_hardware_breakpoint. Since this is a "regular" breakpoint, b->pspace should remain NULL. Thus, the only thing init_raw_breakpoint is needed for, is to add the breakpoint's location. Do that directly. 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) /* Now set up the breakpoint. */ std::unique_ptr<breakpoint> br (new ranged_breakpoint (get_current_arch ())); - init_raw_breakpoint (br.get (), sal_start, bp_hardware_breakpoint); + br->add_location (sal_start); b = add_to_breakpoint_chain (std::move (br)); set_breakpoint_count (breakpoint_count + 1);
reply other threads:[~2022-05-20 19:42 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220520194238.8ECFA383088A@sourceware.org \ --to=palves@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).