aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-09-29 14:24:36 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-10 10:44:35 -0400
commit97153a2bbfc59d33c1031526e63b06725862ba6b (patch)
treed83a7a8b917f7ba7f61afb300e129b70d38fbb9c /gdb/arch-utils.c
parent27b1f19f8f5cc46faba4bb2142547df074a82a29 (diff)
downloadgdb-97153a2bbfc59d33c1031526e63b06725862ba6b.zip
gdb-97153a2bbfc59d33c1031526e63b06725862ba6b.tar.gz
gdb-97153a2bbfc59d33c1031526e63b06725862ba6b.tar.bz2
gdb: add inferior parameter to architecture_changed observable
This is to make it explicit which inferior's architecture just changed, and that the callbacks should not assume it is the current inferior. Update the only caller, pyuw_on_new_gdbarch, to add the parameter, although it doesn't use it currently. Change-Id: Ieb7f21377e4252cc6e7b1ce2cc812cd1a1840e0e Reviewed-By: John Baldwin <jhb@FreeBSD.org> Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 5331bd8..b2b265a 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -1489,7 +1489,8 @@ set_target_gdbarch (struct gdbarch *new_gdbarch)
gdb_assert (new_gdbarch != NULL);
gdb_assert (new_gdbarch->initialized_p);
current_inferior ()->set_arch (new_gdbarch);
- gdb::observers::architecture_changed.notify (new_gdbarch);
+ gdb::observers::architecture_changed.notify (current_inferior (),
+ new_gdbarch);
registers_changed ();
}