]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[Morello] Disable displaced stepping for Morello
authorLuis Machado <luis.machado@arm.com>
Mon, 28 Sep 2020 19:32:03 +0000 (16:32 -0300)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 22:53:22 +0000 (15:53 -0700)
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  <luis.machado@arm.com>

* aarch64-linux-tdep.c (aarch64_linux_init_abi): Only set displaced
stepping hooks for non-Morello targets.

gdb/aarch64-linux-tdep.c

index 14ccb80e1dc669ea92865ab84cd728764f05def5..ef5a8a9e75e220c00ac349c5e986a37ac9996827 100644 (file)
@@ -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