This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 06/13] gdbarch software_single_step frame_info to regcache: moxie
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 14 Nov 2016 17:42:43 +0000
- Subject: [PATCH 06/13] gdbarch software_single_step frame_info to regcache: moxie
- Authentication-results: sourceware.org; auth=none
- References: <1479145370-11432-1-git-send-email-yao.qi@linaro.org>
gdb:
2016-11-10 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.
---
gdb/moxie-tdep.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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);
--
1.9.1