From patchwork Sat Jun 11 02:42:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 12975 Received: (qmail 102821 invoked by alias); 11 Jun 2016 02:42:39 -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 102720 invoked by uid 89); 11 Jun 2016 02:42:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_00, FSL_HELO_HOME, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=no version=3.3.2 spammy=HX-Identified-User:sentby, HX-Identified-User:authed, HX-Identified-User:auth, 2357 X-HELO: gproxy9-pub.mail.unifiedlayer.com Received: from gproxy9-pub.mail.unifiedlayer.com (HELO gproxy9-pub.mail.unifiedlayer.com) (69.89.20.122) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Sat, 11 Jun 2016 02:42:19 +0000 Received: (qmail 20326 invoked by uid 0); 11 Jun 2016 02:42:17 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy9.mail.unifiedlayer.com with SMTP; 11 Jun 2016 02:42:17 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id 5EiB1t00L2f2jeq01EiE3F; Fri, 10 Jun 2016 20:42:17 -0600 X-Authority-Analysis: v=2.1 cv=ecGuId0H 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=PnD2wP_eR3oA:10 a=7XZj0uCbPdcA:10 a=pD_ry4oyNxEA:10 a=zstS-IiYAAAA:8 a=fP-SFwWEO8JpzV-OG3MA:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from [75.171.172.174] (port=42966 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1bBYsE-0007Oc-VK; Fri, 10 Jun 2016 20:42:11 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 1/3] Clear frame cache when loading or unloading a JIT unwinder Date: Fri, 10 Jun 2016 20:42:01 -0600 Message-Id: <1465612923-24880-2-git-send-email-tom@tromey.com> In-Reply-To: <1465612923-24880-1-git-send-email-tom@tromey.com> References: <1465612923-24880-1-git-send-email-tom@tromey.com> X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 75.171.172.174 authed with tom+tromey.com} X-Exim-ID: 1bBYsE-0007Oc-VK X-Source-Sender: (bapiya.Home) [75.171.172.174]:42966 X-Source-Auth: tom+tromey.com X-Email-Count: 0 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== It seemed to me that gdb should flush the frame cache when loading or unloading a JIT unwinder. This makes testing a JIT unwinder a bit simpler. jit-reader-load apparently has no tests in-tree, so I didn't add a new test here. 2016-06-09 Tom Tromey * jit.c (jit_reader_load_command, jit_reader_unload_command): Call reinit_frame_cache. --- gdb/ChangeLog | 5 +++++ gdb/jit.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 335476b..04609c0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-06-09 Tom Tromey + + * jit.c (jit_reader_load_command, jit_reader_unload_command): Call + reinit_frame_cache. + 2016-06-10 Tom Tromey * gdbtypes.c (arch_type, arch_integer_type, arch_character_type) diff --git a/gdb/jit.c b/gdb/jit.c index 9fd5ae6..9bb2da5 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -218,6 +218,7 @@ jit_reader_load_command (char *args, int from_tty) prev_cleanup = make_cleanup (xfree, so_name); loaded_jit_reader = jit_reader_load (so_name); + reinit_frame_cache (); do_cleanups (prev_cleanup); } @@ -234,6 +235,7 @@ jit_reader_unload_command (char *args, int from_tty) gdb_dlclose (loaded_jit_reader->handle); xfree (loaded_jit_reader); loaded_jit_reader = NULL; + reinit_frame_cache (); } /* Per-program space structure recording which objfile has the JIT