From patchwork Fri Aug 11 19:55:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 22105 Received: (qmail 57011 invoked by alias); 11 Aug 2017 19:55:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 56993 invoked by uid 89); 11 Aug 2017 19:55:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=spots X-HELO: gproxy5-pub.mail.unifiedlayer.com Received: from gproxy5-pub.mail.unifiedlayer.com (HELO gproxy5-pub.mail.unifiedlayer.com) (67.222.38.55) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Aug 2017 19:55:39 +0000 Received: from CMOut01 (unknown [10.0.90.82]) by gproxy5.mail.unifiedlayer.com (Postfix) with ESMTP id 0050A140554 for ; Fri, 11 Aug 2017 13:55:36 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id vvvZ1v00a2f2jeq01vvc7Q; Fri, 11 Aug 2017 13:55:36 -0600 X-Authority-Analysis: v=2.2 cv=FrR1xyjq c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=KeKAF7QvOSUA:10 a=zstS-IiYAAAA:8 a=20KFwNOVAAAA:8 a=UlJtXGwIrvtidPhidWsA:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 75-166-24-97.hlrn.qwest.net ([75.166.24.97]:49854 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dgG1t-001Ztc-AM; Fri, 11 Aug 2017 13:55:33 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA] Use std::move in a few places Date: Fri, 11 Aug 2017 13:55:28 -0600 Message-Id: <20170811195528.31392-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1dgG1t-001Ztc-AM X-Source-Sender: 75-166-24-97.hlrn.qwest.net (bapiya.Home) [75.166.24.97]:49854 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes This patch adds std::move to few spots where it seems to be missing. Regression tested by the buildbot. ChangeLog 2017-08-11 Tom Tromey * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move. * break-catch-syscall.c (create_syscall_event_catchpoint): Use std::move. * break-catch-sig.c (create_signal_catchpoint): Use std::move. --- gdb/ChangeLog | 7 +++++++ gdb/break-catch-sig.c | 2 +- gdb/break-catch-syscall.c | 2 +- gdb/break-catch-throw.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c588291..a143d4d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2017-08-11 Tom Tromey + + * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move. + * break-catch-syscall.c (create_syscall_event_catchpoint): Use + std::move. + * break-catch-sig.c (create_signal_catchpoint): Use std::move. + 2017-08-11 Pedro Alves * infrun.c (process_event_stop_test): Adjust diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c index c8529de..98888c9 100644 --- a/gdb/break-catch-sig.c +++ b/gdb/break-catch-sig.c @@ -322,7 +322,7 @@ create_signal_catchpoint (int tempflag, std::vector &&filter, c = new signal_catchpoint (); init_catchpoint (c, gdbarch, tempflag, NULL, &signal_catchpoint_ops); - c->signals_to_be_caught = filter; + c->signals_to_be_caught = std::move (filter); c->catch_all = catch_all; install_breakpoint (0, c, 1); diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c index 58fc279..701645e 100644 --- a/gdb/break-catch-syscall.c +++ b/gdb/break-catch-syscall.c @@ -375,7 +375,7 @@ create_syscall_event_catchpoint (int tempflag, std::vector &&filter, c = new syscall_catchpoint (); init_catchpoint (c, gdbarch, tempflag, NULL, ops); - c->syscalls_to_be_caught = filter; + c->syscalls_to_be_caught = std::move (filter); install_breakpoint (0, c, 1); } diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index e71a885..5318e5f 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -382,7 +382,7 @@ handle_gnu_v3_exceptions (int tempflag, std::string &&except_rx, the right thing. */ cp->type = bp_breakpoint; cp->kind = ex_event; - cp->exception_rx = except_rx; + cp->exception_rx = std::move (except_rx); cp->pattern = std::move (pattern); re_set_exception_catchpoint (cp.get ());