gdb/linux-tdep.c: Add Perms to the 'info proc mappings' output
[binutils-gdb.git] / gdb / arch / arm-get-next-pcs.h
index fe484285ab7dbb292ecaae5552cfc5412b56e919..e9768d905fff76a7e4473a611696a0c1f9f5d502 100644 (file)
@@ -1,6 +1,6 @@
 /* Common code for ARM software single stepping support.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef ARM_GET_NEXT_PCS_H
-#define ARM_GET_NEXT_PCS_H 1
+#ifndef ARCH_ARM_GET_NEXT_PCS_H
+#define ARCH_ARM_GET_NEXT_PCS_H
+
+#include <vector>
 
 /* Forward declaration.  */
 struct arm_get_next_pcs;
@@ -27,9 +29,12 @@ struct arm_get_next_pcs;
 struct arm_get_next_pcs_ops
 {
   ULONGEST (*read_mem_uint) (CORE_ADDR memaddr, int len, int byte_order);
-  CORE_ADDR (*syscall_next_pc) (struct arm_get_next_pcs *self, CORE_ADDR pc);
+  CORE_ADDR (*syscall_next_pc) (struct arm_get_next_pcs *self);
   CORE_ADDR (*addr_bits_remove) (struct arm_get_next_pcs *self, CORE_ADDR val);
   int (*is_thumb) (struct arm_get_next_pcs *self);
+
+  /* Fix up PC if needed.  */
+  CORE_ADDR (*fixup) (struct arm_get_next_pcs *self, CORE_ADDR pc);
 };
 
 /* Context for a get_next_pcs call on ARM.  */
@@ -41,8 +46,9 @@ struct arm_get_next_pcs
   int byte_order;
   /* Byte order for code.  */
   int byte_order_for_code;
-  /* Thumb2 breakpoint instruction.  */
-  const gdb_byte *arm_thumb2_breakpoint;
+  /* Whether the target has 32-bit thumb-2 breakpoint defined or
+     not.  */
+  int has_thumb2_breakpoint;
   /* Registry cache.  */
   struct regcache *regcache;
 };
@@ -52,19 +58,10 @@ void arm_get_next_pcs_ctor (struct arm_get_next_pcs *self,
                            struct arm_get_next_pcs_ops *ops,
                            int byte_order,
                            int byte_order_for_code,
-                           const gdb_byte *arm_thumb2_breakpoint,
+                           int has_thumb2_breakpoint,
                            struct regcache *regcache);
 
 /* Find the next possible PCs after the current instruction executes.  */
-VEC (CORE_ADDR) *arm_get_next_pcs (struct arm_get_next_pcs *self,
-                                  CORE_ADDR pc);
-
-/* Find the next possible PCs for thumb mode.  */
-VEC (CORE_ADDR) *thumb_get_next_pcs_raw (struct arm_get_next_pcs *self,
-                                        CORE_ADDR pc);
-
-/* Find the next possible PCs for arm mode.  */
-VEC (CORE_ADDR) *arm_get_next_pcs_raw (struct arm_get_next_pcs *self,
-                                      CORE_ADDR pc);
+std::vector<CORE_ADDR> arm_get_next_pcs (struct arm_get_next_pcs *self);
 
-#endif /* ARM_GET_NEXT_PCS_H */
+#endif /* ARCH_ARM_GET_NEXT_PCS_H */