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] Fix "catch syscall" Date: Sat, 7 May 2022 16:08:59 +0000 (GMT) [thread overview] Message-ID: <20220507160859.328F9385B804@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c5eab52dbae5806ffa8567afc73aab7f3a93f4a6 commit c5eab52dbae5806ffa8567afc73aab7f3a93f4a6 Author: Tom Tromey <tom@tromey.com> Date: Sat May 7 10:07:36 2022 -0600 Fix "catch syscall" Simon pointed out that some recent patches of mine broke "catch syscall". Apparently I forgot to finish the conversion of this code when removing init_catchpoint. This patch completes the conversion and fixes the bug. Diff: --- gdb/break-catch-syscall.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c index d79ced47a12..af55ecb1b5c 100644 --- a/gdb/break-catch-syscall.c +++ b/gdb/break-catch-syscall.c @@ -35,10 +35,11 @@ /* An instance of this type is used to represent a syscall catchpoint. */ -struct syscall_catchpoint : public breakpoint +struct syscall_catchpoint : public catchpoint { - syscall_catchpoint (struct gdbarch *gdbarch, std::vector<int> &&calls) - : breakpoint (gdbarch, bp_catchpoint), + syscall_catchpoint (struct gdbarch *gdbarch, bool tempflag, + std::vector<int> &&calls) + : catchpoint (gdbarch, tempflag, nullptr), syscalls_to_be_caught (std::move (calls)) { } @@ -354,7 +355,7 @@ 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 (gdbarch, std::move (filter))); + (new syscall_catchpoint (gdbarch, tempflag, std::move (filter))); install_breakpoint (0, std::move (c), 1); }
reply other threads:[~2022-05-07 16:08 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=20220507160859.328F9385B804@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).