/* Target-dependent code for SPARC.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
+ Copyright (C) 2003-2022 Free Software Foundation, Inc.
This file is part of GDB.
#ifndef SPARC_TDEP_H
#define SPARC_TDEP_H 1
+#include "gdbarch.h"
+
#define SPARC_CORE_REGISTERS \
"g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
"o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", \
/* SPARC architecture-specific information. */
-struct gdbarch_tdep
+struct sparc_gdbarch_tdep : gdbarch_tdep
{
/* Register numbers for the PN and nPC registers. The definitions
for (64-bit) UltraSPARC differ from the (32-bit) SPARC
definitions. */
- int pc_regnum;
- int npc_regnum;
+ int pc_regnum = 0;
+ int npc_regnum = 0;
+
+ /* Register names specific for architecture (sparc32 vs. sparc64) */
+ const char * const *fpu_register_names = nullptr;
+ size_t fpu_registers_num = 0;
+ const char * const *cp0_register_names = nullptr;
+ size_t cp0_registers_num = 0;
/* Register sets. */
- const struct regset *gregset;
- size_t sizeof_gregset;
- const struct regset *fpregset;
- size_t sizeof_fpregset;
+ const struct regset *gregset = nullptr;
+ size_t sizeof_gregset = 0;
+ const struct regset *fpregset = nullptr;
+ size_t sizeof_fpregset = 0;
/* Offset of saved PC in jmp_buf. */
- int jb_pc_offset;
+ int jb_pc_offset = 0;
/* Size of an Procedure Linkage Table (PLT) entry, 0 if we shouldn't
treat the PLT special when doing prologue analysis. */
- size_t plt_entry_size;
+ size_t plt_entry_size = 0;
/* Alternative location for trap return. Used for single-stepping. */
- CORE_ADDR (*step_trap) (struct frame_info *frame, unsigned long insn);
+ CORE_ADDR (*step_trap) (struct frame_info *frame, unsigned long insn)
+ = nullptr;
/* ISA-specific data types. */
- struct type *sparc_psr_type;
- struct type *sparc_fsr_type;
- struct type *sparc64_pstate_type;
- struct type *sparc64_fsr_type;
- struct type *sparc64_fprs_type;
+ struct type *sparc_psr_type = nullptr;
+ struct type *sparc_fsr_type = nullptr;
+ struct type *sparc64_ccr_type = nullptr;
+ struct type *sparc64_pstate_type = nullptr;
+ struct type *sparc64_fsr_type = nullptr;
+ struct type *sparc64_fprs_type = nullptr;
};
/* Register numbers of various important registers. */
extern const struct sparc_gregmap sparc32_sol2_gregmap;
extern const struct sparc_fpregmap sparc32_sol2_fpregmap;
-extern int sparc_sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name);
-
-extern const char *sparc_sol2_static_transform_name (const char *name);
-
-extern void sparc32_sol2_init_abi (struct gdbarch_info info,
- struct gdbarch *gdbarch);
-
-/* Functions and variables exported from sparcnbsd-tdep.c. */
+/* Functions and variables exported from sparc-netbsd-tdep.c. */
/* Register offsets for NetBSD. */
extern const struct sparc_gregmap sparc32nbsd_gregmap;