This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] rx-tdep.c: Use target_read_code instead of target_read_memory.
- From: Kevin Buettner <kevinb at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 10 Jul 2015 20:15:08 -0000
- Subject: [binutils-gdb] rx-tdep.c: Use target_read_code instead of target_read_memory.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a0e28e54675fd92e73df71fed5d4f6c718f40102
commit a0e28e54675fd92e73df71fed5d4f6c718f40102
Author: Kevin Buettner <kevinb@redhat.com>
Date: Thu Jul 9 16:05:31 2015 -0700
rx-tdep.c: Use target_read_code instead of target_read_memory.
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.
Diff:
---
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 <kevinb@redhat.com>
+
+ * rx-tdep.c (rx_get_opcode_byte): Use target_read_code instead
+ of target_read_memory.
+
2015-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
* 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;