Commit | Line | Data |
---|---|---|
9aa1e687 | 1 | /* Target-dependent code for GDB, the GNU debugger. |
f9be684a AC |
2 | |
3 | Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, | |
4 | Inc. | |
9aa1e687 KB |
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 | ||
3a1c5313 AC |
23 | #ifndef PPC_TDEP_H |
24 | #define PPC_TDEP_H | |
25 | ||
da3331ec | 26 | struct gdbarch; |
3a1c5313 AC |
27 | struct frame_info; |
28 | struct value; | |
4a4b3fed | 29 | struct regcache; |
221c12ff | 30 | struct type; |
3a1c5313 | 31 | |
9aa1e687 KB |
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 *); | |
05580c65 AC |
38 | enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch, |
39 | struct type *valtype, | |
40 | struct regcache *regcache, | |
963e2bb7 AC |
41 | void *readbuf, |
42 | const void *writebuf); | |
05580c65 AC |
43 | enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch, |
44 | struct type *valtype, | |
45 | struct regcache *regcache, | |
963e2bb7 AC |
46 | void *readbuf, |
47 | const void *writebuf); | |
77b2b6d4 AC |
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); | |
8be9034a AC |
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); | |
6066c3de AC |
62 | CORE_ADDR ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch, |
63 | CORE_ADDR bpaddr); | |
9aa1e687 | 64 | int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache); |
6ded7999 | 65 | struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void); |
f9be684a AC |
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); | |
9aa1e687 | 72 | |
05580c65 AC |
73 | enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, |
74 | struct type *valtype, | |
75 | struct regcache *regcache, | |
963e2bb7 AC |
76 | void *readbuf, |
77 | const void *writebuf); | |
9aa1e687 KB |
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 *); | |
1fcc0bb8 | 85 | int altivec_register_p (int regno); |
9aa1e687 | 86 | |
0a613259 AC |
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 | ||
2188cbdd EZ |
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 */ | |
2188cbdd EZ |
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 */ | |
e3f36dbd KB |
107 | int ppc_fpscr_regnum; /* Floating point status and condition |
108 | register */ | |
2188cbdd | 109 | int ppc_mq_regnum; /* Multiply/Divide extension register */ |
1fcc0bb8 EZ |
110 | int ppc_vr0_regnum; /* First AltiVec register */ |
111 | int ppc_vrsave_regnum; /* Last AltiVec register */ | |
c8001721 EZ |
112 | int ppc_ev0_regnum; /* First ev register */ |
113 | int ppc_ev31_regnum; /* Last ev register */ | |
a88376a3 KB |
114 | int lr_frame_offset; /* Offset to ABI specific location where |
115 | link register is saved. */ | |
2188cbdd | 116 | }; |
3a1c5313 AC |
117 | |
118 | #endif |