aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-11-22 14:05:04 +0000
committerYao Qi <yao.qi@linaro.org>2016-11-22 14:05:04 +0000
commit5b6e2eee087cf206d5c2bf1f9523217aaf5938aa (patch)
tree5a68591203669d0689dd6256b07136bc178e9cea
parent7ab2d0874025af6ee858b32c576f2461c0a1df3d (diff)
downloadgdb-5b6e2eee087cf206d5c2bf1f9523217aaf5938aa.zip
gdb-5b6e2eee087cf206d5c2bf1f9523217aaf5938aa.tar.gz
gdb-5b6e2eee087cf206d5c2bf1f9523217aaf5938aa.tar.bz2
gdbarch software_single_step frame_info to regcache: cris
gdb: 2016-11-22 Yao Qi <yao.qi@linaro.org> * cris-tdep.c (find_step_target): Replace parameter frame with regcache. Call get_regcache_arch instead of get_frame_arch. Call regcache_raw_get_unsigned instead of get_frame_register_unsigned. (cris_software_single_step): Call get_regcache_arch instead of get_frame_arch.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/cris-tdep.c13
2 files changed, 16 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 63a594b..6cf4209 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2016-11-22 Yao Qi <yao.qi@linaro.org>
+ * cris-tdep.c (find_step_target): Replace parameter frame
+ with regcache. Call get_regcache_arch instead of
+ get_frame_arch. Call regcache_raw_get_unsigned instead of
+ get_frame_register_unsigned.
+ (cris_software_single_step): Call get_regcache_arch instead
+ of get_frame_arch.
+
+2016-11-22 Yao Qi <yao.qi@linaro.org>
+
* alpha-tdep.c (alpha_deal_with_atomic_sequence): Call
get_regcache_arch instead of get_frame_arch. Call
regcache_read_pc instead of get_frame_pc.
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 460e7eb..6b060ea 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -1989,25 +1989,25 @@ find_cris_op (unsigned short insn, inst_env_type *inst_env)
actually an internal error. */
static int
-find_step_target (struct frame_info *frame, inst_env_type *inst_env)
+find_step_target (struct regcache *regcache, inst_env_type *inst_env)
{
int i;
int offset;
unsigned short insn;
- struct gdbarch *gdbarch = get_frame_arch (frame);
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* Create a local register image and set the initial state. */
for (i = 0; i < NUM_GENREGS; i++)
{
inst_env->reg[i] =
- (unsigned long) get_frame_register_unsigned (frame, i);
+ (unsigned long) regcache_raw_get_unsigned (regcache, i);
}
offset = NUM_GENREGS;
for (i = 0; i < NUM_SPECREGS; i++)
{
inst_env->preg[i] =
- (unsigned long) get_frame_register_unsigned (frame, offset + i);
+ (unsigned long) regcache_raw_get_unsigned (regcache, offset + i);
}
inst_env->branch_found = 0;
inst_env->slot_needed = 0;
@@ -2063,13 +2063,14 @@ find_step_target (struct frame_info *frame, inst_env_type *inst_env)
static VEC (CORE_ADDR) *
cris_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);
inst_env_type inst_env;
VEC (CORE_ADDR) *next_pcs = NULL;
/* Analyse the present instruction environment and insert
breakpoints. */
- int status = find_step_target (frame, &inst_env);
+ int status = find_step_target (regcache, &inst_env);
if (status == -1)
{
/* Could not find a target. Things are likely to go downhill