diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-11-22 14:05:04 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-11-22 14:05:04 +0000 |
commit | 0187a92f57b516f7171e70bec46701cfdaa6c6bd (patch) | |
tree | 9baa6282b526d8eec9d65166ed76cff4db00ec84 | |
parent | 9fd15b2e80452f03edb3fb36c2b4c36d05f4ef4e (diff) | |
download | gdb-0187a92f57b516f7171e70bec46701cfdaa6c6bd.zip gdb-0187a92f57b516f7171e70bec46701cfdaa6c6bd.tar.gz gdb-0187a92f57b516f7171e70bec46701cfdaa6c6bd.tar.bz2 |
gdbarch software_single_step frame_info to regcache: aarch64
Use regcache in software_single_step.
gdb:
2016-11-22 Yao Qi <yao.qi@linaro.org>
* aarch64-tdep.c (aarch64_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/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/aarch64-tdep.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2b04ea4..4f44ea5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2016-11-22 Yao Qi <yao.qi@linaro.org> + * aarch64-tdep.c (aarch64_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> + * regcache.c (regcache_raw_get_signed): New function. * regcache.h (regcache_raw_get_signed): Declare. diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index b5a88cc..62ee3c5 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -2227,11 +2227,12 @@ value_of_aarch64_user_reg (struct frame_info *frame, const void *baton) static VEC (CORE_ADDR) * aarch64_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); enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch); const int insn_size = 4; const int atomic_sequence_length = 16; /* Instruction sequence length. */ - CORE_ADDR pc = get_frame_pc (frame); + CORE_ADDR pc = regcache_read_pc (regcache); CORE_ADDR breaks[2] = { -1, -1 }; CORE_ADDR loc = pc; CORE_ADDR closing_insn = 0; |