#define AARCH64_DISPLACED_MODIFIED_INSNS 1
/* Target-dependent structure in gdbarch. */
-struct aarch64_gdbarch_tdep : gdbarch_tdep
+struct aarch64_gdbarch_tdep : gdbarch_tdep_base
{
/* Lowest address at which instructions will appear. */
CORE_ADDR lowest_pc = 0;
#define ALPHA_NUM_ARG_REGS 6
/* Target-dependent structure in gdbarch. */
-struct alpha_gdbarch_tdep : gdbarch_tdep
+struct alpha_gdbarch_tdep : gdbarch_tdep_base
{
CORE_ADDR vm_min_address = 0; /* Used by alpha_heuristic_proc_start. */
/* Target-dependent information. */
-struct arc_gdbarch_tdep : gdbarch_tdep
+struct arc_gdbarch_tdep : gdbarch_tdep_base
{
/* Offset to PC value in jump buffer. If this is negative, longjmp
support will be disabled. */
/* See gdbarch.h. */
-struct gdbarch_tdep *
+struct gdbarch_tdep_base *
gdbarch_tdep_1 (struct gdbarch *gdbarch)
{
if (gdbarch_debug >= 2)
};
/* Target-dependent structure in gdbarch. */
-struct arm_gdbarch_tdep : gdbarch_tdep
+struct arm_gdbarch_tdep : gdbarch_tdep_base
{
/* The ABI for this architecture. It should never be set to
ARM_ABI_AUTO. */
trad_frame_saved_reg *saved_regs;
};
-struct avr_gdbarch_tdep : gdbarch_tdep
+struct avr_gdbarch_tdep : gdbarch_tdep_base
{
/* Number of bytes stored to the stack by call instructions.
2 bytes for avr1-5 and avrxmega1-5, 3 bytes for avr6 and avrxmega6-7. */
};
/* Target-dependent structure in gdbarch. */
-struct bfin_gdbarch_tdep : gdbarch_tdep
+struct bfin_gdbarch_tdep : gdbarch_tdep_base
{
/* Which ABI is in use? */
enum bfin_abi bfin_abi {};
#define BPF_NUM_REGS (BPF_PC_REGNUM + 1)
/* Target-dependent structure in gdbarch. */
-struct bpf_gdbarch_tdep : gdbarch_tdep
+struct bpf_gdbarch_tdep : gdbarch_tdep_base
{
};
#include "gdbarch.h"
/* CRIS architecture specific information. */
-struct cris_gdbarch_tdep : gdbarch_tdep
+struct cris_gdbarch_tdep : gdbarch_tdep_base
{
unsigned int cris_version = 0;
const char *cris_mode = nullptr;
};
/* Target-dependent structure in gdbarch. */
-struct csky_gdbarch_tdep : gdbarch_tdep
+struct csky_gdbarch_tdep : gdbarch_tdep_base
{
/* Save FPU, VDSP ABI. */
unsigned int fpu_abi;
of structures, each of which gives all the necessary info for one
register. Don't stick parallel arrays in here --- that's so
Fortran. */
-struct frv_gdbarch_tdep : gdbarch_tdep
+struct frv_gdbarch_tdep : gdbarch_tdep_base
{
/* Which ABI is in use? */
enum frv_abi frv_abi {};
#include "gdbarch.h"
-struct ft32_gdbarch_tdep : gdbarch_tdep
+struct ft32_gdbarch_tdep : gdbarch_tdep_base
{
/* Type for a pointer to a function. Used for the type of PC. */
struct type *pc_type = nullptr;
const struct target_desc * target_desc;
/* target specific vector. */
- struct gdbarch_tdep *tdep;
+ struct gdbarch_tdep_base *tdep;
gdbarch_dump_tdep_ftype *dump_tdep;
/* per-architecture data-pointers. */
struct gdbarch *
gdbarch_alloc (const struct gdbarch_info *info,
- struct gdbarch_tdep *tdep)
+ struct gdbarch_tdep_base *tdep)
{
struct gdbarch *gdbarch;
/* The base class for every architecture's tdep sub-class. The virtual
destructor ensures the class has RTTI information, which allows
- gdb::checked_static_cast to be used, the gdbarch_tdep the function. */
+ gdb::checked_static_cast to be used in the gdbarch_tdep function. */
-struct gdbarch_tdep
+struct gdbarch_tdep_base
{
- virtual ~gdbarch_tdep() = default;
+ virtual ~gdbarch_tdep_base() = default;
};
/* The architecture associated with the inferior through the
#include "gdbarch-gen.h"
/* An internal function that should _only_ be called from gdbarch_tdep.
- Returns the gdbarch_tdep field held within GDBARCH. */
+ Returns the gdbarch_tdep_base field held within GDBARCH. */
-extern struct gdbarch_tdep *gdbarch_tdep_1 (struct gdbarch *gdbarch);
+extern struct gdbarch_tdep_base *gdbarch_tdep_1 (struct gdbarch *gdbarch);
-/* Return the gdbarch_tdep object held within GDBARCH cast to the type
- TDepType, which should be a sub-class of gdbarch_tdep. There is no
- checking done that the gdbarch_tdep within GDBARCH actually is of the
- type TDepType, we just assume the caller knows what they are doing. */
+/* Return the gdbarch_tdep_base object held within GDBARCH cast to the type
+ TDepType, which should be a sub-class of gdbarch_tdep_base.
+
+ When GDB is compiled in maintainer mode a run-time check is performed
+ that the gdbarch_tdep_base within GDBARCH really is of type TDepType.
+ When GDB is compiled in release mode the run-time check is not
+ performed, and we assume the caller knows what they are doing. */
template<typename TDepType>
static inline TDepType *
gdbarch_tdep (struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep_1 (gdbarch);
+ struct gdbarch_tdep_base *tdep = gdbarch_tdep_1 (gdbarch);
return gdb::checked_static_cast<TDepType *> (tdep);
}
parameters. set_gdbarch_*() functions are called to complete the
initialization of the object. */
-extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
+extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep_base *tdep);
/* Helper function. Free a partially-constructed ``struct gdbarch''.
print(f" {c.type} {c.name};", file=f)
print(file=f)
print(" /* target specific vector. */", file=f)
- print(" struct gdbarch_tdep *tdep;", file=f)
+ print(" struct gdbarch_tdep_base *tdep;", file=f)
print(" gdbarch_dump_tdep_ftype *dump_tdep;", file=f)
print(file=f)
print(" /* per-architecture data-pointers. */", file=f)
print(file=f)
print("struct gdbarch *", file=f)
print("gdbarch_alloc (const struct gdbarch_info *info,", file=f)
- print(" struct gdbarch_tdep *tdep)", file=f)
+ print(" struct gdbarch_tdep_base *tdep)", file=f)
print("{", file=f)
print(" struct gdbarch *gdbarch;", file=f)
print("", file=f)
#define HPPA_INSN_SIZE 4
/* Target-dependent structure in gdbarch. */
-struct hppa_gdbarch_tdep : gdbarch_tdep
+struct hppa_gdbarch_tdep : gdbarch_tdep_base
{
/* The number of bytes in an address. For now, this field is designed
to allow us to differentiate hppa32 from hppa64 targets. */
};
/* i386 architecture specific information. */
-struct i386_gdbarch_tdep : gdbarch_tdep
+struct i386_gdbarch_tdep : gdbarch_tdep_base
{
/* General-purpose registers. */
int *gregset_reg_offset = 0;
void (*set_function_addr) (struct regcache *regcache, CORE_ADDR func_addr);
};
-struct ia64_gdbarch_tdep : gdbarch_tdep
+struct ia64_gdbarch_tdep : gdbarch_tdep_base
{
CORE_ADDR (*sigcontext_register_address) (struct gdbarch *, CORE_ADDR, int)
= nullptr;
#define LM32_REG2(insn) ((insn >> 11) & 0x1f)
#define LM32_IMM16(insn) ((((long)insn & 0xffff) << 16) >> 16)
-struct lm32_gdbarch_tdep : gdbarch_tdep
+struct lm32_gdbarch_tdep : gdbarch_tdep_base
{
/* gdbarch target dependent data here. Currently unused for LM32. */
};
extern const struct regset loongarch_fpregset;
/* Target-dependent structure in gdbarch. */
-struct loongarch_gdbarch_tdep : gdbarch_tdep
+struct loongarch_gdbarch_tdep : gdbarch_tdep_base
{
/* Features about the abi that impact how the gdbarch is configured. */
struct loongarch_gdbarch_features abi_features;
#define M32C_MAX_DWARF_REGNUM (40)
-struct m32c_gdbarch_tdep : gdbarch_tdep
+struct m32c_gdbarch_tdep : gdbarch_tdep_base
{
/* All the registers for this variant, indexed by GDB register
number, and the number of registers present. */
#include "gdbarch.h"
-struct m32r_gdbarch_tdep : gdbarch_tdep
+struct m32r_gdbarch_tdep : gdbarch_tdep_base
{
/* gdbarch target dependent data here. Currently unused for M32R. */
};
#define M68HC12_HARD_PC_REGNUM (SOFT_D32_REGNUM+1)
struct insn_sequence;
-struct m68gc11_gdbarch_tdep : gdbarch_tdep
+struct m68gc11_gdbarch_tdep : gdbarch_tdep_base
{
/* Stack pointer correction value. For 68hc11, the stack pointer points
to the next push location. An offset of 1 must be applied to obtain
/* Target-dependent structure in gdbarch. */
-struct m68k_gdbarch_tdep : gdbarch_tdep
+struct m68k_gdbarch_tdep : gdbarch_tdep_base
{
/* Offset to PC value in the jump buffer. If this is negative,
longjmp support will be disabled. */
options are present on the current processor. */
-struct mep_gdbarch_tdep : gdbarch_tdep
+struct mep_gdbarch_tdep : gdbarch_tdep_base
{
/* A CGEN cpu descriptor for this BFD architecture and machine.
#include "gdbarch.h"
/* Microblaze architecture-specific information. */
-struct microblaze_gdbarch_tdep : gdbarch_tdep
+struct microblaze_gdbarch_tdep : gdbarch_tdep_base
{
};
};
/* MIPS specific per-architecture information. */
-struct mips_gdbarch_tdep : gdbarch_tdep
+struct mips_gdbarch_tdep : gdbarch_tdep_base
{
/* from the elf header */
int elf_flags = 0;
};
/* mn10300 private data. */
-struct mn10300_gdbarch_tdep : gdbarch_tdep
+struct mn10300_gdbarch_tdep : gdbarch_tdep_base
{
int am33_mode;
};
#include "gdbarch.h"
-struct moxie_gdbarch_tdep : gdbarch_tdep
+struct moxie_gdbarch_tdep : gdbarch_tdep_base
{
/* gdbarch target dependent data here. Currently unused for MOXIE. */
};
/* Architecture specific data. */
-struct msp430_gdbarch_tdep : gdbarch_tdep
+struct msp430_gdbarch_tdep : gdbarch_tdep_base
{
/* The ELF header flags specify the multilib used. */
int elf_flags = 0;
NDS32_FD0_REGNUM = NDS32_NUM_REGS,
};
-struct nds32_gdbarch_tdep : gdbarch_tdep
+struct nds32_gdbarch_tdep : gdbarch_tdep_base
{
/* The guessed FPU configuration. */
int fpu_freg = 0;
#define NIOS2_CDX_OPCODE_SIZE 2
/* Target-dependent structure in gdbarch. */
-struct nios2_gdbarch_tdep : gdbarch_tdep
+struct nios2_gdbarch_tdep : gdbarch_tdep_base
{
/* Assumes FRAME is stopped at a syscall (trap) instruction; returns
the expected next PC. */
/* The target-dependent structure for gdbarch. */
-struct or1k_gdbarch_tdep : gdbarch_tdep
+struct or1k_gdbarch_tdep : gdbarch_tdep_base
{
int bytes_per_word = 0;
int bytes_per_address = 0;
POWERPC_LONG_DOUBLE_LAST
};
-struct ppc_gdbarch_tdep : gdbarch_tdep
+struct ppc_gdbarch_tdep : gdbarch_tdep_base
{
int wordsize = 0; /* Size in bytes of fixed-point word. */
int soft_float = 0; /* Avoid FP registers for arguments? */
};
/* RISC-V specific per-architecture information. */
-struct riscv_gdbarch_tdep : gdbarch_tdep
+struct riscv_gdbarch_tdep : gdbarch_tdep_base
{
/* Features about the target hardware that impact how the gdbarch is
configured. Two gdbarch instances are compatible only if this field
/* Architecture specific data. */
-struct rl78_gdbarch_tdep : gdbarch_tdep
+struct rl78_gdbarch_tdep : gdbarch_tdep_base
{
/* The ELF header flags specify the multilib used. */
int elf_flags = 0;
};
/* Architecture specific data. */
-struct rx_gdbarch_tdep : gdbarch_tdep
+struct rx_gdbarch_tdep : gdbarch_tdep_base
{
/* The ELF header flags specify the multilib used. */
int elf_flags = 0;
typedef BP_MANIPULATION (s12z_break_insn) s12z_breakpoint;
-struct s12z_gdbarch_tdep : gdbarch_tdep
+struct s12z_gdbarch_tdep : gdbarch_tdep_base
{
};
/* The tdep structure. */
-struct s390_gdbarch_tdep : gdbarch_tdep
+struct s390_gdbarch_tdep : gdbarch_tdep_base
{
/* Target description. */
const struct target_desc *tdesc = nullptr;
unsigned int offset;
};
-struct sh_gdbarch_tdep : gdbarch_tdep
+struct sh_gdbarch_tdep : gdbarch_tdep_base
{
/* Non-NULL when debugging from a core file. Provides the offset
where each general-purpose register is stored inside the associated
/* SPARC architecture-specific information. */
-struct sparc_gdbarch_tdep : gdbarch_tdep
+struct sparc_gdbarch_tdep : gdbarch_tdep_base
{
/* Register numbers for the PN and nPC registers. The definitions
for (64-bit) UltraSPARC differ from the (32-bit) SPARC
extern const gdb_byte tic6x_bkpt_illegal_opcode_le[];
/* Target-dependent structure in gdbarch. */
-struct tic6x_gdbarch_tdep : gdbarch_tdep
+struct tic6x_gdbarch_tdep : gdbarch_tdep_base
{
/* Return the expected next PC if FRAME is stopped at a syscall
instruction. */
/* Architecture specific data. */
-struct v850_gdbarch_tdep : gdbarch_tdep
+struct v850_gdbarch_tdep : gdbarch_tdep_base
{
/* Fields from the ELF header. */
int e_flags = 0;
/* Xtensa-specific target dependencies. */
-struct xtensa_gdbarch_tdep : gdbarch_tdep
+struct xtensa_gdbarch_tdep : gdbarch_tdep_base
{
xtensa_gdbarch_tdep (xtensa_register_t *regmap)
: regmap (regmap)
next frame - frame of caller, which has called current function
*/
-struct z80_gdbarch_tdep : gdbarch_tdep
+struct z80_gdbarch_tdep : gdbarch_tdep_base
{
/* Number of bytes used for address:
2 bytes for all Z80 family