OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [alpha-tdep.h] - Blame information for rev 299

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.