From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60802 invoked by alias); 10 Nov 2016 22:20:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 60688 invoked by uid 89); 10 Nov 2016 22:20:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=notifications, *inf, sk:iterate, Attached X-HELO: gproxy6-pub.mail.unifiedlayer.com Received: from gproxy6-pub.mail.unifiedlayer.com (HELO gproxy6-pub.mail.unifiedlayer.com) (67.222.39.168) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Thu, 10 Nov 2016 22:19:59 +0000 Received: (qmail 18658 invoked by uid 0); 10 Nov 2016 22:19:58 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy6.mail.unifiedlayer.com with SMTP; 10 Nov 2016 22:19:58 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id 6NKv1u00B2f2jeq01NKy2g; Thu, 10 Nov 2016 15:19:58 -0700 X-Authority-Analysis: v=2.1 cv=fZg+lSgF 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=L24OOQBejmoA:10 a=zstS-IiYAAAA:8 a=ILSjIb_Sw3VT4ZDbIqIA:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 174-16-143-211.hlrn.qwest.net ([174.16.143.211]:60120 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_1) (envelope-from ) id 1c4xhK-0002sd-VE; Thu, 10 Nov 2016 15:19:55 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 04/20] Use gdbpy_enter in py-finishbreakpoint.c Date: Thu, 10 Nov 2016 22:20:00 -0000 Message-Id: <1478816387-27064-5-git-send-email-tom@tromey.com> In-Reply-To: <1478816387-27064-1-git-send-email-tom@tromey.com> References: <1478816387-27064-1-git-send-email-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1c4xhK-0002sd-VE X-Source-Sender: 174-16-143-211.hlrn.qwest.net (bapiya.Home) [174.16.143.211]:60120 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-SW-Source: 2016-11/txt/msg00255.txt.bz2 Change py-finishbreakpoint.c to use gdbpy_enter. 2016-11-10 Tom Tromey * python/py-finishbreakpoint.c (bpfinishpy_handle_stop) (bpfinishpy_handle_exit): Use gdbpy_enter. --- gdb/ChangeLog | 5 +++++ gdb/python/py-finishbreakpoint.c | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2478e7e..2deede2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2016-11-10 Tom Tromey + * python/py-finishbreakpoint.c (bpfinishpy_handle_stop) + (bpfinishpy_handle_exit): Use gdbpy_enter. + +2016-11-10 Tom Tromey + * python/py-cmd.c (cmdpy_destroyer) (cmdpy_completer_handle_brkchars, cmdpy_completer): Use gdbpy_enter. diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c index 74d225b..fdac696 100644 --- a/gdb/python/py-finishbreakpoint.c +++ b/gdb/python/py-finishbreakpoint.c @@ -392,13 +392,10 @@ bpfinishpy_detect_out_scope_cb (struct breakpoint *b, void *args) static void bpfinishpy_handle_stop (struct bpstats *bs, int print_frame) { - struct cleanup *cleanup = ensure_python_env (get_current_arch (), - current_language); + gdbpy_enter enter_py (get_current_arch (), current_language); iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb, bs == NULL ? NULL : bs->breakpoint_at); - - do_cleanups (cleanup); } /* Attached to `exit' notifications, triggers all the necessary out of @@ -407,12 +404,9 @@ bpfinishpy_handle_stop (struct bpstats *bs, int print_frame) static void bpfinishpy_handle_exit (struct inferior *inf) { - struct cleanup *cleanup = ensure_python_env (target_gdbarch (), - current_language); + gdbpy_enter enter_py (target_gdbarch (), current_language); iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb, NULL); - - do_cleanups (cleanup); } /* Initialize the Python finish breakpoint code. */ -- 2.7.4