From 342119630e4612856017d03f2892f5a693d85d8e Mon Sep 17 00:00:00 2001 From: Michael Eager Date: Wed, 23 Jul 2014 19:27:20 -0700 Subject: [PATCH] This patch uses target_read_code instead of target_read_memory in microblaze_fetch instruction in order to use cache memory accesses requested in target_read_code. ChangeLog: 2014-06-17 Ajit Agarwal * microblaze-tdep.c (microblaze_fetch_instruction): Use of target_read_code. --- gdb/ChangeLog | 5 +++++ gdb/microblaze-tdep.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f6b97deabab..02f5e92dfbb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-07-23 Ajit Agarwal + + * microblaze-tdep.c (microblaze_fetch_instruction): Use of + target_read_code. + 2014-07-23 Chen Gang * microblaze-tdep.c (microblaze_dwarf2_reg_to_regnum): Check whether diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 9bec2602f29..93e93dbe567 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -130,7 +130,7 @@ microblaze_fetch_instruction (CORE_ADDR pc) gdb_byte buf[4]; /* If we can't read the instruction at PC, return zero. */ - if (target_read_memory (pc, buf, sizeof (buf))) + if (target_read_code (pc, buf, sizeof (buf))) return 0; return extract_unsigned_integer (buf, 4, byte_order); -- 2.30.2