diff options
author | Thiago Jung Bauermann <thiago.bauermann@linaro.org> | 2025-04-27 23:57:56 -0300 |
---|---|---|
committer | Thiago Jung Bauermann <thiago.bauermann@linaro.org> | 2025-04-28 02:50:10 -0300 |
commit | 63603295544821124aa5bed9f0e153d0c809f01a (patch) | |
tree | b04a2ccf3be690001ca976dc4482bfa37b14e4e2 | |
parent | 76f72769715a959fa98482f201ca9967950490db (diff) | |
download | binutils-63603295544821124aa5bed9f0e153d0c809f01a.zip binutils-63603295544821124aa5bed9f0e153d0c809f01a.tar.gz binutils-63603295544821124aa5bed9f0e153d0c809f01a.tar.bz2 |
GDB: linux-nat: Make tdesc parameters available early
Otherwise reg_buffer::initialize_variable_size_registers () won't be
able to resolve the types of variable-size registers.
-rw-r--r-- | gdb/linux-nat.c | 11 | ||||
-rw-r--r-- | gdb/linux-nat.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 2f98060..72d1448 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -4637,6 +4637,17 @@ linux_nat_target::supports_set_thread_options (gdb_thread_options options) return ((options & supported_options) == options); } +/* See gdb/process-stratum-target.h. */ + +void +linux_nat_target::supply_early_registers (regcache *regcache) +{ + if (regcache->has_variable_size_registers ()) + /* We need the values of target description parameter early, so make + sure they're available. */ + regcache->update_tdesc_parameters (); +} + linux_nat_target::linux_nat_target () { /* We don't change the stratum; this target will sit at diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h index 6e53991..62f4296 100644 --- a/gdb/linux-nat.h +++ b/gdb/linux-nat.h @@ -192,6 +192,8 @@ public: recognizes SIGTRAP only. */ virtual bool low_status_is_event (int status); + void supply_early_registers (regcache *regcache) override; + protected: void post_startup_inferior (ptid_t) override; |