* infrun.c (adjust_pc_after_break): Do not assume software single-step
[deliverable/binutils-gdb.git] / gdb / alpha-tdep.h
CommitLineData
dc129d82 1/* Common target dependent code for GDB on Alpha systems.
6aba47ca
DJ
2 Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2007
3 Free Software Foundation, Inc.
dc129d82
JT
4
5 This file is part of GDB.
6
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 2 of the License, or
10 (at your option) any later version.
11
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.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
197e01b6
EZ
19 Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
dc129d82
JT
21
22#ifndef ALPHA_TDEP_H
23#define ALPHA_TDEP_H
24
390c1522
UW
25struct regcache;
26
dc129d82 27/* Say how long (ordinary) registers are. This is a piece of bogosity
3acba339
AC
28 used in push_word and a few other places; register_size() is the
29 real way to know how big a register is. */
dc129d82
JT
30#define ALPHA_REGISTER_SIZE 8
31
32/* Number of machine registers. */
87d1b352 33#define ALPHA_NUM_REGS 67
dc129d82
JT
34
35/* Total amount of space needed to store our copies of the machine's
36 register state. */
37#define ALPHA_REGISTER_BYTES (ALPHA_NUM_REGS * 8)
38
0ba6dca9
AC
39/* Register numbers of various important registers. Note that most of
40 these values are "real" register numbers, and correspond to the
44d88583 41 general registers of the machine. */
dc129d82
JT
42
43#define ALPHA_V0_REGNUM 0 /* Function integer return value */
44#define ALPHA_T7_REGNUM 8 /* Return address register for OSF/1 __add* */
4816ec69 45#define ALPHA_S0_REGNUM 9 /* First saved register */
dc129d82
JT
46#define ALPHA_GCC_FP_REGNUM 15 /* Used by gcc as frame register */
47#define ALPHA_A0_REGNUM 16 /* Loc of first arg during a subr call */
48#define ALPHA_T9_REGNUM 23 /* Return address register for OSF/1 __div* */
72667056 49#define ALPHA_RA_REGNUM 26 /* Contains return address value */
dc129d82 50#define ALPHA_T12_REGNUM 27 /* Contains start addr of current proc */
72667056 51#define ALPHA_GP_REGNUM 29 /* Contains the global pointer */
dc129d82 52#define ALPHA_SP_REGNUM 30 /* Contains address of top of stack */
dc129d82
JT
53#define ALPHA_ZERO_REGNUM 31 /* Read-only register, always 0 */
54#define ALPHA_FP0_REGNUM 32 /* Floating point register 0 */
55#define ALPHA_FPA0_REGNUM 48 /* First float arg during a subr call */
56#define ALPHA_FPCR_REGNUM 63 /* Floating point control register */
57#define ALPHA_PC_REGNUM 64 /* Contains program counter */
87d1b352 58#define ALPHA_UNIQUE_REGNUM 66 /* PAL_rduniq value */
dc129d82 59
24c41760
MK
60/* Instruction size. */
61#define ALPHA_INSN_SIZE 4
62
dc129d82
JT
63/* The alpha has two different virtual pointers for arguments and locals.
64
65 The virtual argument pointer is pointing to the bottom of the argument
66 transfer area, which is located immediately below the virtual frame
67 pointer. Its size is fixed for the native compiler, it is either zero
68 (for the no arguments case) or large enough to hold all argument registers.
69 gcc uses a variable sized argument transfer area. As it has
70 to stay compatible with the native debugging tools it has to use the same
71 virtual argument pointer and adjust the argument offsets accordingly.
72
73 The virtual local pointer is localoff bytes below the virtual frame
74 pointer, the value of localoff is obtained from the PDR. */
75#define ALPHA_NUM_ARG_REGS 6
76
dc129d82
JT
77/* Target-dependent structure in gdbarch. */
78struct gdbarch_tdep
79{
d2427a71 80 CORE_ADDR vm_min_address; /* Used by alpha_heuristic_proc_start. */
36a6271d
JT
81
82 /* If PC is inside a dynamically-generated signal trampoline function
83 (i.e. one copied onto the user stack at run-time), return how many
84 bytes PC is beyond the start of that function. Otherwise, return -1. */
85 LONGEST (*dynamic_sigtramp_offset) (CORE_ADDR);
86
d2427a71
RH
87 /* Translate a signal handler stack base address into the address of
88 the sigcontext structure for that signal handler. */
5868c862
JT
89 CORE_ADDR (*sigcontext_addr) (struct frame_info *);
90
f2524b93
AC
91 /* Does the PC fall in a signal trampoline. */
92 /* NOTE: cagney/2004-04-30: Do not copy/clone this code. Instead
93 look at tramp-frame.h and other simplier per-architecture
94 sigtramp unwinders. */
95 int (*pc_in_sigtramp) (CORE_ADDR pc, char *name);
96
9823e921
RH
97 /* If TYPE will be returned in memory, return true. */
98 int (*return_in_memory) (struct type *type);
99
138e7be5
MK
100 /* Offset of registers in `struct sigcontext'. */
101 int sc_pc_offset;
102 int sc_regs_offset;
103 int sc_fpregs_offset;
104
accc6d1f
JT
105 int jb_pc; /* Offset to PC value in jump buffer.
106 If htis is negative, longjmp support
107 will be disabled. */
108 size_t jb_elt_size; /* And the size of each entry in the buf. */
dc129d82
JT
109};
110
d2427a71 111extern unsigned int alpha_read_insn (CORE_ADDR pc);
0b1b3e42 112extern int alpha_software_single_step (struct frame_info *frame);
d2427a71 113extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc);
d2427a71
RH
114
115extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *);
baa490c4 116extern void alpha_dwarf2_init_abi (struct gdbarch_info, struct gdbarch *);
4bcbd6cb 117
390c1522
UW
118extern void alpha_supply_int_regs (struct regcache *, int, const void *,
119 const void *, const void *);
120extern void alpha_fill_int_regs (const struct regcache *, int,
121 void *, void *, void *);
122extern void alpha_supply_fp_regs (struct regcache *, int,
123 const void *, const void *);
124extern void alpha_fill_fp_regs (const struct regcache *,
125 int, void *, void *);
98a8e1e5 126
dc129d82 127#endif /* ALPHA_TDEP_H */
This page took 0.295934 seconds and 4 git commands to generate.