2004-03-15 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / ppc-tdep.h
1 /* Target-dependent code for GDB, the GNU debugger.
2
3 Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation,
4 Inc.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
22
23 #ifndef PPC_TDEP_H
24 #define PPC_TDEP_H
25
26 struct gdbarch;
27 struct frame_info;
28 struct value;
29 struct regcache;
30 struct type;
31
32 /* From ppc-linux-tdep.c... */
33 CORE_ADDR ppc_linux_frame_saved_pc (struct frame_info *fi);
34 void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *);
35 int ppc_linux_frameless_function_invocation (struct frame_info *);
36 void ppc_linux_frame_init_saved_regs (struct frame_info *);
37 CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
38 enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch,
39 struct type *valtype,
40 struct regcache *regcache,
41 void *readbuf,
42 const void *writebuf);
43 enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
44 struct type *valtype,
45 struct regcache *regcache,
46 void *readbuf,
47 const void *writebuf);
48 CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
49 CORE_ADDR func_addr,
50 struct regcache *regcache,
51 CORE_ADDR bp_addr, int nargs,
52 struct value **args, CORE_ADDR sp,
53 int struct_return,
54 CORE_ADDR struct_addr);
55 CORE_ADDR ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
56 CORE_ADDR func_addr,
57 struct regcache *regcache,
58 CORE_ADDR bp_addr, int nargs,
59 struct value **args, CORE_ADDR sp,
60 int struct_return,
61 CORE_ADDR struct_addr);
62 CORE_ADDR ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch,
63 CORE_ADDR bpaddr);
64 int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
65 struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
66 void ppc_linux_supply_gregset (struct regcache *regcache,
67 int regnum, const void *gregs, size_t size,
68 int wordsize);
69 void ppc_linux_supply_fpregset (const struct regset *regset,
70 struct regcache *regcache,
71 int regnum, const void *gregs, size_t size);
72
73 enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
74 struct type *valtype,
75 struct regcache *regcache,
76 void *readbuf,
77 const void *writebuf);
78
79 /* From rs6000-tdep.c... */
80 CORE_ADDR rs6000_frame_saved_pc (struct frame_info *fi);
81 void rs6000_init_extra_frame_info (int fromleaf, struct frame_info *);
82 int rs6000_frameless_function_invocation (struct frame_info *);
83 void rs6000_frame_init_saved_regs (struct frame_info *);
84 CORE_ADDR rs6000_frame_chain (struct frame_info *);
85 int altivec_register_p (int regno);
86
87
88 /* Return non-zero when the architecture has an FPU (or at least when
89 the ABI is using the FPU). */
90 int ppc_floating_point_unit_p (struct gdbarch *gdbarch);
91
92 /* Private data that this module attaches to struct gdbarch. */
93
94 struct gdbarch_tdep
95 {
96 int wordsize; /* size in bytes of fixed-point word */
97 int *regoff; /* byte offsets in register arrays */
98 const struct reg *regs; /* from current variant */
99 int ppc_gp0_regnum; /* GPR register 0 */
100 int ppc_gplast_regnum; /* GPR register 31 */
101 int ppc_toc_regnum; /* TOC register */
102 int ppc_ps_regnum; /* Processor (or machine) status (%msr) */
103 int ppc_cr_regnum; /* Condition register */
104 int ppc_lr_regnum; /* Link register */
105 int ppc_ctr_regnum; /* Count register */
106 int ppc_xer_regnum; /* Integer exception register */
107 int ppc_fpscr_regnum; /* Floating point status and condition
108 register */
109 int ppc_mq_regnum; /* Multiply/Divide extension register */
110 int ppc_vr0_regnum; /* First AltiVec register */
111 int ppc_vrsave_regnum; /* Last AltiVec register */
112 int ppc_ev0_regnum; /* First ev register */
113 int ppc_ev31_regnum; /* Last ev register */
114 int lr_frame_offset; /* Offset to ABI specific location where
115 link register is saved. */
116 };
117
118 #endif
This page took 0.031371 seconds and 4 git commands to generate.