From: Luis Machado Date: Mon, 28 Sep 2020 19:32:03 +0000 (-0300) Subject: [Morello] Disable displaced stepping for Morello X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c3c2477366687bbe48a6e1e86b6056b45ab17c2;p=thirdparty%2Fbinutils-gdb.git [Morello] Disable displaced stepping for Morello Morello can't support displaced stepping at the moment given it has no API to write capabilities, which is needed when GDB needs to adjust the X and C registers during a displaced stepping operation. gdb/ChangeLog: 2020-10-20 Luis Machado * aarch64-linux-tdep.c (aarch64_linux_init_abi): Only set displaced stepping hooks for non-Morello targets. --- diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 14ccb80e1dc..ef5a8a9e75e 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -2347,11 +2347,6 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_xml_syscall_file_name (gdbarch, "syscalls/aarch64-linux.xml"); set_gdbarch_get_syscall_number (gdbarch, aarch64_linux_get_syscall_number); - /* Displaced stepping. */ - set_gdbarch_max_insn_length (gdbarch, 4 * AARCH64_DISPLACED_MODIFIED_INSNS); - set_gdbarch_displaced_step_copy_insn (gdbarch, - aarch64_displaced_step_copy_insn); - set_gdbarch_displaced_step_fixup (gdbarch, aarch64_displaced_step_fixup); set_gdbarch_displaced_step_hw_singlestep (gdbarch, aarch64_displaced_step_hw_singlestep); @@ -2362,6 +2357,18 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_report_signal_info (gdbarch, aarch64_linux_report_signal_info); } + else + { + /* Displaced stepping. */ + /* Note: Morello does not support displaced stepping yet because + adjustments to GPR's may not be correct. This is because GDB can't + make adjustments to the upper 65 bits of the C registers. */ + set_gdbarch_max_insn_length (gdbarch, + 4 * AARCH64_DISPLACED_MODIFIED_INSNS); + set_gdbarch_displaced_step_copy_insn (gdbarch, + aarch64_displaced_step_copy_insn); + set_gdbarch_displaced_step_fixup (gdbarch, aarch64_displaced_step_fixup); + } } #if GDB_SELF_TEST