]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add bool argument to fetch only one register
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 25 Apr 2025 01:29:01 +0000 (22:29 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 25 Apr 2025 01:34:56 +0000 (22:34 -0300)
When trying to fetch the VG register in aarch64_fetch_tdesc_parameter,
remote_target::fetch_registers ends up fetching all registers using the
G packet.  This results in an infinite recursion because GDB will need
to get the VL parameter and thus fetch the VG register again.

To solve the problem, add bool signaling that the target should try to
get just the requested register.

This commit is incomplete because there are some fetch_register
implementations that were not changed to accept the extra argument.

A possibly better and less invasive option would be to add a new
fetch_registers method overload with the new argument to the target_ops
class with a default implementation that would just call the existing
2-arguments version.  This way, only the remote target would need to
override that implementation.  This isn't done here because
make-target-delegates.py doesn't support method overloads and would need
to be adapted.

19 files changed:
gdb/aarch64-linux-nat.c
gdb/aarch64-tdep.c
gdb/aix-thread.c
gdb/amd-dbgapi-target.c
gdb/bsd-uthread.c
gdb/corelow.c
gdb/inf-child.h
gdb/ravenscar-thread.c
gdb/record-btrace.c
gdb/record-full.c
gdb/regcache.c
gdb/regcache.h
gdb/remote.c
gdb/sol-thread.c
gdb/target-delegates-gen.c
gdb/target.c
gdb/target.h
gdb/tracectf.c
gdb/tracefile-tfile.c

index a9b02de99b029fc70d50b3b7bee68d153e4143ef..c13dfeba29e560b4edc5fa8497d850084667bcf4 100644 (file)
@@ -67,7 +67,7 @@ class aarch64_linux_nat_target final
 {
 public:
   /* Add our register access methods.  */
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   void store_registers (struct regcache *, int) override;
 
   const struct target_desc *read_description () override;
@@ -670,7 +670,7 @@ aarch32_fetch_registers (struct regcache *regcache, int regno)
 
 void
 aarch64_linux_nat_target::fetch_registers (struct regcache *regcache,
-                                          int regno)
+                                          int regno, bool only_this)
 {
   if (gdbarch_bfd_arch_info (regcache->arch ())->bits_per_word == 32)
     aarch32_fetch_registers (regcache, regno);
index b72a3d5aa9f8e1c6264bb07b1b4684aca149b1c3..c119554bb06bb2bfbebf8ebe851f86cfc40cfbb5 100644 (file)
@@ -4304,7 +4304,7 @@ aarch64_fetch_tdesc_parameter (gdbarch *gdbarch, readable_regcache *regcache,
       register_status status;
       gdb_byte buf[8];
 
-      status = regcache->raw_read (AARCH64_SVE_VG_REGNUM, buf);
+      status = regcache->raw_read (AARCH64_SVE_VG_REGNUM, buf, true);
       if (status != REG_VALID)
        return;
 
@@ -4323,7 +4323,7 @@ aarch64_fetch_tdesc_parameter (gdbarch *gdbarch, readable_regcache *regcache,
       register_status status;
       gdb_byte buf[8];
 
-      status = regcache->raw_read (AARCH64_SVE_VG_REGNUM, buf);
+      status = regcache->raw_read (AARCH64_SVE_VG_REGNUM, buf, true);
       if (status != REG_VALID)
        return;
 
index 2fd6121d9049e0edfb02695286973673ef4b037e..411428c546e5cdb0d43c7b52f387aef1fd3df3f6 100644 (file)
@@ -116,7 +116,7 @@ public:
   void resume (ptid_t, int, enum gdb_signal) override;
   ptid_t wait (ptid_t, struct target_waitstatus *, target_wait_flags) override;
 
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   void store_registers (struct regcache *, int) override;
 
   enum target_xfer_status xfer_partial (enum target_object object,
@@ -1443,7 +1443,8 @@ fetch_regs_kernel_thread (struct regcache *regcache, int regno,
    thread/process connected to REGCACHE.  */
 
 void
-aix_thread_target::fetch_registers (struct regcache *regcache, int regno)
+aix_thread_target::fetch_registers (struct regcache *regcache, int regno,
+                                   bool only_this)
 {
   struct thread_info *thread;
   pthdb_tid_t tid;
@@ -1453,7 +1454,7 @@ aix_thread_target::fetch_registers (struct regcache *regcache, int regno)
      exists.  */
 
   if (regcache->ptid ().tid () == 0)
-    beneath ()->fetch_registers (regcache, regno);
+    beneath ()->fetch_registers (regcache, regno, only_this);
   else
     {
       thread = current_inferior ()->find_thread (regcache->ptid ());
index 8e067b66bd868e01c9e729189e67eaed6d6d6149..ccdb198e76a060b8eaae6bdc5a7ce32861f995b9 100644 (file)
@@ -270,7 +270,7 @@ struct amd_dbgapi_target final : public target_ops
   void commit_resumed () override;
   void stop (ptid_t ptid) override;
 
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   void store_registers (struct regcache *, int) override;
 
   void update_thread_list () override;
@@ -1714,11 +1714,12 @@ amd_dbgapi_target::detach (inferior *inf, int from_tty)
 }
 
 void
-amd_dbgapi_target::fetch_registers (struct regcache *regcache, int regno)
+amd_dbgapi_target::fetch_registers (struct regcache *regcache, int regno,
+                                   bool only_this)
 {
   if (!ptid_is_gpu (regcache->ptid ()))
     {
-      beneath ()->fetch_registers (regcache, regno);
+      beneath ()->fetch_registers (regcache, regno, only_this);
       return;
     }
 
index 51dafeda34fe2732020ff117b5047adec690df86..99a75bf31a1162982ee595b8c510dc889b64e3e2 100644 (file)
@@ -50,7 +50,7 @@ struct bsd_uthread_target final : public target_ops
 
   void mourn_inferior () override;
 
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   void store_registers (struct regcache *, int) override;
 
   ptid_t wait (ptid_t, struct target_waitstatus *, target_wait_flags) override;
@@ -312,7 +312,8 @@ bsd_uthread_target::mourn_inferior ()
 }
 
 void
-bsd_uthread_target::fetch_registers (struct regcache *regcache, int regnum)
+bsd_uthread_target::fetch_registers (struct regcache *regcache, int regnum,
+                                    bool only_this)
 {
   struct gdbarch *gdbarch = regcache->arch ();
   struct bsd_uthread_ops *uthread_ops = get_bsd_uthread (gdbarch);
@@ -326,7 +327,7 @@ bsd_uthread_target::fetch_registers (struct regcache *regcache, int regnum)
   inferior_ptid = ptid;
 
   /* Always fetch the appropriate registers from the layer beneath.  */
-  beneath ()->fetch_registers (regcache, regnum);
+  beneath ()->fetch_registers (regcache, regnum, only_this);
 
   /* FIXME: That might have gotten us more than we asked for.  Make
      sure we overwrite all relevant registers with values from the
index 45187816d78ab0f8b32dbe6c89758712c272a892..22a0114021c71121b224aaa9c01bdcddff6e8ed5 100644 (file)
@@ -195,7 +195,7 @@ public:
 
   void close () override;
   void detach (inferior *, int) override;
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
 
   enum target_xfer_status xfer_partial (enum target_object object,
                                        const char *annex,
@@ -1411,10 +1411,11 @@ get_core_registers_cb (const char *sect_name, int supply_size, int collect_size,
    part, typically implemented in the xm-file for each
    architecture.  */
 
-/* We just get all the registers, so we don't use regno.  */
+/* We just get all the registers, so we don't use regno nor only_this.  */
 
 void
-core_target::fetch_registers (struct regcache *regcache, int regno)
+core_target::fetch_registers (struct regcache *regcache, int regno,
+                             bool only_this)
 {
   if (!(m_core_gdbarch != nullptr
        && gdbarch_iterate_over_regset_sections_p (m_core_gdbarch)))
index 79b51579f3016ee2365e7a6dfc2dc1d5e307f25b..73ce206eb681c26ad2b25a1e245c7f8759276de7 100644 (file)
@@ -39,7 +39,7 @@ public:
 
   void disconnect (const char *, int) override;
 
-  void fetch_registers (struct regcache *, int) override = 0;
+  void fetch_registers (struct regcache *, int, bool) override = 0;
   void store_registers (struct regcache *, int) override = 0;
 
   void prepare_to_store (struct regcache *) override;
index 13258c46234bc4f31b8efe9b220742acd9233cb4..5361df34fbfc6db6fe04c8435cdb679e3aaa41a1 100644 (file)
@@ -90,7 +90,7 @@ struct ravenscar_thread_target final : public target_ops
   ptid_t wait (ptid_t, struct target_waitstatus *, target_wait_flags) override;
   void resume (ptid_t, int, enum gdb_signal) override;
 
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   void store_registers (struct regcache *, int) override;
 
   void prepare_to_store (struct regcache *) override;
@@ -676,7 +676,7 @@ ravenscar_thread_target::get_fpu_state (struct regcache *regcache,
 
 void
 ravenscar_thread_target::fetch_registers (struct regcache *regcache,
-                                         int regnum)
+                                         int regnum, bool only_this)
 {
   ptid_t ptid = regcache->ptid ();
 
@@ -710,14 +710,14 @@ ravenscar_thread_target::fetch_registers (struct regcache *regcache,
          if (use_beneath)
            {
              temporarily_change_regcache_ptid changer (regcache, base);
-             beneath ()->fetch_registers (regcache, i);
+             beneath ()->fetch_registers (regcache, i, only_this);
            }
          else
            arch_ops->fetch_register (regcache, i);
        }
     }
   else
-    beneath ()->fetch_registers (regcache, regnum);
+    beneath ()->fetch_registers (regcache, regnum, only_this);
 }
 
 void
index 2d71b72ec516126d9471edf17000e7de6aaf1d3c..6c9833050615044d12b0910e8a276c44fdf15029 100644 (file)
@@ -110,7 +110,7 @@ public:
   int remove_breakpoint (struct gdbarch *, struct bp_target_info *,
                         enum remove_bp_reason) override;
 
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
 
   void store_registers (struct regcache *, int) override;
   void prepare_to_store (struct regcache *) override;
@@ -1589,7 +1589,8 @@ record_btrace_target::remove_breakpoint (struct gdbarch *gdbarch,
 /* The fetch_registers method of target record-btrace.  */
 
 void
-record_btrace_target::fetch_registers (struct regcache *regcache, int regno)
+record_btrace_target::fetch_registers (struct regcache *regcache, int regno,
+                                      bool only_this)
 {
   btrace_insn_iterator *replay = nullptr;
 
@@ -1622,7 +1623,7 @@ record_btrace_target::fetch_registers (struct regcache *regcache, int regno)
       regcache->raw_supply (regno, &insn->pc);
     }
   else
-    this->beneath ()->fetch_registers (regcache, regno);
+    this->beneath ()->fetch_registers (regcache, regno, only_this);
 }
 
 /* The store_registers method of target record-btrace.  */
index ffedafbbede531725f54fed763ec9a9e01b47005..1002149b25a407afd2be36639e899d270fded645 100644 (file)
@@ -309,7 +309,7 @@ public:
   void resume (ptid_t, int, enum gdb_signal) override;
   void disconnect (const char *, int) override;
   void kill () override;
-  void fetch_registers (struct regcache *regcache, int regno) override;
+  void fetch_registers (struct regcache *regcache, int regno, bool) override;
   void prepare_to_store (struct regcache *regcache) override;
   void store_registers (struct regcache *, int) override;
   enum target_xfer_status xfer_partial (enum target_object object,
@@ -2101,7 +2101,7 @@ record_full_core_target::kill ()
 
 void
 record_full_core_target::fetch_registers (struct regcache *regcache,
-                                         int regno)
+                                         int regno, bool only_this)
 {
   if (regno < 0)
     {
index fd0824da5b81572f96a6b987c5bdcdd11c33fda8..a78dcd84bf6fa72bb049b0737f834efd7277ec05 100644 (file)
@@ -830,7 +830,7 @@ registers_changed (void)
 }
 
 void
-regcache::raw_update (int regnum)
+regcache::raw_update (int regnum, bool only_this)
 {
   assert_regnum (regnum);
 
@@ -844,7 +844,7 @@ regcache::raw_update (int regnum)
       std::optional<scoped_restore_current_thread> maybe_restore_thread
        = maybe_switch_inferior (m_inf_for_target_calls);
 
-      target_fetch_registers (this, regnum);
+      target_fetch_registers (this, regnum, only_this);
 
       /* A number of targets can't access the whole set of raw
         registers (because the debug API provides no means to get at
@@ -855,12 +855,13 @@ regcache::raw_update (int regnum)
 }
 
 register_status
-readable_regcache::raw_read (int regnum, gdb::array_view<gdb_byte> dst)
+readable_regcache::raw_read (int regnum, gdb::array_view<gdb_byte> dst,
+                            bool only_this)
 {
   assert_regnum (regnum);
   gdb_assert (dst.size () == register_size (regnum));
 
-  raw_update (regnum);
+  raw_update (regnum, only_this);
 
   if (m_register_status[regnum] != REG_VALID)
     memset (dst.data (), 0, dst.size ());
@@ -2158,7 +2159,7 @@ public:
     xfer_partial_called = 0;
   }
 
-  void fetch_registers (regcache *regs, int regno) override;
+  void fetch_registers (regcache *regs, int regno, bool) override;
   void store_registers (regcache *regs, int regno) override;
 
   enum target_xfer_status xfer_partial (enum target_object object,
@@ -2173,7 +2174,8 @@ public:
 };
 
 void
-target_ops_no_register::fetch_registers (regcache *regs, int regno)
+target_ops_no_register::fetch_registers (regcache *regs, int regno,
+                                        bool only_this)
 {
   /* Mark register available.  */
   regs->raw_supply_zeroed (regno);
index 8688bfde8629d25a6d4d6b3ee6c533e0ffd3f78b..f62d67c4f8410eb9673afefe28181c34fe691e1b 100644 (file)
@@ -349,8 +349,13 @@ public:
   {}
 
   /* Transfer a raw register [0..NUM_REGS) from core-gdb to this regcache,
-     return its value in *BUF and return its availability status.  */
-  register_status raw_read (int regnum, gdb::array_view<gdb_byte> dst);
+     return its value in *BUF and return its availability status.
+
+     If ONLY_THIS is true, then don't try to fetch other registers in the
+     process of updating REGNUM.  This may be required when REGNUM is used
+     by a target_description parameter.  */
+  register_status raw_read (int regnum, gdb::array_view<gdb_byte> dst,
+                           bool only_this = false);
 
   /* Deprecated overload of the above.  */
   register_status raw_read (int regnum, gdb_byte *dst);
@@ -367,8 +372,12 @@ public:
                                 gdb_byte *dst)
   { return raw_read_part (regnum, offset, gdb::make_array_view (dst, len)); }
 
-  /* Make certain that the register REGNUM is up-to-date.  */
-  virtual void raw_update (int regnum) = 0;
+  /* Make certain that the register REGNUM is up-to-date.
+
+     If ONLY_THIS is true, then don't try to fetch other registers in the
+     process of updating REGNUM.  This may be required when REGNUM is used
+     by a target_description parameter.  */
+  virtual void raw_update (int regnum, bool only_this = false) = 0;
 
   /* Transfer a raw register [0..NUM_REGS+NUM_PSEUDO_REGS) from core-gdb to
      this regcache, return its value in DST and return its availability status.  */
@@ -417,7 +426,7 @@ public:
     : readable_regcache (gdbarch, has_pseudo)
   {}
 
-  void raw_update (int regnum) override
+  void raw_update (int regnum, bool only_this) override
   {}
 
   DISABLE_COPY_AND_ASSIGN (detached_regcache);
@@ -458,7 +467,7 @@ public:
   template<typename T, typename = RequireLongest<T>>
   void cooked_write (int regnum, T val);
 
-  void raw_update (int regnum) override;
+  void raw_update (int regnum, bool only_this = false) override;
 
   /* Partial transfer of raw registers.  Perform read, modify, write style
      operations.  */
@@ -580,7 +589,7 @@ public:
 
   DISABLE_COPY_AND_ASSIGN (readonly_detached_regcache);
 
-  void raw_update (int regnum) override
+  void raw_update (int regnum, bool only_this = false) override
   {}
 };
 
index ea3c254a7707803b01c173a55c7ce68110171cdd..ae2404589ad863af052d468418d5c221cb9aac6a 100644 (file)
@@ -878,7 +878,7 @@ public:
   ptid_t wait (ptid_t, struct target_waitstatus *, target_wait_flags) override;
   bool has_pending_events () override;
 
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   void store_registers (struct regcache *, int) override;
   void prepare_to_store (struct regcache *) override;
 
@@ -9145,7 +9145,8 @@ remote_target::set_remote_traceframe ()
 }
 
 void
-remote_target::fetch_registers (struct regcache *regcache, int regnum)
+remote_target::fetch_registers (struct regcache *regcache, int regnum,
+                               bool only_this)
 {
   struct gdbarch *gdbarch = regcache->arch ();
   struct remote_state *rs = get_remote_state ();
@@ -9165,7 +9166,7 @@ remote_target::fetch_registers (struct regcache *regcache, int regnum)
         we are likely to read more than one register.  If this is the
         first 'g' packet, we might be overly optimistic about its
         contents, so fall back to 'p'.  */
-      if (reg->in_g_packet)
+      if (!only_this && reg->in_g_packet)
        {
          fetch_registers_using_g (regcache);
          if (reg->in_g_packet)
index ae1e5c0745736f19328c460282a74eb332ef40fd..f3afd9f79119fd36cc5c4d21972eb811bea4758a 100644 (file)
@@ -89,7 +89,7 @@ public:
   std::string pid_to_str (ptid_t) override;
   ptid_t get_ada_task_ptid (long lwp, ULONGEST thread) override;
 
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   void store_registers (struct regcache *, int) override;
 
   enum target_xfer_status xfer_partial (enum target_object object,
@@ -468,7 +468,8 @@ sol_thread_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
 }
 
 void
-sol_thread_target::fetch_registers (struct regcache *regcache, int regnum)
+sol_thread_target::fetch_registers (struct regcache *regcache, int regnum,
+                                   bool only_this)
 {
   thread_t thread;
   td_thrhandle_t thandle;
@@ -482,7 +483,7 @@ sol_thread_target::fetch_registers (struct regcache *regcache, int regnum)
   if (!ptid.tid_p ())
     {
       /* It's an LWP; pass the request on to the layer beneath.  */
-      beneath ()->fetch_registers (regcache, regnum);
+      beneath ()->fetch_registers (regcache, regnum, only_this);
       return;
     }
 
index 164ddbb9a2ea2da5fe4e02f78c3fa82d5e9eaf18..716a444478674a4027110d165a5dcbd7fc9f75c2 100644 (file)
@@ -36,7 +36,7 @@ struct dummy_target : public target_ops
   void resume (ptid_t arg0, int arg1, enum gdb_signal arg2) override;
   void commit_resumed () override;
   ptid_t wait (ptid_t arg0, struct target_waitstatus *arg1, target_wait_flags arg2) override;
-  void fetch_registers (struct regcache *arg0, int arg1) override;
+  void fetch_registers (struct regcache *arg0, int arg1, bool arg2) override;
   void store_registers (struct regcache *arg0, int arg1) override;
   void prepare_to_store (struct regcache *arg0) override;
   void files_info () override;
@@ -217,7 +217,7 @@ struct debug_target : public target_ops
   void resume (ptid_t arg0, int arg1, enum gdb_signal arg2) override;
   void commit_resumed () override;
   ptid_t wait (ptid_t arg0, struct target_waitstatus *arg1, target_wait_flags arg2) override;
-  void fetch_registers (struct regcache *arg0, int arg1) override;
+  void fetch_registers (struct regcache *arg0, int arg1, bool arg2) override;
   void store_registers (struct regcache *arg0, int arg1) override;
   void prepare_to_store (struct regcache *arg0) override;
   void files_info () override;
@@ -524,25 +524,26 @@ debug_target::wait (ptid_t arg0, struct target_waitstatus *arg1, target_wait_fla
 }
 
 void
-target_ops::fetch_registers (struct regcache *arg0, int arg1)
+target_ops::fetch_registers (struct regcache *arg0, int arg1, bool arg2)
 {
-  this->beneath ()->fetch_registers (arg0, arg1);
+  this->beneath ()->fetch_registers (arg0, arg1, arg2);
 }
 
 void
-dummy_target::fetch_registers (struct regcache *arg0, int arg1)
+dummy_target::fetch_registers (struct regcache *arg0, int arg1, bool arg2)
 {
 }
 
 void
-debug_target::fetch_registers (struct regcache *arg0, int arg1)
+debug_target::fetch_registers (struct regcache *arg0, int arg1, bool arg2)
 {
   target_debug_printf_nofunc ("-> %s->fetch_registers (...)", this->beneath ()->shortname ());
-  this->beneath ()->fetch_registers (arg0, arg1);
-  target_debug_printf_nofunc ("<- %s->fetch_registers (%s, %s)",
+  this->beneath ()->fetch_registers (arg0, arg1, arg2);
+  target_debug_printf_nofunc ("<- %s->fetch_registers (%s, %s, %s)",
              this->beneath ()->shortname (),
              target_debug_print_regcache_p (arg0).c_str (),
-             target_debug_print_int (arg1).c_str ());
+             target_debug_print_int (arg1).c_str (),
+             target_debug_print_bool (arg2).c_str ());
 }
 
 void
index 4a1964e664b3b34b36d4787d6ddf8f16c2f91bab..e6e70997147bbdc68cb275e753aa3a8b10396256 100644 (file)
@@ -3899,9 +3899,10 @@ target_options_to_string (target_wait_flags target_options)
 }
 
 void
-target_fetch_registers (struct regcache *regcache, int regno)
+target_fetch_registers (struct regcache *regcache, int regno, bool only_this)
 {
-  current_inferior ()->top_target ()->fetch_registers (regcache, regno);
+  current_inferior ()->top_target ()->fetch_registers (regcache, regno,
+                                                      only_this);
   target_debug_printf ("%s", regcache->register_debug_string (regno).c_str ());
 }
 
index 004494dc3c484a2ba46f65206e21e1687098ddbb..6222082ef757aeb0899eabdcf631b409d0689c1f 100644 (file)
@@ -526,7 +526,7 @@ struct target_ops
     virtual ptid_t wait (ptid_t, struct target_waitstatus *,
                         target_wait_flags options)
       TARGET_DEFAULT_FUNC (default_target_wait);
-    virtual void fetch_registers (struct regcache *, int)
+    virtual void fetch_registers (struct regcache *, int, bool)
       TARGET_DEFAULT_IGNORE ();
     virtual void store_registers (struct regcache *, int)
       TARGET_DEFAULT_NORETURN (noprocess ());
@@ -1584,9 +1584,15 @@ extern ptid_t default_target_wait (struct target_ops *ops,
 
 extern bool target_has_pending_events ();
 
-/* Fetch at least register REGNO, or all regs if regno == -1.  No result.  */
+/* Fetch at least register REGNO, or all regs if regno == -1.  No result.
 
-extern void target_fetch_registers (struct regcache *regcache, int regno);
+   If ONLY_THIS is true, then try to minimize the number of registers
+   fetched in the process of updating REGNUM.  This may be required when
+   REGNUM is used by a target_description parameter.
+   */
+
+extern void target_fetch_registers (struct regcache *regcache, int regno,
+                                   bool only_this = false);
 
 /* Store at least register REGNO, or all regs if REGNO == -1.
    It can store as many registers as it wants to, so target_prepare_to_store
index 1650e676d8143c3802c382a51a3ee605105fcc99..480b19b0763cef96e2e8220b7e89fcf52f9c422c 100644 (file)
@@ -839,7 +839,7 @@ public:
   { return ctf_target_info; }
 
   void close () override;
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   enum target_xfer_status xfer_partial (enum target_object object,
                                                const char *annex,
                                                gdb_byte *readbuf,
@@ -1207,7 +1207,8 @@ ctf_target::files_info ()
    If no matched events are found, mark registers unavailable.  */
 
 void
-ctf_target::fetch_registers (struct regcache *regcache, int regno)
+ctf_target::fetch_registers (struct regcache *regcache, int regno,
+                            bool only_this)
 {
   struct gdbarch *gdbarch = regcache->arch ();
   struct bt_ctf_event *event = NULL;
index c2b5e3b711f4f89ce4153c41ff75c1b92687e3df..a4da5d1715960268230e7195cdd65014cc326165 100644 (file)
@@ -54,7 +54,7 @@ class tfile_target final : public tracefile_target
   { return tfile_target_info; }
 
   void close () override;
-  void fetch_registers (struct regcache *, int) override;
+  void fetch_registers (struct regcache *, int, bool) override;
   enum target_xfer_status xfer_partial (enum target_object object,
                                                const char *annex,
                                                gdb_byte *readbuf,
@@ -847,7 +847,8 @@ traceframe_find_block_type (char type_wanted, int pos)
    requested register from it.  */
 
 void
-tfile_target::fetch_registers (struct regcache *regcache, int regno)
+tfile_target::fetch_registers (struct regcache *regcache, int regno,
+                              bool only_this)
 {
   struct gdbarch *gdbarch = regcache->arch ();
   int offset, regn, regsize, dummy;