2003-10-09 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / ppc-tdep.h
CommitLineData
9aa1e687 1/* Target-dependent code for GDB, the GNU debugger.
4be87837 2 Copyright 2000, 2001, 2002, 2003
9aa1e687
KB
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
3a1c5313
AC
22#ifndef PPC_TDEP_H
23#define PPC_TDEP_H
24
da3331ec 25struct gdbarch;
3a1c5313
AC
26struct frame_info;
27struct value;
4a4b3fed 28struct regcache;
3a1c5313 29
9aa1e687
KB
30/* From ppc-linux-tdep.c... */
31CORE_ADDR ppc_linux_frame_saved_pc (struct frame_info *fi);
32void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *);
33int ppc_linux_frameless_function_invocation (struct frame_info *);
34void ppc_linux_frame_init_saved_regs (struct frame_info *);
35CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
8e0662df 36int ppc_sysv_abi_use_struct_convention (int, struct type *);
ace1378a 37int ppc_sysv_abi_broken_use_struct_convention (int, struct type *);
77b2b6d4
AC
38CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
39 CORE_ADDR func_addr,
40 struct regcache *regcache,
41 CORE_ADDR bp_addr, int nargs,
42 struct value **args, CORE_ADDR sp,
43 int struct_return,
44 CORE_ADDR struct_addr);
9aa1e687 45int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
6ded7999 46struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
2fda4977
DJ
47void ppc_linux_supply_gregset (char *buf);
48void ppc_linux_supply_fpregset (char *buf);
9aa1e687 49
afd48b75
AC
50int ppc64_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type);
51void ppc64_sysv_abi_extract_return_value (struct type *valtype,
52 struct regcache *regbuf,
53 void *valbuf);
54void ppc64_sysv_abi_store_return_value (struct type *valtype,
55 struct regcache *regbuf,
56 const void *valbuf);
57
9aa1e687
KB
58
59/* From rs6000-tdep.c... */
60CORE_ADDR rs6000_frame_saved_pc (struct frame_info *fi);
61void rs6000_init_extra_frame_info (int fromleaf, struct frame_info *);
62int rs6000_frameless_function_invocation (struct frame_info *);
63void rs6000_frame_init_saved_regs (struct frame_info *);
64CORE_ADDR rs6000_frame_chain (struct frame_info *);
1fcc0bb8 65int altivec_register_p (int regno);
9aa1e687 66
0a613259
AC
67
68/* Return non-zero when the architecture has an FPU (or at least when
69 the ABI is using the FPU). */
70int ppc_floating_point_unit_p (struct gdbarch *gdbarch);
71
2188cbdd
EZ
72/* Private data that this module attaches to struct gdbarch. */
73
74struct gdbarch_tdep
75 {
76 int wordsize; /* size in bytes of fixed-point word */
2188cbdd
EZ
77 int *regoff; /* byte offsets in register arrays */
78 const struct reg *regs; /* from current variant */
79 int ppc_gp0_regnum; /* GPR register 0 */
80 int ppc_gplast_regnum; /* GPR register 31 */
81 int ppc_toc_regnum; /* TOC register */
82 int ppc_ps_regnum; /* Processor (or machine) status (%msr) */
83 int ppc_cr_regnum; /* Condition register */
84 int ppc_lr_regnum; /* Link register */
85 int ppc_ctr_regnum; /* Count register */
86 int ppc_xer_regnum; /* Integer exception register */
e3f36dbd
KB
87 int ppc_fpscr_regnum; /* Floating point status and condition
88 register */
2188cbdd 89 int ppc_mq_regnum; /* Multiply/Divide extension register */
1fcc0bb8
EZ
90 int ppc_vr0_regnum; /* First AltiVec register */
91 int ppc_vrsave_regnum; /* Last AltiVec register */
c8001721
EZ
92 int ppc_ev0_regnum; /* First ev register */
93 int ppc_ev31_regnum; /* Last ev register */
a88376a3
KB
94 int lr_frame_offset; /* Offset to ABI specific location where
95 link register is saved. */
2188cbdd 96};
3a1c5313
AC
97
98#endif
This page took 0.309076 seconds and 4 git commands to generate.