2002-03-22 Elena Zannoni <ezannoni@redhat.com>
[external/binutils.git] / gdb / ppc-tdep.h
1 /* Target-dependent code for GDB, the GNU debugger.
2    Copyright 2000
3    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 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
19    Foundation, Inc., 59 Temple Place - Suite 330,
20    Boston, MA 02111-1307, USA.  */
21
22 #ifndef PPC_TDEP_H
23 #define PPC_TDEP_H
24
25 struct frame_info;
26 struct value;
27
28 /* From ppc-linux-tdep.c... */
29 CORE_ADDR ppc_linux_frame_saved_pc (struct frame_info *fi);
30 void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *);
31 int ppc_linux_frameless_function_invocation (struct frame_info *);
32 void ppc_linux_frame_init_saved_regs (struct frame_info *);
33 CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
34 int ppc_sysv_abi_use_struct_convention (int, struct type *);
35 CORE_ADDR ppc_sysv_abi_push_arguments (int, struct value **, CORE_ADDR, int,
36                                        CORE_ADDR);
37 int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
38 struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
39
40
41 /* From rs6000-tdep.c... */
42 CORE_ADDR rs6000_frame_saved_pc (struct frame_info *fi);
43 void rs6000_init_extra_frame_info (int fromleaf, struct frame_info *);
44 int rs6000_frameless_function_invocation (struct frame_info *);
45 void rs6000_frame_init_saved_regs (struct frame_info *);
46 CORE_ADDR rs6000_frame_chain (struct frame_info *);
47 int altivec_register_p (int regno);
48
49 /* Private data that this module attaches to struct gdbarch. */
50
51 struct gdbarch_tdep
52   {
53     int wordsize;              /* size in bytes of fixed-point word */
54     int osabi;                 /* OS / ABI from ELF header */
55     int *regoff;               /* byte offsets in register arrays */
56     const struct reg *regs;    /* from current variant */
57     int ppc_gp0_regnum;         /* GPR register 0 */
58     int ppc_gplast_regnum;      /* GPR register 31 */
59     int ppc_toc_regnum;         /* TOC register */
60     int ppc_ps_regnum;          /* Processor (or machine) status (%msr) */
61     int ppc_cr_regnum;          /* Condition register */
62     int ppc_lr_regnum;          /* Link register */
63     int ppc_ctr_regnum;         /* Count register */
64     int ppc_xer_regnum;         /* Integer exception register */
65     int ppc_mq_regnum;          /* Multiply/Divide extension register */
66     int ppc_vr0_regnum;         /* First AltiVec register */
67     int ppc_vrsave_regnum;      /* Last AltiVec register */
68 };
69
70 #endif