public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Add constructor to syscall_catchpoint Date: Fri, 6 May 2022 18:11:02 +0000 (GMT) [thread overview] Message-ID: <20220506181102.23014395200F@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6c91c7de2007ca0d6f0285fa62e755507359a177 commit 6c91c7de2007ca0d6f0285fa62e755507359a177 Author: Tom Tromey <tom@tromey.com> Date: Sat Apr 30 14:21:45 2022 -0600 Add constructor to syscall_catchpoint This adds a constructor to syscall_catchpoint and simplifies the caller. Diff: --- gdb/break-catch-syscall.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c index bcdf0f117a5..d25d7ba7c5e 100644 --- a/gdb/break-catch-syscall.c +++ b/gdb/break-catch-syscall.c @@ -37,6 +37,11 @@ struct syscall_catchpoint : public breakpoint { + explicit syscall_catchpoint (std::vector<int> &&calls) + : syscalls_to_be_caught (std::move (calls)) + { + } + int insert_location (struct bp_location *) override; int remove_location (struct bp_location *, enum remove_bp_reason reason) override; @@ -347,9 +352,9 @@ create_syscall_event_catchpoint (int tempflag, std::vector<int> &&filter) { struct gdbarch *gdbarch = get_current_arch (); - std::unique_ptr<syscall_catchpoint> c (new syscall_catchpoint ()); + std::unique_ptr<syscall_catchpoint> c + (new syscall_catchpoint (std::move (filter))); init_catchpoint (c.get (), gdbarch, tempflag, nullptr); - c->syscalls_to_be_caught = std::move (filter); install_breakpoint (0, std::move (c), 1); }
reply other threads:[~2022-05-06 18:11 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=20220506181102.23014395200F@sourceware.org \ --to=tromey@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).