diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2024-07-28 23:25:58 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2024-08-12 11:10:02 -0400 |
commit | 91f378ddd0f3c51a29190b337abd9ebd06726f0b (patch) | |
tree | 61241a2cf93ce75b111f47f140c64b1aa7bab374 /gdb/gdbarch.h | |
parent | 74e39223b5e7cb645720a81f2c6ec25f9f40998c (diff) | |
download | binutils-91f378ddd0f3c51a29190b337abd9ebd06726f0b.zip binutils-91f378ddd0f3c51a29190b337abd9ebd06726f0b.tar.gz binutils-91f378ddd0f3c51a29190b337abd9ebd06726f0b.tar.bz2 |
gdb: pass inferior to gdbarch_update_p
Make the current inferior reference bubble up one level. I think this
makes it clearer what gdbarch_update_p, which is update the passed
inferior's architecture (although the function name could probably be
better).
When gdbarch_find_by_info, it is possible for the new architecture's
init callback to be called. I have not audited all of them (there are
just too many), it's possible that some of them do care about the
current inferior, for some reason (for instance, if one of them makes a
target call). If so, they should be changed too.
Change-Id: I89f012188d7fdca395a830f4b013743565f26847
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 5175ef7..60a0f60 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -316,7 +316,7 @@ extern obstack *gdbarch_obstack (gdbarch *arch); extern char *gdbarch_obstack_strdup (struct gdbarch *arch, const char *string); -/* Helper function. Force an update of the current architecture. +/* Helper function. Force an update of INF's architecture. The actual architecture selected is determined by INFO, ``(gdb) set architecture'' et.al., the existing architecture and BFD's default @@ -325,8 +325,7 @@ extern char *gdbarch_obstack_strdup (struct gdbarch *arch, const char *string); Returns non-zero if the update succeeds. */ -extern int gdbarch_update_p (struct gdbarch_info info); - +extern int gdbarch_update_p (inferior *inf, gdbarch_info info); /* Helper function. Find an architecture matching info. |