]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
rx-tdep.c: Use target_read_code instead of target_read_memory.
authorKevin Buettner <kevinb@redhat.com>
Thu, 9 Jul 2015 23:05:31 +0000 (16:05 -0700)
committerKevin Buettner <kevinb@redhat.com>
Fri, 10 Jul 2015 20:14:32 +0000 (13:14 -0700)
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
gdb/rx-tdep.c

index 8ab1330e9bd80dbbf9f33fd05335a43e0c9d4c8e..507042819cc77d5e4ea99f1d9b9fb9a03dcd60ce 100644 (file)
@@ -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
index 8442c765f89ea5a938c8a0354bf3a7b97fa3e001..0bd91ff5f4b6221497aa31d6da55b4c035abf8b5 100644 (file)
@@ -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;