mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* arch-utils.c (gdbarch_info_fill): Also try core_bfd.
* corelow.c (core_read_description): New. (init_core_ops): Set to_read_description. * gdbarch.sh: Add gdbarch_core_read_description. * mips-linux-tdep.c (mips_linux_core_read_description): New. (mips_linux_init_abi): Call set_gdbarch_core_read_description. * mips-tdep.c (mips_tdesc_gp32, mips_tdesc_gp64): New. (mips_register_g_packet_guesses): Use them. (_initialize_mips_tdep): Initialize them. * mips-tdep.h (mips_tdesc_gp32, mips_tdesc_gp64): Declare. * gdbarch.h, gdbarch.c: Regenerated.
This commit is contained in:
@@ -165,6 +165,9 @@ static int mips_debug = 0;
|
||||
#define PROPERTY_GP32 "internal: transfers-32bit-registers"
|
||||
#define PROPERTY_GP64 "internal: transfers-64bit-registers"
|
||||
|
||||
struct target_desc *mips_tdesc_gp32;
|
||||
struct target_desc *mips_tdesc_gp64;
|
||||
|
||||
/* MIPS specific per-architecture information */
|
||||
struct gdbarch_tdep
|
||||
{
|
||||
@@ -4866,30 +4869,16 @@ global_mips_abi (void)
|
||||
static void
|
||||
mips_register_g_packet_guesses (struct gdbarch *gdbarch)
|
||||
{
|
||||
static struct target_desc *tdesc_gp32, *tdesc_gp64;
|
||||
|
||||
if (tdesc_gp32 == NULL)
|
||||
{
|
||||
/* Create feature sets with the appropriate properties. The values
|
||||
are not important. */
|
||||
|
||||
tdesc_gp32 = allocate_target_description ();
|
||||
set_tdesc_property (tdesc_gp32, PROPERTY_GP32, "");
|
||||
|
||||
tdesc_gp64 = allocate_target_description ();
|
||||
set_tdesc_property (tdesc_gp64, PROPERTY_GP64, "");
|
||||
}
|
||||
|
||||
/* If the size matches the set of 32-bit or 64-bit integer registers,
|
||||
assume that's what we've got. */
|
||||
register_remote_g_packet_guess (gdbarch, 38 * 4, tdesc_gp32);
|
||||
register_remote_g_packet_guess (gdbarch, 38 * 8, tdesc_gp64);
|
||||
register_remote_g_packet_guess (gdbarch, 38 * 4, mips_tdesc_gp32);
|
||||
register_remote_g_packet_guess (gdbarch, 38 * 8, mips_tdesc_gp64);
|
||||
|
||||
/* If the size matches the full set of registers GDB traditionally
|
||||
knows about, including floating point, for either 32-bit or
|
||||
64-bit, assume that's what we've got. */
|
||||
register_remote_g_packet_guess (gdbarch, 90 * 4, tdesc_gp32);
|
||||
register_remote_g_packet_guess (gdbarch, 90 * 8, tdesc_gp64);
|
||||
register_remote_g_packet_guess (gdbarch, 90 * 4, mips_tdesc_gp32);
|
||||
register_remote_g_packet_guess (gdbarch, 90 * 8, mips_tdesc_gp64);
|
||||
|
||||
/* Otherwise we don't have a useful guess. */
|
||||
}
|
||||
@@ -5696,6 +5685,14 @@ _initialize_mips_tdep (void)
|
||||
|
||||
mips_pdr_data = register_objfile_data ();
|
||||
|
||||
/* Create feature sets with the appropriate properties. The values
|
||||
are not important. */
|
||||
mips_tdesc_gp32 = allocate_target_description ();
|
||||
set_tdesc_property (mips_tdesc_gp32, PROPERTY_GP32, "");
|
||||
|
||||
mips_tdesc_gp64 = allocate_target_description ();
|
||||
set_tdesc_property (mips_tdesc_gp64, PROPERTY_GP64, "");
|
||||
|
||||
/* Add root prefix command for all "set mips"/"show mips" commands */
|
||||
add_prefix_cmd ("mips", no_class, set_mips_command,
|
||||
_("Various MIPS specific commands."),
|
||||
|
||||
Reference in New Issue
Block a user