mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
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
This commit is contained in:
@@ -896,7 +896,7 @@ set_mips64_transfers_32bit_regs (const char *args, int from_tty,
|
||||
/* FIXME: cagney/2003-11-15: Should be setting a field in "info"
|
||||
instead of relying on globals. Doing that would let generic code
|
||||
handle the search for this specific architecture. */
|
||||
if (!gdbarch_update_p (info))
|
||||
if (!gdbarch_update_p (current_inferior (), info))
|
||||
{
|
||||
mips64_transfers_32bit_regs_p = 0;
|
||||
error (_("32-bit compatibility mode not supported"));
|
||||
@@ -6968,7 +6968,7 @@ set_mipsfpu_single_command (const char *args, int from_tty)
|
||||
/* FIXME: cagney/2003-11-15: Should be setting a field in "info"
|
||||
instead of relying on globals. Doing that would let generic code
|
||||
handle the search for this specific architecture. */
|
||||
if (!gdbarch_update_p (info))
|
||||
if (!gdbarch_update_p (current_inferior (), info))
|
||||
internal_error (_("set mipsfpu failed"));
|
||||
}
|
||||
|
||||
@@ -6981,7 +6981,7 @@ set_mipsfpu_double_command (const char *args, int from_tty)
|
||||
/* FIXME: cagney/2003-11-15: Should be setting a field in "info"
|
||||
instead of relying on globals. Doing that would let generic code
|
||||
handle the search for this specific architecture. */
|
||||
if (!gdbarch_update_p (info))
|
||||
if (!gdbarch_update_p (current_inferior (), info))
|
||||
internal_error (_("set mipsfpu failed"));
|
||||
}
|
||||
|
||||
@@ -6994,7 +6994,7 @@ set_mipsfpu_none_command (const char *args, int from_tty)
|
||||
/* FIXME: cagney/2003-11-15: Should be setting a field in "info"
|
||||
instead of relying on globals. Doing that would let generic code
|
||||
handle the search for this specific architecture. */
|
||||
if (!gdbarch_update_p (info))
|
||||
if (!gdbarch_update_p (current_inferior (), info))
|
||||
internal_error (_("set mipsfpu failed"));
|
||||
}
|
||||
|
||||
@@ -8840,7 +8840,7 @@ mips_abi_update (const char *ignore_args,
|
||||
|
||||
/* Force the architecture to update, and (if it's a MIPS architecture)
|
||||
mips_gdbarch_init will take care of the rest. */
|
||||
gdbarch_update_p (info);
|
||||
gdbarch_update_p (current_inferior (), info);
|
||||
}
|
||||
|
||||
/* Print out which MIPS ABI is in use. */
|
||||
|
||||
Reference in New Issue
Block a user