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>
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 ();
}
is the modified breakpoint. */
extern observable<struct breakpoint */* b */> breakpoint_modified;
-/* The current architecture has changed. The argument NEWARCH is a
+/* INF's architecture has changed. The argument NEWARCH is a
pointer to the new architecture. */
-extern observable<struct gdbarch */* newarch */> architecture_changed;
+extern observable<inferior */* inf */, struct gdbarch */* newarch */>
+ architecture_changed;
/* The thread's ptid has changed. The OLD_PTID parameter specifies
the old value, and NEW_PTID specifies the new value. */
intermediary. */
static void
-pyuw_on_new_gdbarch (struct gdbarch *newarch)
+pyuw_on_new_gdbarch (inferior *inf, gdbarch *newarch)
{
struct pyuw_gdbarch_data_type *data = pyuw_gdbarch_data.get (newarch);
if (data == nullptr)