aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-09-29 14:24:37 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-10 10:44:35 -0400
commit72c4529c85907a5e1e04960ff1362a5a185553a0 (patch)
treeb7828d3aa544952ed62c4ec8833e1d7de1f0de94 /gdb/gdbarch.h
parent97153a2bbfc59d33c1031526e63b06725862ba6b (diff)
downloadgdb-72c4529c85907a5e1e04960ff1362a5a185553a0.zip
gdb-72c4529c85907a5e1e04960ff1362a5a185553a0.tar.gz
gdb-72c4529c85907a5e1e04960ff1362a5a185553a0.tar.bz2
gdb: move set_target_gdbarch to inferior::set_arch
set_target_gdbarch is basically a setter for the current inferior's arch, that notifies other parts of GDB of the architecture change. Move the code of set_target_gdbarch to the inferior::set_arch method. Add gdbarch_initialized_p, so we can keep the assertion. Change-Id: I276e28eafd4740c94bc5233c81a86c01b4a6ae90 Reviewed-By: John Baldwin <jhb@FreeBSD.org> Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index a9d6a4b..5285f29 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -278,6 +278,9 @@ extern void gdbarch_register (enum bfd_architecture architecture,
gdbarch_dump_tdep_ftype *dump_tdep = nullptr,
gdbarch_supports_arch_info_ftype *supports_arch_info = nullptr);
+/* Return true if ARCH is initialized. */
+
+bool gdbarch_initialized_p (gdbarch *arch);
/* Return a vector of the valid architecture names. Since architectures are
registered during the _initialize phase this function only returns useful
@@ -355,12 +358,6 @@ extern int gdbarch_update_p (struct gdbarch_info info);
extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info);
-
-/* Helper function. Set the target gdbarch to "gdbarch". */
-
-extern void set_target_gdbarch (struct gdbarch *gdbarch);
-
-
/* A registry adaptor for gdbarch. This arranges to store the
registry in the gdbarch. */
template<>