From c4d68c00c4c6db39189790f54e3e16eed6fbd205 Mon Sep 17 00:00:00 2001 From: Thiago Jung Bauermann Date: Thu, 24 Apr 2025 22:29:01 -0300 Subject: [PATCH] Add bool argument to fetch only one register 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. --- gdb/aarch64-linux-nat.c | 4 ++-- gdb/aarch64-tdep.c | 4 ++-- gdb/aix-thread.c | 7 ++++--- gdb/amd-dbgapi-target.c | 7 ++++--- gdb/bsd-uthread.c | 7 ++++--- gdb/corelow.c | 7 ++++--- gdb/inf-child.h | 2 +- gdb/ravenscar-thread.c | 8 ++++---- gdb/record-btrace.c | 7 ++++--- gdb/record-full.c | 4 ++-- gdb/regcache.c | 14 ++++++++------ gdb/regcache.h | 23 ++++++++++++++++------- gdb/remote.c | 7 ++++--- gdb/sol-thread.c | 7 ++++--- gdb/target-delegates-gen.c | 19 ++++++++++--------- gdb/target.c | 5 +++-- gdb/target.h | 12 +++++++++--- gdb/tracectf.c | 5 +++-- gdb/tracefile-tfile.c | 5 +++-- 19 files changed, 91 insertions(+), 63 deletions(-) diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index a9b02de99b0..c13dfeba29e 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -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); diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index b72a3d5aa9f..c119554bb06 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -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; diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 2fd6121d904..411428c546e 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -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 ()); diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c index 8e067b66bd8..ccdb198e76a 100644 --- a/gdb/amd-dbgapi-target.c +++ b/gdb/amd-dbgapi-target.c @@ -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; } diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c index 51dafeda34f..99a75bf31a1 100644 --- a/gdb/bsd-uthread.c +++ b/gdb/bsd-uthread.c @@ -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 diff --git a/gdb/corelow.c b/gdb/corelow.c index 45187816d78..22a0114021c 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -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))) diff --git a/gdb/inf-child.h b/gdb/inf-child.h index 79b51579f30..73ce206eb68 100644 --- a/gdb/inf-child.h +++ b/gdb/inf-child.h @@ -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; diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c index 13258c46234..5361df34fbf 100644 --- a/gdb/ravenscar-thread.c +++ b/gdb/ravenscar-thread.c @@ -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 diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index 2d71b72ec51..6c983305061 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -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. */ diff --git a/gdb/record-full.c b/gdb/record-full.c index ffedafbbede..1002149b25a 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -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) { diff --git a/gdb/regcache.c b/gdb/regcache.c index fd0824da5b8..a78dcd84bf6 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -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 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 dst) +readable_regcache::raw_read (int regnum, gdb::array_view 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); diff --git a/gdb/regcache.h b/gdb/regcache.h index 8688bfde862..f62d67c4f84 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -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 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 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> 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 {} }; diff --git a/gdb/remote.c b/gdb/remote.c index ea3c254a770..ae2404589ad 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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) diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index ae1e5c07457..f3afd9f7911 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -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; } diff --git a/gdb/target-delegates-gen.c b/gdb/target-delegates-gen.c index 164ddbb9a2e..716a4444786 100644 --- a/gdb/target-delegates-gen.c +++ b/gdb/target-delegates-gen.c @@ -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 diff --git a/gdb/target.c b/gdb/target.c index 4a1964e664b..e6e70997147 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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 ()); } diff --git a/gdb/target.h b/gdb/target.h index 004494dc3c4..6222082ef75 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -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 diff --git a/gdb/tracectf.c b/gdb/tracectf.c index 1650e676d81..480b19b0763 100644 --- a/gdb/tracectf.c +++ b/gdb/tracectf.c @@ -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; diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c index c2b5e3b711f..a4da5d17159 100644 --- a/gdb/tracefile-tfile.c +++ b/gdb/tracefile-tfile.c @@ -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; -- 2.47.2