diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-09-29 14:24:39 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-10-10 10:44:35 -0400 |
commit | d6bfbb5256e33c356e85dfa5de7d3eaa20714ddd (patch) | |
tree | 69308391ccf9733b2b813cdfafabcf4b942950a5 /gdb | |
parent | 99d9c3b92ca96a7425cbb6b1bf453ede9477a2ee (diff) | |
download | gdb-d6bfbb5256e33c356e85dfa5de7d3eaa20714ddd.zip gdb-d6bfbb5256e33c356e85dfa5de7d3eaa20714ddd.tar.gz gdb-d6bfbb5256e33c356e85dfa5de7d3eaa20714ddd.tar.bz2 |
gdb: scope down registers_changed call in inferior::set_arch
inferior::set_arch calls registers_changed, which invalidates all
regcaches. It would be enough to invalidate only regcaches of threads
belonging to this inferior. Call registers_changed_ptid instead, with
the proper process target / ptid. If the inferior does not have a
process target, there should be no regcaches for that inferior, so no
need to invalidate anything.
Change-Id: Id8b5500acb7f373b01a534f16d3a7d028dc0d882
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/inferior.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index 21795a0..efe57cc 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -180,7 +180,10 @@ inferior::set_arch (gdbarch *arch) gdb_assert (gdbarch_initialized_p (arch)); m_gdbarch = arch; gdb::observers::architecture_changed.notify (this, arch); - registers_changed (); + + process_stratum_target *proc_target = this->process_target (); + if (proc_target != nullptr) + registers_changed_ptid (proc_target, ptid_t (this->pid)); } void |