aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 9943324..6b2fff4 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -7773,6 +7773,14 @@ gdb_print_insn_arm (bfd_vma memaddr, disassemble_info *info)
else
info->symbols = NULL;
+ /* GDB is able to get bfd_mach from the exe_bfd, info->mach is
+ accurate, so mark USER_SPECIFIED_MACHINE_TYPE bit. Otherwise,
+ opcodes/arm-dis.c:print_insn reset info->mach, and it will trigger
+ the assert on the mismatch of info->mach and bfd_get_mach (exec_bfd)
+ in default_print_insn. */
+ if (exec_bfd != NULL)
+ info->flags |= USER_SPECIFIED_MACHINE_TYPE;
+
return default_print_insn (memaddr, info);
}
@@ -9581,8 +9589,6 @@ static void arm_record_test (void);
}
#endif
-extern initialize_file_ftype _initialize_arm_tdep; /* -Wmissing-prototypes */
-
void
_initialize_arm_tdep (void)
{
@@ -9719,7 +9725,7 @@ vfp - VFP co-processor."),
&setdebuglist, &showdebuglist);
#if GDB_SELF_TEST
- register_self_test (selftests::arm_record_test);
+ selftests::register_test ("arm-record", selftests::arm_record_test);
#endif
}