From patchwork Tue Sep 27 04:08:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 16061 Received: (qmail 104395 invoked by alias); 27 Sep 2016 04:51:26 -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 104362 invoked by uid 89); 27 Sep 2016 04:51:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: gproxy8-pub.mail.unifiedlayer.com Received: from gproxy8-pub.mail.unifiedlayer.com (HELO gproxy8-pub.mail.unifiedlayer.com) (67.222.33.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Tue, 27 Sep 2016 04:51:21 +0000 Received: (qmail 11811 invoked by uid 0); 27 Sep 2016 04:51:20 -0000 Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy8.mail.unifiedlayer.com with SMTP; 27 Sep 2016 04:51:20 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw2 with id oUrF1t00J2f2jeq01UrJfw; Mon, 26 Sep 2016 22:51:18 -0600 X-Authority-Analysis: v=2.1 cv=F4vEKMRN c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=GW1xBdLrtEIA:10 a=zstS-IiYAAAA:8 a=p5FXLVDAYbf3AlMJj1cA:9 a=3vxH5xO1AI8IcgzK:21 a=ZAZTtEcDEXDTixvG:21 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 71-218-192-86.hlrn.qwest.net ([71.218.192.86]:56110 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_1) (envelope-from ) id 1bojhV-0006Nj-1O; Mon, 26 Sep 2016 22:09:01 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 12/22] Remove unnecessary null_cleanup Date: Mon, 26 Sep 2016 22:08:40 -0600 Message-Id: <1474949330-4307-13-git-send-email-tom@tromey.com> In-Reply-To: <1474949330-4307-1-git-send-email-tom@tromey.com> References: <1474949330-4307-1-git-send-email-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1bojhV-0006Nj-1O X-Source-Sender: 71-218-192-86.hlrn.qwest.net (bapiya.Home) [71.218.192.86]:56110 X-Source-Auth: tom+tromey.com X-Email-Count: 23 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== This patch removes an unnecessary null_cleanup. 2016-09-26 Tom Tromey * tracepoint.c (trace_dump_command): Remove unnecessary null_cleanup. --- gdb/ChangeLog | 5 +++++ gdb/tracepoint.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 66e9236..d3b8a45 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2016-09-26 Tom Tromey + * tracepoint.c (trace_dump_command): Remove unnecessary + null_cleanup. + +2016-09-26 Tom Tromey + * maint.h (scoped_command_stats): New class. (make_command_stats_cleanup): Don't declare. * maint.c (struct cmd_stats): Remove. diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index c89c77e..e5c353c 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -3061,11 +3061,9 @@ trace_dump_command (char *args, int from_tty) printf_filtered ("Data collected at tracepoint %d, trace frame %d:\n", tracepoint_number, traceframe_number); - old_chain = make_cleanup (null_cleanup, NULL); - /* This command only makes sense for the current frame, not the selected frame. */ - make_cleanup_restore_current_thread (); + old_chain = make_cleanup_restore_current_thread (); select_frame (get_current_frame ()); actions = all_tracepoint_actions_and_cleanup (loc->owner);