From patchwork Fri Jul 10 20:25:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Buettner X-Patchwork-Id: 7636 Received: (qmail 113433 invoked by alias); 10 Jul 2015 20:25:38 -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 113420 invoked by uid 89); 10 Jul 2015 20:25:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 10 Jul 2015 20:25:36 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 9E4CE8E6FA for ; Fri, 10 Jul 2015 20:25:35 +0000 (UTC) Received: from pinnacle.lan (ovpn-113-81.phx2.redhat.com [10.3.113.81]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6AKPYVA008285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO) for ; Fri, 10 Jul 2015 16:25:35 -0400 Date: Fri, 10 Jul 2015 13:25:32 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: [COMMITTED PATCH] rx-tdep.c: Use target_read_code instead of target_read_memory Message-ID: <20150710132532.5984807f@pinnacle.lan> MIME-Version: 1.0 X-IsSubscribed: yes This change causes the prologue scanner and the frame type scanner in rx-tdep.c to use target_read_code() instead of target_read_memory(). This change allows these instruction scanners to operate much more quickly due to the fact that target_read_code() can potentially read from a cache maintained by GDB. gdb/ChangeLog: * rx-tdep.c (rx_get_opcode_byte): Use target_read_code instead of target_read_memory. --- gdb/ChangeLog | 5 +++++ gdb/rx-tdep.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8ab1330..5070428 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-07-10 Kevin Buettner + + * rx-tdep.c (rx_get_opcode_byte): Use target_read_code instead + of target_read_memory. + 2015-07-10 Andrew Burgess * tui/tui-win.c (tui_set_win_height): Use a cleanup to free the diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c index 8442c76..0bd91ff 100644 --- a/gdb/rx-tdep.c +++ b/gdb/rx-tdep.c @@ -204,7 +204,7 @@ rx_get_opcode_byte (void *handle) int status; gdb_byte byte; - status = target_read_memory (opcdata->pc, &byte, 1); + status = target_read_code (opcdata->pc, &byte, 1); if (status == 0) { opcdata->pc += 1;