gdb: add inferior::{arch, set_arch}
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 29 Sep 2023 18:24:35 +0000 (14:24 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 10 Oct 2023 14:44:35 +0000 (10:44 -0400)
commit27b1f19f8f5cc46faba4bb2142547df074a82a29
tree732d6d243fc7f90780e2a7b469cf9e97990d47f4
parentae0d827fa483c4e569803d99f8dff14794c63a17
gdb: add inferior::{arch, set_arch}

Make the inferior's gdbarch field private, and add getters and setters.
This helped me by allowing putting breakpoints on set_arch to know when
the inferior's arch was set.  A subsequent patch in this series also
adds more things in set_arch.

Change-Id: I0005bd1ef4cd6b612af501201cec44e457998eec
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Approved-By: Andrew Burgess <aburgess@redhat.com>
25 files changed:
gdb/aarch64-linux-nat.c
gdb/amd-dbgapi-target.c
gdb/amd64-linux-nat.c
gdb/arch-utils.c
gdb/arm-fbsd-tdep.c
gdb/auxv.c
gdb/inferior.c
gdb/inferior.h
gdb/infrun.c
gdb/jit.c
gdb/linux-tdep.c
gdb/ppc-linux-tdep.c
gdb/proc-service.c
gdb/process-stratum-target.c
gdb/python/py-inferior.c
gdb/python/python.c
gdb/regcache.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/scoped-mock-context.h
gdb/solib-rocm.c
gdb/symfile-mem.c
gdb/tui/tui-disasm.c
gdb/unittests/frame_info_ptr-selftests.c
gdb/value.c