gdb: scope down registers_changed call in inferior::set_arch
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 29 Sep 2023 18:24:39 +0000 (14:24 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 10 Oct 2023 14:44:35 +0000 (10:44 -0400)
commitd6bfbb5256e33c356e85dfa5de7d3eaa20714ddd
tree69308391ccf9733b2b813cdfafabcf4b942950a5
parent99d9c3b92ca96a7425cbb6b1bf453ede9477a2ee
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>
gdb/inferior.c