From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 328F9385B804; Sat, 7 May 2022 16:08:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 328F9385B804 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix "catch syscall" X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 8f3babfaf8ea582bed93fd6abcde7bfc96d3a8dd X-Git-Newrev: c5eab52dbae5806ffa8567afc73aab7f3a93f4a6 Message-Id: <20220507160859.328F9385B804@sourceware.org> Date: Sat, 7 May 2022 16:08:59 +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: Sat, 07 May 2022 16:08:59 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dc5eab52dbae5= 806ffa8567afc73aab7f3a93f4a6 commit c5eab52dbae5806ffa8567afc73aab7f3a93f4a6 Author: Tom Tromey Date: Sat May 7 10:07:36 2022 -0600 Fix "catch syscall" =20 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. */ =20 -struct syscall_catchpoint : public breakpoint +struct syscall_catchpoint : public catchpoint { - syscall_catchpoint (struct gdbarch *gdbarch, std::vector &&calls) - : breakpoint (gdbarch, bp_catchpoint), + syscall_catchpoint (struct gdbarch *gdbarch, bool tempflag, + std::vector &&calls) + : catchpoint (gdbarch, tempflag, nullptr), syscalls_to_be_caught (std::move (calls)) { } @@ -354,7 +355,7 @@ create_syscall_event_catchpoint (int tempflag, std::vec= tor &&filter) struct gdbarch *gdbarch =3D get_current_arch (); =20 std::unique_ptr c - (new syscall_catchpoint (gdbarch, std::move (filter))); + (new syscall_catchpoint (gdbarch, tempflag, std::move (filter))); =20 install_breakpoint (0, std::move (c), 1); }