MicroBlaze: Add features/microblaze-linux.xml
[binutils-gdb.git] / gdb / arch / arm-get-next-pcs.h
blob7680373c6387d36550b9e92fb09f4b193e626456
1 /* Common code for ARM software single stepping support.
3 Copyright (C) 1988-2024 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef GDB_ARCH_ARM_GET_NEXT_PCS_H
21 #define GDB_ARCH_ARM_GET_NEXT_PCS_H
23 #include <vector>
25 /* Forward declaration. */
26 struct arm_get_next_pcs;
27 struct reg_buffer_common;
29 /* get_next_pcs operations. */
30 struct arm_get_next_pcs_ops
32 ULONGEST (*read_mem_uint) (CORE_ADDR memaddr, int len, int byte_order);
33 CORE_ADDR (*syscall_next_pc) (struct arm_get_next_pcs *self);
34 CORE_ADDR (*addr_bits_remove) (struct arm_get_next_pcs *self, CORE_ADDR val);
35 int (*is_thumb) (struct arm_get_next_pcs *self);
37 /* Fix up PC if needed. */
38 CORE_ADDR (*fixup) (struct arm_get_next_pcs *self, CORE_ADDR pc);
41 /* Context for a get_next_pcs call on ARM. */
42 struct arm_get_next_pcs
44 /* Operations implementations. */
45 struct arm_get_next_pcs_ops *ops;
46 /* Byte order for data. */
47 int byte_order;
48 /* Byte order for code. */
49 int byte_order_for_code;
50 /* Whether the target has 32-bit thumb-2 breakpoint defined or
51 not. */
52 int has_thumb2_breakpoint;
53 /* Registry cache. */
54 reg_buffer_common *regcache;
57 /* Initialize arm_get_next_pcs. */
58 void arm_get_next_pcs_ctor (struct arm_get_next_pcs *self,
59 struct arm_get_next_pcs_ops *ops,
60 int byte_order,
61 int byte_order_for_code,
62 int has_thumb2_breakpoint,
63 reg_buffer_common *regcache);
65 /* Find the next possible PCs after the current instruction executes. */
66 std::vector<CORE_ADDR> arm_get_next_pcs (struct arm_get_next_pcs *self);
68 #endif /* GDB_ARCH_ARM_GET_NEXT_PCS_H */