From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 13E94394FC39; Fri, 6 May 2022 18:10:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13E94394FC39 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] Add constructor to signal_catchpoint X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 4874f776caf053b708d7f76d6b72a8846f2ca219 X-Git-Newrev: e02f53e50ebebfb8f020516a48d5581793748c6f Message-Id: <20220506181057.13E94394FC39@sourceware.org> Date: Fri, 6 May 2022 18:10:57 +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, 06 May 2022 18:10:57 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De02f53e50ebe= bfb8f020516a48d5581793748c6f commit e02f53e50ebebfb8f020516a48d5581793748c6f Author: Tom Tromey Date: Sat Apr 30 14:20:53 2022 -0600 Add constructor to signal_catchpoint =20 This adds a constructor to signal_catchpoint and simplifies the caller. Diff: --- gdb/break-catch-sig.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c index c42b0fd1c01..1c29a057d60 100644 --- a/gdb/break-catch-sig.c +++ b/gdb/break-catch-sig.c @@ -40,6 +40,12 @@ =20 struct signal_catchpoint : public breakpoint { + signal_catchpoint (std::vector &&sigs, bool catch_all_) + : signals_to_be_caught (std::move (sigs)), + catch_all (catch_all_) + { + } + int insert_location (struct bp_location *) override; int remove_location (struct bp_location *, enum remove_bp_reason reason) override; @@ -316,10 +322,9 @@ create_signal_catchpoint (int tempflag, std::vector &&filter, { struct gdbarch *gdbarch =3D get_current_arch (); =20 - std::unique_ptr c (new signal_catchpoint ()); + std::unique_ptr c + (new signal_catchpoint (std::move (filter), catch_all)); init_catchpoint (c.get (), gdbarch, tempflag, nullptr); - c->signals_to_be_caught =3D std::move (filter); - c->catch_all =3D catch_all; =20 install_breakpoint (0, std::move (c), 1); }