GDB (xrefs)

/tmp/gdb-8.1/gdb/alpha-tdep.h
Go to the documentation of this file.
1 /* Common target dependent code for GDB on Alpha systems.
2 Copyright (C) 1993-2018 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 #ifndef ALPHA_TDEP_H
20 #define ALPHA_TDEP_H
21
22 struct regcache;
23
24 /* Say how long (ordinary) registers are. This is a piece of bogosity
25 used in push_word and a few other places; register_size() is the
26 real way to know how big a register is. */
27 #define ALPHA_REGISTER_SIZE 8
28
29 /* Number of machine registers. */
30 #define ALPHA_NUM_REGS 67
31
32 /* Register numbers of various important registers. Note that most of
33 these values are "real" register numbers, and correspond to the
34 general registers of the machine. */
35
36 #define ALPHA_V0_REGNUM 0 /* Function integer return value */
37 #define ALPHA_T7_REGNUM 8 /* Return address register for OSF/1 __add* */
38 #define ALPHA_S0_REGNUM 9 /* First saved register */
39 #define ALPHA_GCC_FP_REGNUM 15 /* Used by gcc as frame register */
40 #define ALPHA_A0_REGNUM 16 /* Loc of first arg during a subr call */
41 #define ALPHA_T9_REGNUM 23 /* Return address register for OSF/1 __div* */
42 #define ALPHA_RA_REGNUM 26 /* Contains return address value */
43 #define ALPHA_T12_REGNUM 27 /* Contains start addr of current proc */
44 #define ALPHA_GP_REGNUM 29 /* Contains the global pointer */
45 #define ALPHA_SP_REGNUM 30 /* Contains address of top of stack */
46 #define ALPHA_ZERO_REGNUM 31 /* Read-only register, always 0 */
47 #define ALPHA_FP0_REGNUM 32 /* Floating point register 0 */
48 #define ALPHA_FPA0_REGNUM 48 /* First float arg during a subr call */
49 #define ALPHA_FPCR_REGNUM 63 /* Floating point control register */
50 #define ALPHA_PC_REGNUM 64 /* Contains program counter */
51 #define ALPHA_UNIQUE_REGNUM 66 /* PAL_rduniq value */
52
53 /* Instruction size. */
54 #define ALPHA_INSN_SIZE 4
55
56 /* The alpha has two different virtual pointers for arguments and locals.
57
58 The virtual argument pointer is pointing to the bottom of the argument
59 transfer area, which is located immediately below the virtual frame
60 pointer. Its size is fixed for the native compiler, it is either zero
61 (for the no arguments case) or large enough to hold all argument registers.
62 gcc uses a variable sized argument transfer area. As it has
63 to stay compatible with the native debugging tools it has to use the same
64 virtual argument pointer and adjust the argument offsets accordingly.
65
66 The virtual local pointer is localoff bytes below the virtual frame
67 pointer, the value of localoff is obtained from the PDR. */
68 #define ALPHA_NUM_ARG_REGS 6
69
70 /* Target-dependent structure in gdbarch. */
71 struct gdbarch_tdep
72 {
73 CORE_ADDR vm_min_address; /* Used by alpha_heuristic_proc_start. */
74
75 /* If PC is inside a dynamically-generated signal trampoline function
76 (i.e. one copied onto the user stack at run-time), return how many
77 bytes PC is beyond the start of that function. Otherwise, return -1. */
78 LONGEST (*dynamic_sigtramp_offset) (struct gdbarch *, CORE_ADDR);
79
80 /* Translate a signal handler stack base address into the address of
81 the sigcontext structure for that signal handler. */
82 CORE_ADDR (*sigcontext_addr) (struct frame_info *);
83
84 /* Does the PC fall in a signal trampoline. */
85 /* NOTE: cagney/2004-04-30: Do not copy/clone this code. Instead
86 look at tramp-frame.h and other simplier per-architecture
87 sigtramp unwinders. */
88 int (*pc_in_sigtramp) (struct gdbarch *gdbarch, CORE_ADDR pc,
89 const char *name);
90
91 /* If TYPE will be returned in memory, return true. */
92 int (*return_in_memory) (struct type *type);
93
94 /* Offset of registers in `struct sigcontext'. */
95 int sc_pc_offset;
96 int sc_regs_offset;
97 int sc_fpregs_offset;
98
99 int jb_pc; /* Offset to PC value in jump buffer.
100 If htis is negative, longjmp support
101 will be disabled. */
102 size_t jb_elt_size; /* And the size of each entry in the buf. */
103 };
104
105 extern unsigned int alpha_read_insn (struct gdbarch *gdbarch, CORE_ADDR pc);
106 extern std::vector<CORE_ADDR> alpha_software_single_step
107 (struct regcache *regcache);
108 extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc);
109
110 extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *);
111 extern void alpha_dwarf2_init_abi (struct gdbarch_info, struct gdbarch *);
112
113 extern void alpha_supply_int_regs (struct regcache *, int, const void *,
114 const void *, const void *);
115 extern void alpha_fill_int_regs (const struct regcache *, int,
116 void *, void *, void *);
117 extern void alpha_supply_fp_regs (struct regcache *, int,
118 const void *, const void *);
119 extern void alpha_fill_fp_regs (const struct regcache *,
120 int, void *, void *);
121
122 #endif /* ALPHA_TDEP_H */
gdbarch
Definition: gdbarch.c:127
alpha_supply_int_regs
void alpha_supply_int_regs(struct regcache *, int, const void *, const void *, const void *)
Definition: alpha-tdep.c:1496
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41
gdbarch_tdep::return_in_memory
int(* return_in_memory)(struct type *type)
Definition: alpha-tdep.h:92
gdbarch_tdep::dynamic_sigtramp_offset
LONGEST(* dynamic_sigtramp_offset)(struct gdbarch *, CORE_ADDR)
Definition: alpha-tdep.h:78
alpha_fill_fp_regs
void alpha_fill_fp_regs(const struct regcache *, int, void *, void *)
Definition: alpha-tdep.c:1555
gdbarch_tdep::pc
struct m32c_reg * pc
Definition: m32c-tdep.c:116
gdbarch_tdep
Definition: aarch64-tdep.h:55
gdbarch_tdep::sigcontext_addr
CORE_ADDR(* sigcontext_addr)(struct frame_info *)
Definition: alpha-tdep.h:82
gdbarch_tdep::sc_pc_offset
int sc_pc_offset
Definition: alpha-tdep.h:95
frame_info
Definition: frame.c:85
alpha_read_insn
unsigned int alpha_read_insn(struct gdbarch *gdbarch, CORE_ADDR pc)
Definition: alpha-tdep.c:679
name
const char *const name
Definition: aarch64-tdep.c:76
gdbarch_tdep::sc_regs_offset
int sc_regs_offset
Definition: alpha-tdep.h:96
alpha_after_prologue
CORE_ADDR alpha_after_prologue(CORE_ADDR pc)
alpha_fill_int_regs
void alpha_fill_int_regs(const struct regcache *, int, void *, void *, void *)
Definition: alpha-tdep.c:1521
gdbarch_tdep::jb_pc
int jb_pc
Definition: aarch64-tdep.h:62
type
Definition: gdbtypes.h:749
type
static const char * type
Definition: language.c:113
gdbarch_tdep::jb_elt_size
size_t jb_elt_size
Definition: aarch64-tdep.h:65
alpha_software_single_step
std::vector< CORE_ADDR > alpha_software_single_step(struct regcache *regcache)
Definition: alpha-tdep.c:1722
gdbarch_tdep::pc_in_sigtramp
int(* pc_in_sigtramp)(struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
Definition: alpha-tdep.h:88
alpha_supply_fp_regs
void alpha_supply_fp_regs(struct regcache *, int, const void *, const void *)
Definition: alpha-tdep.c:1539
alpha_dwarf2_init_abi
void alpha_dwarf2_init_abi(struct gdbarch_info, struct gdbarch *)
Definition: alpha-tdep.c:1850
regcache
Definition: regcache.h:232
gdbarch_info
Definition: gdbarch.h:1626
gdbarch_tdep::vm_min_address
CORE_ADDR vm_min_address
Definition: alpha-tdep.h:73
gdbarch_tdep::sc_fpregs_offset
int sc_fpregs_offset
Definition: alpha-tdep.h:97
LONGEST
long long LONGEST
Definition: common-types.h:52
alpha_mdebug_init_abi
void alpha_mdebug_init_abi(struct gdbarch_info, struct gdbarch *)
Definition: alpha-mdebug-tdep.c:403