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>
This commit is contained in:
Simon Marchi
2023-09-29 14:24:36 -04:00
parent 27b1f19f8f
commit 97153a2bbf
3 changed files with 6 additions and 4 deletions

View File

@@ -945,7 +945,7 @@ static const registry<gdbarch>::key<pyuw_gdbarch_data_type> pyuw_gdbarch_data;
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)