const-fy regcache::m_aspace
[deliverable/binutils-gdb.git] / gdb / record-full.c
index a3283d3942dc7963b52712b375cae68f62968a8b..6fc29d6170ddfddf3123f7a9df1f1d717057bc8c 100644 (file)
@@ -244,7 +244,7 @@ static inline struct record_full_entry *
 record_full_reg_alloc (struct regcache *regcache, int regnum)
 {
   struct record_full_entry *rec;
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
 
   rec = XCNEW (struct record_full_entry);
   rec->type = record_full_reg;
@@ -569,7 +569,7 @@ static void
 record_full_message (struct regcache *regcache, enum gdb_signal signal)
 {
   int ret;
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
   struct cleanup *old_cleanups
     = make_cleanup (record_full_arch_list_cleanups, 0);
 
@@ -743,7 +743,7 @@ record_full_exec_insn (struct regcache *regcache,
                       not doing the change at all if the watchpoint
                       traps.  */
                    if (hardware_watchpoint_inserted_in_range
-                       (get_regcache_aspace (regcache),
+                       (regcache->aspace (),
                         entry->u.mem.addr, entry->u.mem.len))
                      record_full_stop_reason = TARGET_STOPPED_BY_WATCHPOINT;
                  }
@@ -775,7 +775,7 @@ static void
 record_full_core_open_1 (const char *name, int from_tty)
 {
   struct regcache *regcache = get_current_regcache ();
-  int regnum = gdbarch_num_regs (get_regcache_arch (regcache));
+  int regnum = gdbarch_num_regs (regcache->arch ());
   int i;
 
   /* Get record_full_core_regbuf.  */
@@ -1098,7 +1098,6 @@ record_full_wait_1 (struct target_ops *ops,
                  && status->value.sig == GDB_SIGNAL_TRAP)
                {
                  struct regcache *regcache;
-                 struct address_space *aspace;
                  enum target_stop_reason *stop_reason_p
                    = &record_full_stop_reason;
 
@@ -1109,7 +1108,7 @@ record_full_wait_1 (struct target_ops *ops,
                  registers_changed ();
                  regcache = get_current_regcache ();
                  tmp_pc = regcache_read_pc (regcache);
-                 aspace = get_regcache_aspace (regcache);
+                 const struct address_space *aspace = regcache->aspace ();
 
                  if (target_stopped_by_watchpoint ())
                    {
@@ -1171,8 +1170,8 @@ record_full_wait_1 (struct target_ops *ops,
   else
     {
       struct regcache *regcache = get_current_regcache ();
-      struct gdbarch *gdbarch = get_regcache_arch (regcache);
-      struct address_space *aspace = get_regcache_aspace (regcache);
+      struct gdbarch *gdbarch = regcache->arch ();
+      const struct address_space *aspace = regcache->aspace ();
       int continue_flag = 1;
       int first_record_full_end = 1;
       struct cleanup *old_cleanups
@@ -1405,7 +1404,7 @@ record_full_registers_change (struct regcache *regcache, int regnum)
     {
       int i;
 
-      for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
+      for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++)
        {
          if (record_full_arch_list_add_reg (regcache, i))
            {
@@ -1462,7 +1461,7 @@ record_full_store_registers (struct target_ops *ops,
              query (_("Because GDB is in replay mode, changing the value "
                       "of a register will make the execution log unusable "
                       "from this point onward.  Change register %s?"),
-                     gdbarch_register_name (get_regcache_arch (regcache),
+                     gdbarch_register_name (regcache->arch (),
                                               regno));
 
          if (!n)
@@ -1474,7 +1473,7 @@ record_full_store_registers (struct target_ops *ops,
                  int i;
 
                  for (i = 0;
-                      i < gdbarch_num_regs (get_regcache_arch (regcache));
+                      i < gdbarch_num_regs (regcache->arch ());
                       i++)
                    regcache_invalidate (regcache, i);
                }
@@ -2029,7 +2028,7 @@ record_full_core_fetch_registers (struct target_ops *ops,
 {
   if (regno < 0)
     {
-      int num = gdbarch_num_regs (get_regcache_arch (regcache));
+      int num = gdbarch_num_regs (regcache->arch ());
       int i;
 
       for (i = 0; i < num; i ++)
@@ -2548,7 +2547,7 @@ record_full_save (struct target_ops *self, const char *recfilename)
 
   /* Get the values of regcache and gdbarch.  */
   regcache = get_current_regcache ();
-  gdbarch = get_regcache_arch (regcache);
+  gdbarch = regcache->arch ();
 
   /* Disable the GDB operation record.  */
   scoped_restore restore_operation_disable
@@ -2734,7 +2733,7 @@ record_full_goto_insn (struct record_full_entry *entry,
   scoped_restore restore_operation_disable
     = record_full_gdb_operation_disable_set ();
   struct regcache *regcache = get_current_regcache ();
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
 
   /* Assume everything is valid: we will hit the entry,
      and we will not hit the end of the recording.  */
@@ -2755,7 +2754,7 @@ record_full_goto_insn (struct record_full_entry *entry,
 /* Alias for "target record-full".  */
 
 static void
-cmd_record_full_start (char *args, int from_tty)
+cmd_record_full_start (const char *args, int from_tty)
 {
   execute_command ((char *) "target record-full", from_tty);
 }
@@ -2778,10 +2777,10 @@ set_record_full_insn_max_num (char *args, int from_tty,
 /* The "set record full" command.  */
 
 static void
-set_record_full_command (char *args, int from_tty)
+set_record_full_command (const char *args, int from_tty)
 {
   printf_unfiltered (_("\"set record full\" must be followed "
-                      "by an apporpriate subcommand.\n"));
+                      "by an appropriate subcommand.\n"));
   help_list (set_record_full_cmdlist, "set record full ", all_commands,
             gdb_stdout);
 }
@@ -2789,7 +2788,7 @@ set_record_full_command (char *args, int from_tty)
 /* The "show record full" command.  */
 
 static void
-show_record_full_command (char *args, int from_tty)
+show_record_full_command (const char *args, int from_tty)
 {
   cmd_show_list (show_record_full_cmdlist, from_tty, "");
 }
This page took 0.043806 seconds and 4 git commands to generate.