gdbarch software_single_step frame_info to regcache: aarch64
authorYao Qi <yao.qi@linaro.org>
Tue, 22 Nov 2016 14:05:04 +0000 (14:05 +0000)
committerYao Qi <yao.qi@linaro.org>
Tue, 22 Nov 2016 14:05:04 +0000 (14:05 +0000)
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.

gdb/ChangeLog
gdb/aarch64-tdep.c

index 2b04ea4869654336d2aa50e34b9b7349db7bb00e..4f44ea5bc2332355a2d69a5d94d02660efe3c7f6 100644 (file)
@@ -1,3 +1,9 @@
+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.
index b5a88cc776dbabcedbc8697ee15d46fead84fcee..62ee3c5979f8e48ac6ca3785e90a340b5c9f0bdb 100644 (file)
@@ -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;