aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-11-22 14:05:05 +0000
committerYao Qi <yao.qi@linaro.org>2016-11-22 14:05:05 +0000
commita8f341826d63a5c216c41e10bf1e4e6c3db3ce65 (patch)
treeda1398db405cfe68cd6ee74a7abfbb718a9f31d2
parent7113a196bac7f1134bcdd79ad3e6badcb5d77f95 (diff)
downloadgdb-a8f341826d63a5c216c41e10bf1e4e6c3db3ce65.zip
gdb-a8f341826d63a5c216c41e10bf1e4e6c3db3ce65.tar.gz
gdb-a8f341826d63a5c216c41e10bf1e4e6c3db3ce65.tar.bz2
gdbarch software_single_step frame_info to regcache: moxie
gdb: 2016-11-22 Yao Qi <yao.qi@linaro.org> * moxie-tdep.c (moxie_software_single_step): Call get_regcache_arch instead of get_frame_arch. Call regcache_read_pc instead of get_frame_pc.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/moxie-tdep.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 63cbd47..77f9887 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2016-11-22 Yao Qi <yao.qi@linaro.org>
+ * moxie-tdep.c (moxie_software_single_step): Call
+ get_regcache_arch instead of get_frame_arch. Call
+ regcache_read_pc instead of get_frame_pc.
+
+2016-11-22 Yao Qi <yao.qi@linaro.org>
+
* mips-tdep.c (mips32_bc1_pc): Replace parameter frame with
regcache. Call regcache_raw_get_unsigned instead of
get_frame_register_unsigned.
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index b341945..90a6165 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -302,17 +302,17 @@ moxie_process_readu (CORE_ADDR addr, gdb_byte *buf,
static VEC (CORE_ADDR) *
moxie_software_single_step (struct frame_info *frame)
{
- struct gdbarch *gdbarch = get_frame_arch (frame);
+ struct regcache *regcache = get_current_regcache ();
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
CORE_ADDR addr;
gdb_byte buf[4];
uint16_t inst;
uint32_t tmpu32;
ULONGEST fp;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct regcache *regcache = get_current_regcache ();
VEC (CORE_ADDR) *next_pcs = NULL;
- addr = get_frame_pc (frame);
+ addr = regcache_read_pc (regcache);
inst = (uint16_t) moxie_process_readu (addr, buf, 2, byte_order);