@@ -8206,6 +8206,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
enum mips_isa mips_isa;
int dspacc;
int dspctl;
+ /* Whether we have an unknown/unsuitable architecture description. */
+ int arch_is_incompatible = 0;
/* Fill in the OS dependent register numbers and names. */
if (info.osabi == GDB_OSABI_IRIX)
@@ -8571,11 +8573,16 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* If we have only 32-bit registers, then we can't debug a 64-bit
ABI. */
- if (info.target_desc
- && tdesc_property (info.target_desc, PROPERTY_GP32) != NULL
- && mips_abi != MIPS_ABI_EABI32
- && mips_abi != MIPS_ABI_O32)
+ if (mips_abi != MIPS_ABI_EABI32 && mips_abi != MIPS_ABI_O32
+ && ((info.target_desc
+ && tdesc_property (info.target_desc, PROPERTY_GP32) != NULL)
+ || mips_isa == ISA_MIPS16))
+ arch_is_incompatible = 1;
+
+ if (arch_is_incompatible)
{
+ /* This is an unsuitable combination of ABI/ISA. Just cleanup and
+ return. */
if (tdesc_data != NULL)
tdesc_data_cleanup (tdesc_data);
return NULL;