Commit | Line | Data |
---|---|---|
59233f88 AC |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
2 | ||
adf40b2e | 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
79d45cd4 AC |
4 | |
5 | Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free | |
6 | Software Foundation, Inc. | |
c906108c | 7 | |
c5aa993b | 8 | This file is part of GDB. |
c906108c | 9 | |
c5aa993b JM |
10 | This program is free software; you can redistribute it and/or modify |
11 | it under the terms of the GNU General Public License as published by | |
12 | the Free Software Foundation; either version 2 of the License, or | |
13 | (at your option) any later version. | |
c906108c | 14 | |
c5aa993b JM |
15 | This program is distributed in the hope that it will be useful, |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | GNU General Public License for more details. | |
c906108c | 19 | |
c5aa993b JM |
20 | You should have received a copy of the GNU General Public License |
21 | along with this program; if not, write to the Free Software | |
22 | Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | Boston, MA 02111-1307, USA. */ | |
c906108c | 24 | |
104c1213 JM |
25 | /* This file was created with the aid of ``gdbarch.sh''. |
26 | ||
52204a0b | 27 | The Bourne shell script ``gdbarch.sh'' creates the files |
104c1213 JM |
28 | ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them |
29 | against the existing ``gdbarch.[hc]''. Any differences found | |
30 | being reported. | |
31 | ||
32 | If editing this file, please also run gdbarch.sh and merge any | |
52204a0b | 33 | changes into that script. Conversely, when making sweeping changes |
104c1213 JM |
34 | to this file, modifying gdbarch.sh and using its output may prove |
35 | easier. */ | |
adf40b2e | 36 | |
c906108c SS |
37 | #ifndef GDBARCH_H |
38 | #define GDBARCH_H | |
39 | ||
da3331ec AC |
40 | struct floatformat; |
41 | struct ui_file; | |
cce74817 JM |
42 | struct frame_info; |
43 | struct value; | |
b6af0555 | 44 | struct objfile; |
a2cf933a | 45 | struct minimal_symbol; |
049ee0e4 | 46 | struct regcache; |
b59ff9d5 | 47 | struct reggroup; |
6ce6d90f | 48 | struct regset; |
a89aa300 | 49 | struct disassemble_info; |
e2d0e7eb | 50 | struct target_ops; |
030f20e1 | 51 | struct obstack; |
0f71a2f6 | 52 | |
0f71a2f6 JM |
53 | extern struct gdbarch *current_gdbarch; |
54 | ||
55 | ||
0f71a2f6 JM |
56 | /* If any of the following are defined, the target wasn't correctly |
57 | converted. */ | |
58 | ||
83905903 AC |
59 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE) |
60 | #error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file." | |
61 | #endif | |
62 | ||
0f71a2f6 JM |
63 | |
64 | /* The following are pre-initialized by GDBARCH. */ | |
65 | ||
104c1213 | 66 | extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch); |
0f71a2f6 | 67 | /* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */ |
83905903 AC |
68 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE) |
69 | #error "Non multi-arch definition of TARGET_ARCHITECTURE" | |
70 | #endif | |
c25083af | 71 | #if !defined (TARGET_ARCHITECTURE) |
0f71a2f6 JM |
72 | #define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch)) |
73 | #endif | |
0f71a2f6 | 74 | |
104c1213 | 75 | extern int gdbarch_byte_order (struct gdbarch *gdbarch); |
0f71a2f6 | 76 | /* set_gdbarch_byte_order() - not applicable - pre-initialized. */ |
83905903 AC |
77 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER) |
78 | #error "Non multi-arch definition of TARGET_BYTE_ORDER" | |
79 | #endif | |
c25083af | 80 | #if !defined (TARGET_BYTE_ORDER) |
0f71a2f6 JM |
81 | #define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch)) |
82 | #endif | |
0f71a2f6 | 83 | |
4be87837 DJ |
84 | extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch); |
85 | /* set_gdbarch_osabi() - not applicable - pre-initialized. */ | |
86 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI) | |
87 | #error "Non multi-arch definition of TARGET_OSABI" | |
88 | #endif | |
c25083af | 89 | #if !defined (TARGET_OSABI) |
4be87837 DJ |
90 | #define TARGET_OSABI (gdbarch_osabi (current_gdbarch)) |
91 | #endif | |
4be87837 | 92 | |
0f71a2f6 | 93 | |
99e7bb18 | 94 | /* The following are initialized by the target dependent code. */ |
0f71a2f6 | 95 | |
66b43ecb AC |
96 | /* Number of bits in a char or unsigned char for the target machine. |
97 | Just like CHAR_BIT in <limits.h> but describes the target machine. | |
e669114a | 98 | v:2:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0: |
66b43ecb AC |
99 | |
100 | Number of bits in a short or unsigned short for the target machine. */ | |
c4093a6a | 101 | |
104c1213 JM |
102 | extern int gdbarch_short_bit (struct gdbarch *gdbarch); |
103 | extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit); | |
83905903 AC |
104 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT) |
105 | #error "Non multi-arch definition of TARGET_SHORT_BIT" | |
106 | #endif | |
c25083af | 107 | #if !defined (TARGET_SHORT_BIT) |
0f71a2f6 JM |
108 | #define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch)) |
109 | #endif | |
0f71a2f6 | 110 | |
66b43ecb AC |
111 | /* Number of bits in an int or unsigned int for the target machine. */ |
112 | ||
104c1213 JM |
113 | extern int gdbarch_int_bit (struct gdbarch *gdbarch); |
114 | extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit); | |
83905903 AC |
115 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT) |
116 | #error "Non multi-arch definition of TARGET_INT_BIT" | |
117 | #endif | |
c25083af | 118 | #if !defined (TARGET_INT_BIT) |
0f71a2f6 JM |
119 | #define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch)) |
120 | #endif | |
0f71a2f6 | 121 | |
66b43ecb AC |
122 | /* Number of bits in a long or unsigned long for the target machine. */ |
123 | ||
104c1213 JM |
124 | extern int gdbarch_long_bit (struct gdbarch *gdbarch); |
125 | extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit); | |
83905903 AC |
126 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT) |
127 | #error "Non multi-arch definition of TARGET_LONG_BIT" | |
128 | #endif | |
c25083af | 129 | #if !defined (TARGET_LONG_BIT) |
0f71a2f6 JM |
130 | #define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch)) |
131 | #endif | |
0f71a2f6 | 132 | |
66b43ecb AC |
133 | /* Number of bits in a long long or unsigned long long for the target |
134 | machine. */ | |
135 | ||
104c1213 JM |
136 | extern int gdbarch_long_long_bit (struct gdbarch *gdbarch); |
137 | extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit); | |
83905903 AC |
138 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT) |
139 | #error "Non multi-arch definition of TARGET_LONG_LONG_BIT" | |
140 | #endif | |
c25083af | 141 | #if !defined (TARGET_LONG_LONG_BIT) |
0f71a2f6 JM |
142 | #define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch)) |
143 | #endif | |
0f71a2f6 | 144 | |
66b43ecb AC |
145 | /* Number of bits in a float for the target machine. */ |
146 | ||
104c1213 JM |
147 | extern int gdbarch_float_bit (struct gdbarch *gdbarch); |
148 | extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit); | |
83905903 AC |
149 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT) |
150 | #error "Non multi-arch definition of TARGET_FLOAT_BIT" | |
151 | #endif | |
c25083af | 152 | #if !defined (TARGET_FLOAT_BIT) |
0f71a2f6 JM |
153 | #define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch)) |
154 | #endif | |
0f71a2f6 | 155 | |
66b43ecb AC |
156 | /* Number of bits in a double for the target machine. */ |
157 | ||
104c1213 JM |
158 | extern int gdbarch_double_bit (struct gdbarch *gdbarch); |
159 | extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit); | |
83905903 AC |
160 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT) |
161 | #error "Non multi-arch definition of TARGET_DOUBLE_BIT" | |
162 | #endif | |
c25083af | 163 | #if !defined (TARGET_DOUBLE_BIT) |
0f71a2f6 JM |
164 | #define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch)) |
165 | #endif | |
0f71a2f6 | 166 | |
66b43ecb AC |
167 | /* Number of bits in a long double for the target machine. */ |
168 | ||
104c1213 JM |
169 | extern int gdbarch_long_double_bit (struct gdbarch *gdbarch); |
170 | extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit); | |
83905903 AC |
171 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT) |
172 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT" | |
173 | #endif | |
c25083af | 174 | #if !defined (TARGET_LONG_DOUBLE_BIT) |
0f71a2f6 JM |
175 | #define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch)) |
176 | #endif | |
0f71a2f6 | 177 | |
52204a0b DT |
178 | /* For most targets, a pointer on the target and its representation as an |
179 | address in GDB have the same size and "look the same". For such a | |
180 | target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT | |
181 | / addr_bit will be set from it. | |
182 | ||
183 | If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably | |
184 | also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well. | |
185 | ||
186 | ptr_bit is the size of a pointer on the target */ | |
66b43ecb | 187 | |
66b43ecb AC |
188 | extern int gdbarch_ptr_bit (struct gdbarch *gdbarch); |
189 | extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit); | |
83905903 AC |
190 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT) |
191 | #error "Non multi-arch definition of TARGET_PTR_BIT" | |
192 | #endif | |
c25083af | 193 | #if !defined (TARGET_PTR_BIT) |
66b43ecb AC |
194 | #define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch)) |
195 | #endif | |
66b43ecb | 196 | |
52204a0b DT |
197 | /* addr_bit is the size of a target address as represented in gdb */ |
198 | ||
52204a0b DT |
199 | extern int gdbarch_addr_bit (struct gdbarch *gdbarch); |
200 | extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit); | |
83905903 AC |
201 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT) |
202 | #error "Non multi-arch definition of TARGET_ADDR_BIT" | |
203 | #endif | |
c25083af | 204 | #if !defined (TARGET_ADDR_BIT) |
52204a0b DT |
205 | #define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch)) |
206 | #endif | |
52204a0b | 207 | |
66b43ecb AC |
208 | /* Number of bits in a BFD_VMA for the target object file format. */ |
209 | ||
66b43ecb AC |
210 | extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch); |
211 | extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit); | |
83905903 AC |
212 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT) |
213 | #error "Non multi-arch definition of TARGET_BFD_VMA_BIT" | |
214 | #endif | |
c25083af | 215 | #if !defined (TARGET_BFD_VMA_BIT) |
66b43ecb AC |
216 | #define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch)) |
217 | #endif | |
66b43ecb | 218 | |
4e409299 JB |
219 | /* One if `char' acts like `signed char', zero if `unsigned char'. */ |
220 | ||
4e409299 JB |
221 | extern int gdbarch_char_signed (struct gdbarch *gdbarch); |
222 | extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed); | |
223 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED) | |
224 | #error "Non multi-arch definition of TARGET_CHAR_SIGNED" | |
225 | #endif | |
c25083af | 226 | #if !defined (TARGET_CHAR_SIGNED) |
4e409299 JB |
227 | #define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch)) |
228 | #endif | |
4e409299 | 229 | |
cde9ea48 AC |
230 | #if defined (TARGET_READ_PC) |
231 | /* Legacy for systems yet to multi-arch TARGET_READ_PC */ | |
232 | #if !defined (TARGET_READ_PC_P) | |
233 | #define TARGET_READ_PC_P() (1) | |
234 | #endif | |
235 | #endif | |
236 | ||
cde9ea48 AC |
237 | extern int gdbarch_read_pc_p (struct gdbarch *gdbarch); |
238 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC_P) | |
239 | #error "Non multi-arch definition of TARGET_READ_PC" | |
240 | #endif | |
241 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC_P) | |
242 | #define TARGET_READ_PC_P() (gdbarch_read_pc_p (current_gdbarch)) | |
243 | #endif | |
244 | ||
39f77062 KB |
245 | typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid); |
246 | extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid); | |
104c1213 | 247 | extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc); |
83905903 AC |
248 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC) |
249 | #error "Non multi-arch definition of TARGET_READ_PC" | |
250 | #endif | |
c25083af | 251 | #if !defined (TARGET_READ_PC) |
39f77062 | 252 | #define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid)) |
0f71a2f6 | 253 | #endif |
0f71a2f6 | 254 | |
39f77062 KB |
255 | typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid); |
256 | extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid); | |
104c1213 | 257 | extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc); |
83905903 AC |
258 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC) |
259 | #error "Non multi-arch definition of TARGET_WRITE_PC" | |
260 | #endif | |
c25083af | 261 | #if !defined (TARGET_WRITE_PC) |
39f77062 | 262 | #define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid)) |
0f71a2f6 | 263 | #endif |
0f71a2f6 | 264 | |
a9e5fdc2 AC |
265 | /* UNWIND_SP is a direct replacement for TARGET_READ_SP. */ |
266 | ||
bd1ce8ba AC |
267 | #if defined (TARGET_READ_SP) |
268 | /* Legacy for systems yet to multi-arch TARGET_READ_SP */ | |
269 | #if !defined (TARGET_READ_SP_P) | |
270 | #define TARGET_READ_SP_P() (1) | |
271 | #endif | |
272 | #endif | |
273 | ||
bd1ce8ba AC |
274 | extern int gdbarch_read_sp_p (struct gdbarch *gdbarch); |
275 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP_P) | |
276 | #error "Non multi-arch definition of TARGET_READ_SP" | |
277 | #endif | |
278 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP_P) | |
279 | #define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch)) | |
280 | #endif | |
281 | ||
104c1213 JM |
282 | typedef CORE_ADDR (gdbarch_read_sp_ftype) (void); |
283 | extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch); | |
284 | extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp); | |
83905903 AC |
285 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP) |
286 | #error "Non multi-arch definition of TARGET_READ_SP" | |
287 | #endif | |
c25083af | 288 | #if !defined (TARGET_READ_SP) |
0f71a2f6 JM |
289 | #define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch)) |
290 | #endif | |
0f71a2f6 | 291 | |
39d4ef09 AC |
292 | /* Function for getting target's idea of a frame pointer. FIXME: GDB's |
293 | whole scheme for dealing with "frames" and "frame pointers" needs a | |
294 | serious shakedown. */ | |
295 | ||
39d4ef09 AC |
296 | typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset); |
297 | extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset); | |
298 | extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer); | |
299 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER) | |
300 | #error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER" | |
301 | #endif | |
c25083af | 302 | #if !defined (TARGET_VIRTUAL_FRAME_POINTER) |
39d4ef09 AC |
303 | #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset)) |
304 | #endif | |
39d4ef09 | 305 | |
d8124050 | 306 | extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch); |
61a0eb5b | 307 | |
d8124050 AC |
308 | typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf); |
309 | extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf); | |
310 | extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read); | |
61a0eb5b | 311 | |
d8124050 | 312 | extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch); |
61a0eb5b | 313 | |
d8124050 AC |
314 | typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf); |
315 | extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf); | |
316 | extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write); | |
61a0eb5b | 317 | |
104c1213 JM |
318 | extern int gdbarch_num_regs (struct gdbarch *gdbarch); |
319 | extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs); | |
83905903 AC |
320 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS) |
321 | #error "Non multi-arch definition of NUM_REGS" | |
322 | #endif | |
c25083af | 323 | #if !defined (NUM_REGS) |
0f71a2f6 JM |
324 | #define NUM_REGS (gdbarch_num_regs (current_gdbarch)) |
325 | #endif | |
0f71a2f6 | 326 | |
34620563 AC |
327 | /* This macro gives the number of pseudo-registers that live in the |
328 | register namespace but do not get fetched or stored on the target. | |
329 | These pseudo-registers may be aliases for other registers, | |
330 | combinations of other registers, or they may be computed by GDB. */ | |
331 | ||
0aba1244 EZ |
332 | extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch); |
333 | extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs); | |
83905903 AC |
334 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS) |
335 | #error "Non multi-arch definition of NUM_PSEUDO_REGS" | |
336 | #endif | |
c25083af | 337 | #if !defined (NUM_PSEUDO_REGS) |
0aba1244 EZ |
338 | #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch)) |
339 | #endif | |
0aba1244 | 340 | |
c2169756 AC |
341 | /* GDB's standard (or well known) register numbers. These can map onto |
342 | a real register or a pseudo (computed) register or not be defined at | |
a9e5fdc2 AC |
343 | all (-1). |
344 | SP_REGNUM will hopefully be replaced by UNWIND_SP. */ | |
1200cd6e | 345 | |
104c1213 JM |
346 | extern int gdbarch_sp_regnum (struct gdbarch *gdbarch); |
347 | extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum); | |
83905903 AC |
348 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM) |
349 | #error "Non multi-arch definition of SP_REGNUM" | |
350 | #endif | |
c25083af | 351 | #if !defined (SP_REGNUM) |
0f71a2f6 JM |
352 | #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch)) |
353 | #endif | |
0f71a2f6 | 354 | |
104c1213 JM |
355 | extern int gdbarch_pc_regnum (struct gdbarch *gdbarch); |
356 | extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum); | |
83905903 AC |
357 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM) |
358 | #error "Non multi-arch definition of PC_REGNUM" | |
359 | #endif | |
c25083af | 360 | #if !defined (PC_REGNUM) |
0f71a2f6 JM |
361 | #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch)) |
362 | #endif | |
0f71a2f6 | 363 | |
c2169756 AC |
364 | extern int gdbarch_ps_regnum (struct gdbarch *gdbarch); |
365 | extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum); | |
366 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM) | |
367 | #error "Non multi-arch definition of PS_REGNUM" | |
368 | #endif | |
c25083af | 369 | #if !defined (PS_REGNUM) |
c2169756 AC |
370 | #define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch)) |
371 | #endif | |
c2169756 | 372 | |
60054393 MS |
373 | extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch); |
374 | extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum); | |
83905903 AC |
375 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM) |
376 | #error "Non multi-arch definition of FP0_REGNUM" | |
377 | #endif | |
c25083af | 378 | #if !defined (FP0_REGNUM) |
60054393 MS |
379 | #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch)) |
380 | #endif | |
60054393 | 381 | |
88c72b7d AC |
382 | /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */ |
383 | ||
88c72b7d AC |
384 | typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr); |
385 | extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr); | |
386 | extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum); | |
83905903 AC |
387 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM) |
388 | #error "Non multi-arch definition of STAB_REG_TO_REGNUM" | |
389 | #endif | |
c25083af | 390 | #if !defined (STAB_REG_TO_REGNUM) |
88c72b7d AC |
391 | #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr)) |
392 | #endif | |
88c72b7d AC |
393 | |
394 | /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */ | |
395 | ||
88c72b7d AC |
396 | typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr); |
397 | extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr); | |
398 | extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum); | |
83905903 AC |
399 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM) |
400 | #error "Non multi-arch definition of ECOFF_REG_TO_REGNUM" | |
401 | #endif | |
c25083af | 402 | #if !defined (ECOFF_REG_TO_REGNUM) |
88c72b7d AC |
403 | #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr)) |
404 | #endif | |
88c72b7d AC |
405 | |
406 | /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */ | |
407 | ||
88c72b7d AC |
408 | typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr); |
409 | extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr); | |
410 | extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum); | |
83905903 AC |
411 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM) |
412 | #error "Non multi-arch definition of DWARF_REG_TO_REGNUM" | |
413 | #endif | |
c25083af | 414 | #if !defined (DWARF_REG_TO_REGNUM) |
88c72b7d AC |
415 | #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr)) |
416 | #endif | |
88c72b7d | 417 | |
77949794 | 418 | /* Convert from an sdb register number to an internal gdb register number. */ |
88c72b7d | 419 | |
88c72b7d AC |
420 | typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr); |
421 | extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr); | |
422 | extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum); | |
83905903 AC |
423 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM) |
424 | #error "Non multi-arch definition of SDB_REG_TO_REGNUM" | |
425 | #endif | |
c25083af | 426 | #if !defined (SDB_REG_TO_REGNUM) |
88c72b7d AC |
427 | #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr)) |
428 | #endif | |
88c72b7d | 429 | |
88c72b7d AC |
430 | typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr); |
431 | extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr); | |
432 | extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum); | |
83905903 AC |
433 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM) |
434 | #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM" | |
435 | #endif | |
c25083af | 436 | #if !defined (DWARF2_REG_TO_REGNUM) |
88c72b7d AC |
437 | #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr)) |
438 | #endif | |
88c72b7d | 439 | |
fa88f677 AC |
440 | typedef const char * (gdbarch_register_name_ftype) (int regnr); |
441 | extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr); | |
104c1213 | 442 | extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name); |
83905903 AC |
443 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME) |
444 | #error "Non multi-arch definition of REGISTER_NAME" | |
445 | #endif | |
c25083af | 446 | #if !defined (REGISTER_NAME) |
0f71a2f6 JM |
447 | #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr)) |
448 | #endif | |
0f71a2f6 | 449 | |
2e092625 | 450 | /* REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE. */ |
9c04cab7 AC |
451 | |
452 | extern int gdbarch_register_type_p (struct gdbarch *gdbarch); | |
453 | ||
454 | typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr); | |
455 | extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr); | |
456 | extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type); | |
457 | ||
2e092625 | 458 | /* REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE. */ |
9c04cab7 | 459 | |
2e092625 AC |
460 | #if defined (DEPRECATED_REGISTER_VIRTUAL_TYPE) |
461 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_VIRTUAL_TYPE */ | |
462 | #if !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P) | |
463 | #define DEPRECATED_REGISTER_VIRTUAL_TYPE_P() (1) | |
9c04cab7 AC |
464 | #endif |
465 | #endif | |
466 | ||
9c04cab7 | 467 | extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch); |
2e092625 AC |
468 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P) |
469 | #error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_TYPE" | |
9c04cab7 | 470 | #endif |
2e092625 AC |
471 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P) |
472 | #define DEPRECATED_REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch)) | |
9c04cab7 AC |
473 | #endif |
474 | ||
9c04cab7 AC |
475 | typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr); |
476 | extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr); | |
477 | extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type); | |
2e092625 AC |
478 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_TYPE) |
479 | #error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_TYPE" | |
9c04cab7 | 480 | #endif |
2e092625 AC |
481 | #if !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE) |
482 | #define DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr)) | |
9c04cab7 AC |
483 | #endif |
484 | ||
485 | /* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed | |
486 | from REGISTER_TYPE. */ | |
487 | ||
b8b527c5 AC |
488 | extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch); |
489 | extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes); | |
490 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES) | |
491 | #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES" | |
83905903 | 492 | #endif |
b8b527c5 AC |
493 | #if !defined (DEPRECATED_REGISTER_BYTES) |
494 | #define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch)) | |
0f71a2f6 | 495 | #endif |
0f71a2f6 | 496 | |
f3be58bc AC |
497 | /* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the |
498 | register offsets computed using just REGISTER_TYPE, this can be | |
499 | deleted. See: maint print registers. NOTE: cagney/2002-05-02: This | |
500 | function with predicate has a valid (callable) initial value. As a | |
501 | consequence, even when the predicate is false, the corresponding | |
502 | function works. This simplifies the migration process - old code, | |
503 | calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */ | |
46654a5b | 504 | |
62700349 AC |
505 | #if defined (DEPRECATED_REGISTER_BYTE) |
506 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_BYTE */ | |
507 | #if !defined (DEPRECATED_REGISTER_BYTE_P) | |
508 | #define DEPRECATED_REGISTER_BYTE_P() (1) | |
46654a5b AC |
509 | #endif |
510 | #endif | |
511 | ||
9c04cab7 | 512 | extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch); |
62700349 AC |
513 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTE_P) |
514 | #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE" | |
46654a5b | 515 | #endif |
62700349 AC |
516 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_BYTE_P) |
517 | #define DEPRECATED_REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch)) | |
46654a5b AC |
518 | #endif |
519 | ||
9c04cab7 AC |
520 | typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr); |
521 | extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr); | |
522 | extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte); | |
62700349 AC |
523 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTE) |
524 | #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE" | |
83905903 | 525 | #endif |
62700349 AC |
526 | #if !defined (DEPRECATED_REGISTER_BYTE) |
527 | #define DEPRECATED_REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr)) | |
0f71a2f6 | 528 | #endif |
0f71a2f6 | 529 | |
f3be58bc AC |
530 | /* If all registers have identical raw and virtual sizes and those |
531 | sizes agree with the value computed from REGISTER_TYPE, | |
532 | DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print | |
533 | registers. */ | |
35cac7cf | 534 | |
12c266ea AC |
535 | #if defined (DEPRECATED_REGISTER_RAW_SIZE) |
536 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_RAW_SIZE */ | |
537 | #if !defined (DEPRECATED_REGISTER_RAW_SIZE_P) | |
538 | #define DEPRECATED_REGISTER_RAW_SIZE_P() (1) | |
dadd712e AC |
539 | #endif |
540 | #endif | |
541 | ||
dadd712e | 542 | extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch); |
12c266ea AC |
543 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE_P) |
544 | #error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE" | |
dadd712e | 545 | #endif |
12c266ea AC |
546 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_RAW_SIZE_P) |
547 | #define DEPRECATED_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch)) | |
dadd712e AC |
548 | #endif |
549 | ||
9c04cab7 AC |
550 | typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr); |
551 | extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr); | |
552 | extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size); | |
12c266ea AC |
553 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE) |
554 | #error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE" | |
83905903 | 555 | #endif |
12c266ea AC |
556 | #if !defined (DEPRECATED_REGISTER_RAW_SIZE) |
557 | #define DEPRECATED_REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr)) | |
9c04cab7 AC |
558 | #endif |
559 | ||
f3be58bc AC |
560 | /* If all registers have identical raw and virtual sizes and those |
561 | sizes agree with the value computed from REGISTER_TYPE, | |
562 | DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print | |
563 | registers. */ | |
9c04cab7 | 564 | |
f30992d4 AC |
565 | #if defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) |
566 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_VIRTUAL_SIZE */ | |
567 | #if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) | |
568 | #define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (1) | |
dadd712e AC |
569 | #endif |
570 | #endif | |
571 | ||
dadd712e | 572 | extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch); |
f30992d4 AC |
573 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) |
574 | #error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE" | |
dadd712e | 575 | #endif |
f30992d4 AC |
576 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) |
577 | #define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch)) | |
dadd712e AC |
578 | #endif |
579 | ||
9c04cab7 AC |
580 | typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr); |
581 | extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr); | |
582 | extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size); | |
f30992d4 AC |
583 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) |
584 | #error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE" | |
9c04cab7 | 585 | #endif |
f30992d4 AC |
586 | #if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) |
587 | #define DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr)) | |
9c04cab7 AC |
588 | #endif |
589 | ||
590 | /* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been | |
591 | replaced by the constant MAX_REGISTER_SIZE. */ | |
35cac7cf | 592 | |
a0ed5532 AC |
593 | #if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) |
594 | /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */ | |
595 | #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
596 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1) | |
597 | #endif | |
598 | #endif | |
599 | ||
a0ed5532 AC |
600 | extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch); |
601 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
602 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE" | |
603 | #endif | |
604 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
605 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch)) | |
606 | #endif | |
607 | ||
a0ed5532 AC |
608 | extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch); |
609 | extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size); | |
610 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) | |
611 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE" | |
83905903 | 612 | #endif |
c25083af | 613 | #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) |
a0ed5532 | 614 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch)) |
0f71a2f6 | 615 | #endif |
0f71a2f6 | 616 | |
9c04cab7 AC |
617 | /* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been |
618 | replaced by the constant MAX_REGISTER_SIZE. */ | |
35cac7cf | 619 | |
a0ed5532 AC |
620 | #if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) |
621 | /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */ | |
622 | #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
623 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1) | |
624 | #endif | |
625 | #endif | |
626 | ||
a0ed5532 AC |
627 | extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch); |
628 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
629 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE" | |
630 | #endif | |
631 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
632 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch)) | |
633 | #endif | |
634 | ||
a0ed5532 AC |
635 | extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch); |
636 | extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size); | |
637 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) | |
638 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE" | |
83905903 | 639 | #endif |
c25083af | 640 | #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) |
a0ed5532 | 641 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch)) |
0f71a2f6 | 642 | #endif |
0f71a2f6 | 643 | |
f3be58bc AC |
644 | /* See gdbint.texinfo, and PUSH_DUMMY_CALL. */ |
645 | ||
646 | extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch); | |
647 | ||
648 | typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info); | |
649 | extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info); | |
650 | extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id); | |
651 | ||
652 | /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete | |
653 | SAVE_DUMMY_FRAME_TOS. */ | |
654 | ||
a59fe496 AC |
655 | #if defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) |
656 | /* Legacy for systems yet to multi-arch DEPRECATED_SAVE_DUMMY_FRAME_TOS */ | |
657 | #if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) | |
658 | #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (1) | |
f3be58bc AC |
659 | #endif |
660 | #endif | |
661 | ||
a59fe496 AC |
662 | extern int gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch); |
663 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) | |
664 | #error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS" | |
f3be58bc | 665 | #endif |
a59fe496 AC |
666 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) |
667 | #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (gdbarch_deprecated_save_dummy_frame_tos_p (current_gdbarch)) | |
f3be58bc AC |
668 | #endif |
669 | ||
a59fe496 AC |
670 | typedef void (gdbarch_deprecated_save_dummy_frame_tos_ftype) (CORE_ADDR sp); |
671 | extern void gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp); | |
672 | extern void set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos); | |
673 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) | |
674 | #error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS" | |
f3be58bc | 675 | #endif |
a59fe496 AC |
676 | #if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) |
677 | #define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_deprecated_save_dummy_frame_tos (current_gdbarch, sp)) | |
f3be58bc AC |
678 | #endif |
679 | ||
680 | /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete | |
681 | DEPRECATED_FP_REGNUM. */ | |
682 | ||
f3be58bc AC |
683 | extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch); |
684 | extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum); | |
685 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM) | |
686 | #error "Non multi-arch definition of DEPRECATED_FP_REGNUM" | |
687 | #endif | |
688 | #if !defined (DEPRECATED_FP_REGNUM) | |
689 | #define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch)) | |
690 | #endif | |
691 | ||
692 | /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete | |
693 | DEPRECATED_TARGET_READ_FP. */ | |
694 | ||
695 | #if defined (DEPRECATED_TARGET_READ_FP) | |
696 | /* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */ | |
697 | #if !defined (DEPRECATED_TARGET_READ_FP_P) | |
698 | #define DEPRECATED_TARGET_READ_FP_P() (1) | |
699 | #endif | |
700 | #endif | |
701 | ||
f3be58bc AC |
702 | extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch); |
703 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P) | |
704 | #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP" | |
705 | #endif | |
706 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P) | |
707 | #define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch)) | |
708 | #endif | |
709 | ||
f3be58bc AC |
710 | typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void); |
711 | extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch); | |
712 | extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp); | |
713 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP) | |
714 | #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP" | |
715 | #endif | |
716 | #if !defined (DEPRECATED_TARGET_READ_FP) | |
717 | #define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch)) | |
718 | #endif | |
719 | ||
b8de8283 AC |
720 | /* See gdbint.texinfo. See infcall.c. New, all singing all dancing, |
721 | replacement for DEPRECATED_PUSH_ARGUMENTS. */ | |
722 | ||
723 | extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch); | |
724 | ||
725 | typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); | |
726 | extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); | |
727 | extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call); | |
728 | ||
729 | /* PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS. */ | |
730 | ||
731 | #if defined (DEPRECATED_PUSH_ARGUMENTS) | |
732 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */ | |
733 | #if !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
734 | #define DEPRECATED_PUSH_ARGUMENTS_P() (1) | |
735 | #endif | |
736 | #endif | |
737 | ||
b8de8283 AC |
738 | extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch); |
739 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
740 | #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS" | |
741 | #endif | |
742 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
743 | #define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch)) | |
744 | #endif | |
745 | ||
b8de8283 AC |
746 | typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); |
747 | extern CORE_ADDR gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); | |
748 | extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments); | |
749 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS) | |
750 | #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS" | |
751 | #endif | |
752 | #if !defined (DEPRECATED_PUSH_ARGUMENTS) | |
753 | #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr)) | |
754 | #endif | |
755 | ||
756 | /* DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true. */ | |
757 | ||
b8de8283 AC |
758 | extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch); |
759 | extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames); | |
760 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) | |
761 | #error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES" | |
762 | #endif | |
763 | #if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) | |
764 | #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch)) | |
765 | #endif | |
766 | ||
767 | /* Implement PUSH_RETURN_ADDRESS, and then merge in | |
768 | DEPRECATED_PUSH_RETURN_ADDRESS. */ | |
769 | ||
770 | #if defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
771 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */ | |
772 | #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
773 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1) | |
774 | #endif | |
775 | #endif | |
776 | ||
b8de8283 AC |
777 | extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch); |
778 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
779 | #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS" | |
780 | #endif | |
781 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
782 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch)) | |
783 | #endif | |
784 | ||
b8de8283 AC |
785 | typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp); |
786 | extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp); | |
787 | extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address); | |
788 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
789 | #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS" | |
790 | #endif | |
791 | #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
792 | #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp)) | |
793 | #endif | |
794 | ||
795 | /* Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP. */ | |
796 | ||
797 | #if defined (DEPRECATED_DUMMY_WRITE_SP) | |
798 | /* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */ | |
799 | #if !defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
800 | #define DEPRECATED_DUMMY_WRITE_SP_P() (1) | |
801 | #endif | |
802 | #endif | |
803 | ||
b8de8283 AC |
804 | extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch); |
805 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
806 | #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP" | |
807 | #endif | |
808 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
809 | #define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch)) | |
810 | #endif | |
811 | ||
b8de8283 AC |
812 | typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val); |
813 | extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val); | |
814 | extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp); | |
815 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP) | |
816 | #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP" | |
817 | #endif | |
818 | #if !defined (DEPRECATED_DUMMY_WRITE_SP) | |
819 | #define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val)) | |
820 | #endif | |
821 | ||
822 | /* DEPRECATED_REGISTER_SIZE can be deleted. */ | |
823 | ||
824 | extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch); | |
825 | extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size); | |
826 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE) | |
827 | #error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE" | |
828 | #endif | |
829 | #if !defined (DEPRECATED_REGISTER_SIZE) | |
830 | #define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch)) | |
831 | #endif | |
832 | ||
b8de8283 AC |
833 | extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch); |
834 | extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location); | |
835 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION) | |
836 | #error "Non multi-arch definition of CALL_DUMMY_LOCATION" | |
837 | #endif | |
838 | #if !defined (CALL_DUMMY_LOCATION) | |
839 | #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch)) | |
840 | #endif | |
841 | ||
b8de8283 AC |
842 | /* DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted. */ |
843 | ||
844 | extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch); | |
845 | extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset); | |
846 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET) | |
847 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET" | |
848 | #endif | |
849 | #if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET) | |
850 | #define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch)) | |
851 | #endif | |
852 | ||
853 | /* DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted. */ | |
854 | ||
855 | extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch); | |
856 | extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset); | |
857 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET) | |
858 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET" | |
859 | #endif | |
860 | #if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET) | |
861 | #define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch)) | |
862 | #endif | |
863 | ||
b8de8283 AC |
864 | /* DEPRECATED_CALL_DUMMY_WORDS can be deleted. */ |
865 | ||
b8de8283 AC |
866 | extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch); |
867 | extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words); | |
868 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS) | |
869 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS" | |
870 | #endif | |
871 | #if !defined (DEPRECATED_CALL_DUMMY_WORDS) | |
872 | #define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch)) | |
873 | #endif | |
874 | ||
875 | /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS. */ | |
876 | ||
b8de8283 AC |
877 | extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch); |
878 | extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words); | |
879 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) | |
880 | #error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS" | |
881 | #endif | |
882 | #if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) | |
883 | #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch)) | |
884 | #endif | |
885 | ||
b8de8283 AC |
886 | /* DEPRECATED_FIX_CALL_DUMMY can be deleted. For the SPARC, implement |
887 | PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK. */ | |
888 | ||
889 | #if defined (DEPRECATED_FIX_CALL_DUMMY) | |
890 | /* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */ | |
891 | #if !defined (DEPRECATED_FIX_CALL_DUMMY_P) | |
892 | #define DEPRECATED_FIX_CALL_DUMMY_P() (1) | |
893 | #endif | |
894 | #endif | |
895 | ||
b8de8283 AC |
896 | extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch); |
897 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P) | |
898 | #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY" | |
899 | #endif | |
900 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P) | |
901 | #define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch)) | |
902 | #endif | |
903 | ||
b8de8283 AC |
904 | typedef void (gdbarch_deprecated_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p); |
905 | extern void gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p); | |
906 | extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy); | |
907 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY) | |
908 | #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY" | |
909 | #endif | |
910 | #if !defined (DEPRECATED_FIX_CALL_DUMMY) | |
911 | #define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_deprecated_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p)) | |
912 | #endif | |
913 | ||
914 | /* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */ | |
915 | ||
916 | extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch); | |
917 | ||
918 | typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr); | |
919 | extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr); | |
920 | extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code); | |
921 | ||
922 | /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME. */ | |
923 | ||
924 | #if defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
925 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */ | |
926 | #if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
927 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (1) | |
928 | #endif | |
929 | #endif | |
930 | ||
b8de8283 AC |
931 | extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch); |
932 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
933 | #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME" | |
934 | #endif | |
935 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
936 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch)) | |
937 | #endif | |
938 | ||
b8de8283 AC |
939 | typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void); |
940 | extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch); | |
941 | extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame); | |
942 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
943 | #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME" | |
944 | #endif | |
945 | #if !defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
946 | #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch)) | |
947 | #endif | |
948 | ||
903ad3a6 AC |
949 | #if defined (DEPRECATED_DO_REGISTERS_INFO) |
950 | /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */ | |
951 | #if !defined (DEPRECATED_DO_REGISTERS_INFO_P) | |
952 | #define DEPRECATED_DO_REGISTERS_INFO_P() (1) | |
0ab7a791 AC |
953 | #endif |
954 | #endif | |
955 | ||
903ad3a6 AC |
956 | extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch); |
957 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P) | |
958 | #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO" | |
0ab7a791 | 959 | #endif |
903ad3a6 AC |
960 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P) |
961 | #define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch)) | |
0ab7a791 AC |
962 | #endif |
963 | ||
903ad3a6 AC |
964 | typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs); |
965 | extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs); | |
966 | extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info); | |
967 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO) | |
968 | #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO" | |
83905903 | 969 | #endif |
c25083af | 970 | #if !defined (DEPRECATED_DO_REGISTERS_INFO) |
903ad3a6 | 971 | #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs)) |
666e11c5 | 972 | #endif |
666e11c5 | 973 | |
0ab7a791 AC |
974 | typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); |
975 | extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); | |
976 | extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info); | |
977 | ||
23e3a7ac AC |
978 | extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch); |
979 | ||
980 | typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
981 | extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
5e74b15c | 982 | extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info); |
5e74b15c | 983 | |
e76f1f2e AC |
984 | extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch); |
985 | ||
986 | typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
987 | extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
988 | extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info); | |
989 | ||
7c7651b2 AC |
990 | /* MAP a GDB RAW register number onto a simulator register number. See |
991 | also include/...-sim.h. */ | |
992 | ||
7c7651b2 AC |
993 | typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr); |
994 | extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr); | |
995 | extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno); | |
83905903 AC |
996 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO) |
997 | #error "Non multi-arch definition of REGISTER_SIM_REGNO" | |
998 | #endif | |
c25083af | 999 | #if !defined (REGISTER_SIM_REGNO) |
7c7651b2 AC |
1000 | #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr)) |
1001 | #endif | |
7c7651b2 | 1002 | |
2649061d AC |
1003 | #if defined (REGISTER_BYTES_OK) |
1004 | /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */ | |
eee30e78 | 1005 | #if !defined (REGISTER_BYTES_OK_P) |
2649061d AC |
1006 | #define REGISTER_BYTES_OK_P() (1) |
1007 | #endif | |
eee30e78 | 1008 | #endif |
2649061d | 1009 | |
2649061d | 1010 | extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch); |
83905903 AC |
1011 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P) |
1012 | #error "Non multi-arch definition of REGISTER_BYTES_OK" | |
1013 | #endif | |
2649061d AC |
1014 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P) |
1015 | #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch)) | |
1016 | #endif | |
1017 | ||
2649061d AC |
1018 | typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes); |
1019 | extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes); | |
1020 | extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok); | |
83905903 AC |
1021 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK) |
1022 | #error "Non multi-arch definition of REGISTER_BYTES_OK" | |
1023 | #endif | |
c25083af | 1024 | #if !defined (REGISTER_BYTES_OK) |
2649061d AC |
1025 | #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes)) |
1026 | #endif | |
2649061d | 1027 | |
01fb7433 AC |
1028 | typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum); |
1029 | extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum); | |
1030 | extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register); | |
83905903 AC |
1031 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER) |
1032 | #error "Non multi-arch definition of CANNOT_FETCH_REGISTER" | |
1033 | #endif | |
c25083af | 1034 | #if !defined (CANNOT_FETCH_REGISTER) |
01fb7433 AC |
1035 | #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum)) |
1036 | #endif | |
01fb7433 | 1037 | |
01fb7433 AC |
1038 | typedef int (gdbarch_cannot_store_register_ftype) (int regnum); |
1039 | extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum); | |
1040 | extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register); | |
83905903 AC |
1041 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER) |
1042 | #error "Non multi-arch definition of CANNOT_STORE_REGISTER" | |
1043 | #endif | |
c25083af | 1044 | #if !defined (CANNOT_STORE_REGISTER) |
01fb7433 AC |
1045 | #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum)) |
1046 | #endif | |
01fb7433 | 1047 | |
9df628e0 RE |
1048 | /* setjmp/longjmp support. */ |
1049 | ||
1050 | #if defined (GET_LONGJMP_TARGET) | |
1051 | /* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */ | |
1052 | #if !defined (GET_LONGJMP_TARGET_P) | |
1053 | #define GET_LONGJMP_TARGET_P() (1) | |
1054 | #endif | |
1055 | #endif | |
1056 | ||
9df628e0 RE |
1057 | extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch); |
1058 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P) | |
1059 | #error "Non multi-arch definition of GET_LONGJMP_TARGET" | |
1060 | #endif | |
b8de8283 AC |
1061 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P) |
1062 | #define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch)) | |
0f71a2f6 | 1063 | #endif |
0f71a2f6 | 1064 | |
b8de8283 AC |
1065 | typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc); |
1066 | extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc); | |
1067 | extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target); | |
1068 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET) | |
1069 | #error "Non multi-arch definition of GET_LONGJMP_TARGET" | |
83905903 | 1070 | #endif |
b8de8283 AC |
1071 | #if !defined (GET_LONGJMP_TARGET) |
1072 | #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc)) | |
0f71a2f6 | 1073 | #endif |
0f71a2f6 | 1074 | |
ae45cd16 AC |
1075 | /* NOTE: cagney/2002-11-24: This function with predicate has a valid |
1076 | (callable) initial value. As a consequence, even when the predicate | |
1077 | is false, the corresponding function works. This simplifies the | |
1078 | migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(), | |
1079 | doesn't need to be modified. */ | |
1080 | ||
1081 | #if defined (DEPRECATED_PC_IN_CALL_DUMMY) | |
1082 | /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */ | |
1083 | #if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) | |
1084 | #define DEPRECATED_PC_IN_CALL_DUMMY_P() (1) | |
1085 | #endif | |
1086 | #endif | |
1087 | ||
ae45cd16 | 1088 | extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch); |
55e1d7e7 | 1089 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P) |
ae45cd16 AC |
1090 | #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY" |
1091 | #endif | |
55e1d7e7 | 1092 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) |
ae45cd16 AC |
1093 | #define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch)) |
1094 | #endif | |
1095 | ||
ae45cd16 AC |
1096 | typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); |
1097 | extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); | |
1098 | extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy); | |
55e1d7e7 | 1099 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY) |
ae45cd16 | 1100 | #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY" |
83905903 | 1101 | #endif |
c25083af | 1102 | #if !defined (DEPRECATED_PC_IN_CALL_DUMMY) |
ae45cd16 | 1103 | #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address)) |
0f71a2f6 | 1104 | #endif |
0f71a2f6 | 1105 | |
a5afb99f AC |
1106 | #if defined (DEPRECATED_INIT_FRAME_PC) |
1107 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */ | |
1108 | #if !defined (DEPRECATED_INIT_FRAME_PC_P) | |
1109 | #define DEPRECATED_INIT_FRAME_PC_P() (1) | |
1110 | #endif | |
1111 | #endif | |
1112 | ||
a5afb99f AC |
1113 | extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch); |
1114 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P) | |
1115 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC" | |
1116 | #endif | |
1117 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P) | |
1118 | #define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch)) | |
1119 | #endif | |
1120 | ||
a5afb99f AC |
1121 | typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev); |
1122 | extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev); | |
1123 | extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc); | |
1124 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC) | |
1125 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC" | |
83905903 | 1126 | #endif |
c25083af | 1127 | #if !defined (DEPRECATED_INIT_FRAME_PC) |
a5afb99f | 1128 | #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev)) |
10312cc4 | 1129 | #endif |
10312cc4 | 1130 | |
104c1213 JM |
1131 | extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch); |
1132 | extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion); | |
83905903 AC |
1133 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION) |
1134 | #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION" | |
1135 | #endif | |
c25083af | 1136 | #if !defined (BELIEVE_PCC_PROMOTION) |
0f71a2f6 JM |
1137 | #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch)) |
1138 | #endif | |
0f71a2f6 | 1139 | |
104c1213 JM |
1140 | extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch); |
1141 | extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type); | |
83905903 AC |
1142 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE) |
1143 | #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE" | |
1144 | #endif | |
e669114a | 1145 | #if !defined (BELIEVE_PCC_PROMOTION_TYPE) |
0f71a2f6 JM |
1146 | #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch)) |
1147 | #endif | |
0f71a2f6 | 1148 | |
129c1cd6 AC |
1149 | #if defined (DEPRECATED_GET_SAVED_REGISTER) |
1150 | /* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */ | |
1151 | #if !defined (DEPRECATED_GET_SAVED_REGISTER_P) | |
1152 | #define DEPRECATED_GET_SAVED_REGISTER_P() (1) | |
a216a322 AC |
1153 | #endif |
1154 | #endif | |
1155 | ||
129c1cd6 AC |
1156 | extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch); |
1157 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P) | |
1158 | #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER" | |
a216a322 | 1159 | #endif |
129c1cd6 AC |
1160 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P) |
1161 | #define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch)) | |
a216a322 AC |
1162 | #endif |
1163 | ||
129c1cd6 AC |
1164 | typedef void (gdbarch_deprecated_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval); |
1165 | extern void gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval); | |
1166 | extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register); | |
1167 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER) | |
1168 | #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER" | |
83905903 | 1169 | #endif |
c25083af | 1170 | #if !defined (DEPRECATED_GET_SAVED_REGISTER) |
129c1cd6 | 1171 | #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_deprecated_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval)) |
0f71a2f6 | 1172 | #endif |
0f71a2f6 | 1173 | |
781a750d AC |
1174 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1175 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1176 | ||
cd0bfa36 AC |
1177 | #if defined (DEPRECATED_REGISTER_CONVERTIBLE) |
1178 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_CONVERTIBLE */ | |
1179 | #if !defined (DEPRECATED_REGISTER_CONVERTIBLE_P) | |
1180 | #define DEPRECATED_REGISTER_CONVERTIBLE_P() (1) | |
1181 | #endif | |
1182 | #endif | |
1183 | ||
1184 | extern int gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch); | |
1185 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE_P) | |
1186 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE" | |
1187 | #endif | |
1188 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_CONVERTIBLE_P) | |
1189 | #define DEPRECATED_REGISTER_CONVERTIBLE_P() (gdbarch_deprecated_register_convertible_p (current_gdbarch)) | |
1190 | #endif | |
1191 | ||
781a750d AC |
1192 | typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr); |
1193 | extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr); | |
1194 | extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible); | |
1195 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE) | |
1196 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE" | |
83905903 | 1197 | #endif |
781a750d AC |
1198 | #if !defined (DEPRECATED_REGISTER_CONVERTIBLE) |
1199 | #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr)) | |
0f71a2f6 | 1200 | #endif |
33489c5b | 1201 | |
781a750d AC |
1202 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1203 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1204 | ||
781a750d AC |
1205 | typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to); |
1206 | extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); | |
1207 | extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual); | |
1208 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) | |
1209 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL" | |
83905903 | 1210 | #endif |
781a750d AC |
1211 | #if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) |
1212 | #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to)) | |
0f71a2f6 | 1213 | #endif |
33489c5b | 1214 | |
781a750d AC |
1215 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1216 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1217 | ||
781a750d AC |
1218 | typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to); |
1219 | extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to); | |
1220 | extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw); | |
1221 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) | |
1222 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW" | |
83905903 | 1223 | #endif |
781a750d AC |
1224 | #if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) |
1225 | #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to)) | |
0f71a2f6 | 1226 | #endif |
33489c5b | 1227 | |
ff2e87ac AC |
1228 | typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type); |
1229 | extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type); | |
13d01224 AC |
1230 | extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p); |
1231 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P) | |
1232 | #error "Non multi-arch definition of CONVERT_REGISTER_P" | |
1233 | #endif | |
c25083af | 1234 | #if !defined (CONVERT_REGISTER_P) |
ff2e87ac | 1235 | #define CONVERT_REGISTER_P(regnum, type) (gdbarch_convert_register_p (current_gdbarch, regnum, type)) |
13d01224 | 1236 | #endif |
13d01224 | 1237 | |
ff2e87ac AC |
1238 | typedef void (gdbarch_register_to_value_ftype) (struct frame_info *frame, int regnum, struct type *type, void *buf); |
1239 | extern void gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf); | |
13d01224 AC |
1240 | extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value); |
1241 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE) | |
1242 | #error "Non multi-arch definition of REGISTER_TO_VALUE" | |
1243 | #endif | |
c25083af | 1244 | #if !defined (REGISTER_TO_VALUE) |
ff2e87ac | 1245 | #define REGISTER_TO_VALUE(frame, regnum, type, buf) (gdbarch_register_to_value (current_gdbarch, frame, regnum, type, buf)) |
13d01224 | 1246 | #endif |
13d01224 | 1247 | |
ff2e87ac AC |
1248 | typedef void (gdbarch_value_to_register_ftype) (struct frame_info *frame, int regnum, struct type *type, const void *buf); |
1249 | extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf); | |
13d01224 AC |
1250 | extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register); |
1251 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER) | |
1252 | #error "Non multi-arch definition of VALUE_TO_REGISTER" | |
1253 | #endif | |
c25083af | 1254 | #if !defined (VALUE_TO_REGISTER) |
ff2e87ac | 1255 | #define VALUE_TO_REGISTER(frame, regnum, type, buf) (gdbarch_value_to_register (current_gdbarch, frame, regnum, type, buf)) |
13d01224 | 1256 | #endif |
13d01224 | 1257 | |
66140c26 AC |
1258 | typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf); |
1259 | extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf); | |
4478b372 | 1260 | extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address); |
83905903 AC |
1261 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS) |
1262 | #error "Non multi-arch definition of POINTER_TO_ADDRESS" | |
1263 | #endif | |
c25083af | 1264 | #if !defined (POINTER_TO_ADDRESS) |
4478b372 JB |
1265 | #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf)) |
1266 | #endif | |
33489c5b | 1267 | |
ac2e2ef7 AC |
1268 | typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr); |
1269 | extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr); | |
4478b372 | 1270 | extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer); |
83905903 AC |
1271 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER) |
1272 | #error "Non multi-arch definition of ADDRESS_TO_POINTER" | |
1273 | #endif | |
c25083af | 1274 | #if !defined (ADDRESS_TO_POINTER) |
4478b372 JB |
1275 | #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr)) |
1276 | #endif | |
33489c5b | 1277 | |
fc0c74b1 AC |
1278 | #if defined (INTEGER_TO_ADDRESS) |
1279 | /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */ | |
1280 | #if !defined (INTEGER_TO_ADDRESS_P) | |
1281 | #define INTEGER_TO_ADDRESS_P() (1) | |
1282 | #endif | |
1283 | #endif | |
1284 | ||
fc0c74b1 AC |
1285 | extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch); |
1286 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P) | |
1287 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1288 | #endif | |
1289 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P) | |
1290 | #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch)) | |
1291 | #endif | |
1292 | ||
fc0c74b1 AC |
1293 | typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf); |
1294 | extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf); | |
1295 | extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address); | |
1296 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS) | |
1297 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1298 | #endif | |
c25083af | 1299 | #if !defined (INTEGER_TO_ADDRESS) |
fc0c74b1 AC |
1300 | #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf)) |
1301 | #endif | |
fc0c74b1 | 1302 | |
749b82f6 AC |
1303 | #if defined (DEPRECATED_POP_FRAME) |
1304 | /* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */ | |
1305 | #if !defined (DEPRECATED_POP_FRAME_P) | |
1306 | #define DEPRECATED_POP_FRAME_P() (1) | |
dedc2a2b AC |
1307 | #endif |
1308 | #endif | |
1309 | ||
749b82f6 AC |
1310 | extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch); |
1311 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P) | |
1312 | #error "Non multi-arch definition of DEPRECATED_POP_FRAME" | |
dedc2a2b | 1313 | #endif |
749b82f6 AC |
1314 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P) |
1315 | #define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch)) | |
dedc2a2b AC |
1316 | #endif |
1317 | ||
749b82f6 AC |
1318 | typedef void (gdbarch_deprecated_pop_frame_ftype) (void); |
1319 | extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch); | |
1320 | extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame); | |
1321 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME) | |
1322 | #error "Non multi-arch definition of DEPRECATED_POP_FRAME" | |
83905903 | 1323 | #endif |
c25083af | 1324 | #if !defined (DEPRECATED_POP_FRAME) |
749b82f6 | 1325 | #define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch)) |
0f71a2f6 | 1326 | #endif |
0f71a2f6 | 1327 | |
4183d812 AC |
1328 | /* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */ |
1329 | ||
1330 | #if defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1331 | /* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */ | |
1332 | #if !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1333 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (1) | |
1334 | #endif | |
1335 | #endif | |
1336 | ||
4183d812 AC |
1337 | extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch); |
1338 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1339 | #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN" | |
1340 | #endif | |
1341 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1342 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch)) | |
1343 | #endif | |
1344 | ||
4183d812 AC |
1345 | typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp); |
1346 | extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp); | |
1347 | extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return); | |
1348 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1349 | #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN" | |
83905903 | 1350 | #endif |
c25083af | 1351 | #if !defined (DEPRECATED_STORE_STRUCT_RETURN) |
4183d812 | 1352 | #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp)) |
0f71a2f6 | 1353 | #endif |
0f71a2f6 | 1354 | |
92ad9cd9 AC |
1355 | /* It has been suggested that this, well actually its predecessor, |
1356 | should take the type/value of the function to be called and not the | |
1357 | return type. This is left as an exercise for the reader. */ | |
1358 | ||
1359 | extern int gdbarch_return_value_p (struct gdbarch *gdbarch); | |
1360 | ||
963e2bb7 AC |
1361 | typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf); |
1362 | extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf); | |
92ad9cd9 AC |
1363 | extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value); |
1364 | ||
1365 | /* The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE, | |
1366 | STORE_RETURN_VALUE and USE_STRUCT_CONVENTION have all been folded | |
74055713 | 1367 | into RETURN_VALUE. */ |
92ad9cd9 AC |
1368 | |
1369 | typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type); | |
1370 | extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type); | |
1371 | extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack); | |
1372 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK) | |
1373 | #error "Non multi-arch definition of RETURN_VALUE_ON_STACK" | |
1374 | #endif | |
1375 | #if !defined (RETURN_VALUE_ON_STACK) | |
1376 | #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type)) | |
1377 | #endif | |
1378 | ||
ebba8386 AC |
1379 | typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf); |
1380 | extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf); | |
1381 | extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value); | |
1382 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE) | |
1383 | #error "Non multi-arch definition of EXTRACT_RETURN_VALUE" | |
1384 | #endif | |
c25083af | 1385 | #if !defined (EXTRACT_RETURN_VALUE) |
ebba8386 AC |
1386 | #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf)) |
1387 | #endif | |
ebba8386 | 1388 | |
ebba8386 AC |
1389 | typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf); |
1390 | extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf); | |
104c1213 | 1391 | extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value); |
83905903 AC |
1392 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE) |
1393 | #error "Non multi-arch definition of STORE_RETURN_VALUE" | |
1394 | #endif | |
c25083af | 1395 | #if !defined (STORE_RETURN_VALUE) |
ebba8386 AC |
1396 | #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf)) |
1397 | #endif | |
ebba8386 AC |
1398 | |
1399 | typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf); | |
1400 | extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf); | |
1401 | extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value); | |
1402 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE) | |
1403 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE" | |
1404 | #endif | |
c25083af | 1405 | #if !defined (DEPRECATED_EXTRACT_RETURN_VALUE) |
ebba8386 AC |
1406 | #define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf)) |
1407 | #endif | |
ebba8386 AC |
1408 | |
1409 | typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf); | |
1410 | extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf); | |
1411 | extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value); | |
1412 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE) | |
1413 | #error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE" | |
1414 | #endif | |
c25083af | 1415 | #if !defined (DEPRECATED_STORE_RETURN_VALUE) |
ebba8386 | 1416 | #define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf)) |
0f71a2f6 | 1417 | #endif |
0f71a2f6 | 1418 | |
92ad9cd9 AC |
1419 | typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type); |
1420 | extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type); | |
1421 | extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention); | |
1422 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION) | |
1423 | #error "Non multi-arch definition of USE_STRUCT_CONVENTION" | |
1424 | #endif | |
1425 | #if !defined (USE_STRUCT_CONVENTION) | |
1426 | #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type)) | |
1427 | #endif | |
1428 | ||
74055713 AC |
1429 | /* As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an |
1430 | ABI suitable for the implementation of a robust extract | |
1431 | struct-convention return-value address method (the sparc saves the | |
1432 | address in the callers frame). All the other cases so far examined, | |
1433 | the DEPRECATED_EXTRACT_STRUCT_VALUE implementation has been | |
1434 | erreneous - the code was incorrectly assuming that the return-value | |
1435 | address, stored in a register, was preserved across the entire | |
1436 | function call. | |
1437 | For the moment retain DEPRECATED_EXTRACT_STRUCT_VALUE as a marker of | |
1438 | the ABIs that are still to be analyzed - perhaps this should simply | |
1439 | be deleted. The commented out extract_returned_value_address method | |
1440 | is provided as a starting point for the 32-bit SPARC. It, or | |
1441 | something like it, along with changes to both infcmd.c and stack.c | |
1442 | will be needed for that case to work. NB: It is passed the callers | |
1443 | frame since it is only after the callee has returned that this | |
1444 | function is used. | |
1445 | M:::CORE_ADDR:extract_returned_value_address:struct frame_info *caller_frame:caller_frame */ | |
1446 | ||
1447 | #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) | |
1448 | /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */ | |
1449 | #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1450 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) | |
049ee0e4 AC |
1451 | #endif |
1452 | #endif | |
1453 | ||
74055713 AC |
1454 | extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch); |
1455 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1456 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" | |
049ee0e4 | 1457 | #endif |
74055713 AC |
1458 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) |
1459 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch)) | |
049ee0e4 AC |
1460 | #endif |
1461 | ||
74055713 AC |
1462 | typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (struct regcache *regcache); |
1463 | extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache); | |
1464 | extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address); | |
1465 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) | |
1466 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" | |
049ee0e4 | 1467 | #endif |
74055713 AC |
1468 | #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) |
1469 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regcache)) | |
049ee0e4 | 1470 | #endif |
049ee0e4 | 1471 | |
f30ee0bc AC |
1472 | #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
1473 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */ | |
1474 | #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) | |
1475 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1) | |
8f871025 AC |
1476 | #endif |
1477 | #endif | |
1478 | ||
f30ee0bc AC |
1479 | extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch); |
1480 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) | |
1481 | #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS" | |
8f871025 | 1482 | #endif |
f30ee0bc AC |
1483 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) |
1484 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch)) | |
8f871025 AC |
1485 | #endif |
1486 | ||
f30ee0bc AC |
1487 | typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame); |
1488 | extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame); | |
1489 | extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs); | |
1490 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS) | |
1491 | #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS" | |
83905903 | 1492 | #endif |
c25083af | 1493 | #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
f30ee0bc | 1494 | #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame)) |
0f71a2f6 | 1495 | #endif |
0f71a2f6 | 1496 | |
e9582e71 AC |
1497 | #if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
1498 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */ | |
1499 | #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) | |
1500 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1) | |
5fdff426 AC |
1501 | #endif |
1502 | #endif | |
1503 | ||
e9582e71 AC |
1504 | extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch); |
1505 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) | |
1506 | #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO" | |
5fdff426 | 1507 | #endif |
e9582e71 AC |
1508 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) |
1509 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch)) | |
5fdff426 AC |
1510 | #endif |
1511 | ||
e9582e71 AC |
1512 | typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame); |
1513 | extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame); | |
1514 | extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info); | |
1515 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) | |
1516 | #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO" | |
83905903 | 1517 | #endif |
c25083af | 1518 | #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
e9582e71 | 1519 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame)) |
0f71a2f6 | 1520 | #endif |
0f71a2f6 | 1521 | |
104c1213 JM |
1522 | typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip); |
1523 | extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip); | |
1524 | extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue); | |
83905903 AC |
1525 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE) |
1526 | #error "Non multi-arch definition of SKIP_PROLOGUE" | |
1527 | #endif | |
c25083af | 1528 | #if !defined (SKIP_PROLOGUE) |
0f71a2f6 JM |
1529 | #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip)) |
1530 | #endif | |
0f71a2f6 | 1531 | |
104c1213 JM |
1532 | typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs); |
1533 | extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs); | |
1534 | extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than); | |
83905903 AC |
1535 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN) |
1536 | #error "Non multi-arch definition of INNER_THAN" | |
1537 | #endif | |
c25083af | 1538 | #if !defined (INNER_THAN) |
0f71a2f6 JM |
1539 | #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs)) |
1540 | #endif | |
0f71a2f6 | 1541 | |
f4f9705a AC |
1542 | typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr); |
1543 | extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr); | |
104c1213 | 1544 | extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc); |
83905903 AC |
1545 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC) |
1546 | #error "Non multi-arch definition of BREAKPOINT_FROM_PC" | |
1547 | #endif | |
c25083af | 1548 | #if !defined (BREAKPOINT_FROM_PC) |
0f71a2f6 JM |
1549 | #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr)) |
1550 | #endif | |
33489c5b | 1551 | |
a1131521 KB |
1552 | extern int gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch); |
1553 | ||
1554 | typedef CORE_ADDR (gdbarch_adjust_breakpoint_address_ftype) (struct gdbarch *gdbarch, CORE_ADDR bpaddr); | |
1555 | extern CORE_ADDR gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr); | |
1556 | extern void set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address); | |
1557 | ||
917317f4 JM |
1558 | typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); |
1559 | extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
1560 | extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint); | |
83905903 AC |
1561 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT) |
1562 | #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT" | |
1563 | #endif | |
c25083af | 1564 | #if !defined (MEMORY_INSERT_BREAKPOINT) |
917317f4 JM |
1565 | #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache)) |
1566 | #endif | |
33489c5b | 1567 | |
917317f4 JM |
1568 | typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); |
1569 | extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
1570 | extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint); | |
83905903 AC |
1571 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT) |
1572 | #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT" | |
1573 | #endif | |
c25083af | 1574 | #if !defined (MEMORY_REMOVE_BREAKPOINT) |
917317f4 JM |
1575 | #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache)) |
1576 | #endif | |
917317f4 | 1577 | |
104c1213 JM |
1578 | extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch); |
1579 | extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break); | |
83905903 AC |
1580 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK) |
1581 | #error "Non multi-arch definition of DECR_PC_AFTER_BREAK" | |
1582 | #endif | |
c25083af | 1583 | #if !defined (DECR_PC_AFTER_BREAK) |
0f71a2f6 JM |
1584 | #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch)) |
1585 | #endif | |
0f71a2f6 | 1586 | |
104c1213 JM |
1587 | extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch); |
1588 | extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset); | |
83905903 AC |
1589 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET) |
1590 | #error "Non multi-arch definition of FUNCTION_START_OFFSET" | |
1591 | #endif | |
c25083af | 1592 | #if !defined (FUNCTION_START_OFFSET) |
0f71a2f6 JM |
1593 | #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch)) |
1594 | #endif | |
0f71a2f6 | 1595 | |
f6684c31 AC |
1596 | typedef void (gdbarch_remote_translate_xfer_address_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len); |
1597 | extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len); | |
104c1213 | 1598 | extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address); |
0f71a2f6 | 1599 | |
104c1213 JM |
1600 | extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch); |
1601 | extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip); | |
83905903 AC |
1602 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP) |
1603 | #error "Non multi-arch definition of FRAME_ARGS_SKIP" | |
1604 | #endif | |
c25083af | 1605 | #if !defined (FRAME_ARGS_SKIP) |
0f71a2f6 JM |
1606 | #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch)) |
1607 | #endif | |
0f71a2f6 | 1608 | |
19772a2c AC |
1609 | /* DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed. The new |
1610 | frame code works regardless of the type of frame - frameless, | |
1611 | stackless, or normal. */ | |
1612 | ||
1613 | #if defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) | |
1614 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAMELESS_FUNCTION_INVOCATION */ | |
1615 | #if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) | |
1616 | #define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (1) | |
1617 | #endif | |
1618 | #endif | |
1619 | ||
1620 | extern int gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch); | |
1621 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) | |
1622 | #error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION" | |
1623 | #endif | |
1624 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) | |
1625 | #define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (gdbarch_deprecated_frameless_function_invocation_p (current_gdbarch)) | |
1626 | #endif | |
1627 | ||
1628 | typedef int (gdbarch_deprecated_frameless_function_invocation_ftype) (struct frame_info *fi); | |
1629 | extern int gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi); | |
1630 | extern void set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation); | |
1631 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) | |
1632 | #error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION" | |
1633 | #endif | |
1634 | #if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) | |
1635 | #define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_deprecated_frameless_function_invocation (current_gdbarch, fi)) | |
0f71a2f6 | 1636 | #endif |
0f71a2f6 | 1637 | |
618ce49f AC |
1638 | #if defined (DEPRECATED_FRAME_CHAIN) |
1639 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */ | |
1640 | #if !defined (DEPRECATED_FRAME_CHAIN_P) | |
1641 | #define DEPRECATED_FRAME_CHAIN_P() (1) | |
d62d1979 AC |
1642 | #endif |
1643 | #endif | |
1644 | ||
618ce49f AC |
1645 | extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch); |
1646 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P) | |
1647 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN" | |
d62d1979 | 1648 | #endif |
618ce49f AC |
1649 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P) |
1650 | #define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch)) | |
d62d1979 AC |
1651 | #endif |
1652 | ||
618ce49f AC |
1653 | typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame); |
1654 | extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame); | |
1655 | extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain); | |
1656 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN) | |
1657 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN" | |
83905903 | 1658 | #endif |
c25083af | 1659 | #if !defined (DEPRECATED_FRAME_CHAIN) |
618ce49f | 1660 | #define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame)) |
0f71a2f6 | 1661 | #endif |
0f71a2f6 | 1662 | |
618ce49f AC |
1663 | #if defined (DEPRECATED_FRAME_CHAIN_VALID) |
1664 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */ | |
1665 | #if !defined (DEPRECATED_FRAME_CHAIN_VALID_P) | |
1666 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (1) | |
51603483 DJ |
1667 | #endif |
1668 | #endif | |
1669 | ||
618ce49f AC |
1670 | extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch); |
1671 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P) | |
1672 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID" | |
51603483 | 1673 | #endif |
618ce49f AC |
1674 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P) |
1675 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch)) | |
51603483 | 1676 | #endif |
7f55af32 | 1677 | |
618ce49f AC |
1678 | typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe); |
1679 | extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe); | |
1680 | extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid); | |
1681 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID) | |
1682 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID" | |
83905903 | 1683 | #endif |
c25083af | 1684 | #if !defined (DEPRECATED_FRAME_CHAIN_VALID) |
618ce49f | 1685 | #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe)) |
0f71a2f6 | 1686 | #endif |
0f71a2f6 | 1687 | |
8bedc050 AC |
1688 | /* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please |
1689 | note, per UNWIND_PC's doco, that while the two have similar | |
1690 | interfaces they have very different underlying implementations. */ | |
12cc2063 | 1691 | |
8bedc050 AC |
1692 | #if defined (DEPRECATED_FRAME_SAVED_PC) |
1693 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */ | |
1694 | #if !defined (DEPRECATED_FRAME_SAVED_PC_P) | |
1695 | #define DEPRECATED_FRAME_SAVED_PC_P() (1) | |
d62d1979 AC |
1696 | #endif |
1697 | #endif | |
1698 | ||
8bedc050 AC |
1699 | extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch); |
1700 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P) | |
1701 | #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC" | |
d62d1979 | 1702 | #endif |
8bedc050 AC |
1703 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P) |
1704 | #define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch)) | |
d62d1979 AC |
1705 | #endif |
1706 | ||
8bedc050 AC |
1707 | typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi); |
1708 | extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi); | |
1709 | extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc); | |
1710 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC) | |
1711 | #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC" | |
83905903 | 1712 | #endif |
c25083af | 1713 | #if !defined (DEPRECATED_FRAME_SAVED_PC) |
8bedc050 | 1714 | #define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi)) |
0f71a2f6 | 1715 | #endif |
0f71a2f6 | 1716 | |
12cc2063 AC |
1717 | extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch); |
1718 | ||
1719 | typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
1720 | extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
1721 | extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc); | |
1722 | ||
a9e5fdc2 AC |
1723 | extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch); |
1724 | ||
1725 | typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
1726 | extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
1727 | extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp); | |
1728 | ||
42efa47a AC |
1729 | /* DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame |
1730 | frame-base. Enable frame-base before frame-unwind. */ | |
1731 | ||
1732 | #if defined (DEPRECATED_FRAME_ARGS_ADDRESS) | |
1733 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_ARGS_ADDRESS */ | |
1734 | #if !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P) | |
1735 | #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (1) | |
1736 | #endif | |
1737 | #endif | |
1738 | ||
42efa47a AC |
1739 | extern int gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch); |
1740 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS_P) | |
1741 | #error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS" | |
1742 | #endif | |
1743 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P) | |
1744 | #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (gdbarch_deprecated_frame_args_address_p (current_gdbarch)) | |
1745 | #endif | |
1746 | ||
42efa47a AC |
1747 | typedef CORE_ADDR (gdbarch_deprecated_frame_args_address_ftype) (struct frame_info *fi); |
1748 | extern CORE_ADDR gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
1749 | extern void set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address); | |
1750 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS) | |
1751 | #error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS" | |
1752 | #endif | |
1753 | #if !defined (DEPRECATED_FRAME_ARGS_ADDRESS) | |
1754 | #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (gdbarch_deprecated_frame_args_address (current_gdbarch, fi)) | |
1755 | #endif | |
1756 | ||
1757 | /* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame | |
1758 | frame-base. Enable frame-base before frame-unwind. */ | |
1759 | ||
1760 | #if defined (DEPRECATED_FRAME_LOCALS_ADDRESS) | |
1761 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_LOCALS_ADDRESS */ | |
1762 | #if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P) | |
1763 | #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (1) | |
1764 | #endif | |
1765 | #endif | |
1766 | ||
42efa47a AC |
1767 | extern int gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch); |
1768 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P) | |
1769 | #error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS" | |
83905903 | 1770 | #endif |
42efa47a AC |
1771 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P) |
1772 | #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (gdbarch_deprecated_frame_locals_address_p (current_gdbarch)) | |
0f71a2f6 | 1773 | #endif |
0f71a2f6 | 1774 | |
42efa47a AC |
1775 | typedef CORE_ADDR (gdbarch_deprecated_frame_locals_address_ftype) (struct frame_info *fi); |
1776 | extern CORE_ADDR gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
1777 | extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address); | |
1778 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS) | |
1779 | #error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS" | |
83905903 | 1780 | #endif |
42efa47a AC |
1781 | #if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS) |
1782 | #define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (gdbarch_deprecated_frame_locals_address (current_gdbarch, fi)) | |
0f71a2f6 | 1783 | #endif |
0f71a2f6 | 1784 | |
6913c89a AC |
1785 | #if defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
1786 | /* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */ | |
1787 | #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) | |
1788 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (1) | |
4443bd83 AC |
1789 | #endif |
1790 | #endif | |
1791 | ||
6913c89a AC |
1792 | extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch); |
1793 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) | |
1794 | #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL" | |
4443bd83 | 1795 | #endif |
6913c89a AC |
1796 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) |
1797 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch)) | |
4443bd83 AC |
1798 | #endif |
1799 | ||
6913c89a AC |
1800 | typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame); |
1801 | extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame); | |
1802 | extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call); | |
1803 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL) | |
1804 | #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL" | |
83905903 | 1805 | #endif |
c25083af | 1806 | #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
6913c89a | 1807 | #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame)) |
0f71a2f6 | 1808 | #endif |
0f71a2f6 | 1809 | |
983a287a AC |
1810 | #if defined (FRAME_NUM_ARGS) |
1811 | /* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */ | |
1812 | #if !defined (FRAME_NUM_ARGS_P) | |
1813 | #define FRAME_NUM_ARGS_P() (1) | |
1814 | #endif | |
1815 | #endif | |
1816 | ||
983a287a AC |
1817 | extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch); |
1818 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P) | |
1819 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
1820 | #endif | |
1821 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P) | |
1822 | #define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch)) | |
1823 | #endif | |
1824 | ||
104c1213 JM |
1825 | typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame); |
1826 | extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame); | |
1827 | extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args); | |
83905903 AC |
1828 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS) |
1829 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
1830 | #endif | |
c25083af | 1831 | #if !defined (FRAME_NUM_ARGS) |
0f71a2f6 JM |
1832 | #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame)) |
1833 | #endif | |
0f71a2f6 | 1834 | |
f27dd7fd AC |
1835 | /* DEPRECATED_STACK_ALIGN has been replaced by an initial aligning call |
1836 | to frame_align and the requirement that methods such as | |
1837 | push_dummy_call and frame_red_zone_size maintain correct stack/frame | |
1838 | alignment. */ | |
1839 | ||
1840 | #if defined (DEPRECATED_STACK_ALIGN) | |
1841 | /* Legacy for systems yet to multi-arch DEPRECATED_STACK_ALIGN */ | |
1842 | #if !defined (DEPRECATED_STACK_ALIGN_P) | |
1843 | #define DEPRECATED_STACK_ALIGN_P() (1) | |
2ada493a | 1844 | #endif |
eee30e78 | 1845 | #endif |
2ada493a | 1846 | |
f27dd7fd AC |
1847 | extern int gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch); |
1848 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STACK_ALIGN_P) | |
1849 | #error "Non multi-arch definition of DEPRECATED_STACK_ALIGN" | |
83905903 | 1850 | #endif |
f27dd7fd AC |
1851 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STACK_ALIGN_P) |
1852 | #define DEPRECATED_STACK_ALIGN_P() (gdbarch_deprecated_stack_align_p (current_gdbarch)) | |
2ada493a AC |
1853 | #endif |
1854 | ||
f27dd7fd AC |
1855 | typedef CORE_ADDR (gdbarch_deprecated_stack_align_ftype) (CORE_ADDR sp); |
1856 | extern CORE_ADDR gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp); | |
1857 | extern void set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, gdbarch_deprecated_stack_align_ftype *deprecated_stack_align); | |
1858 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STACK_ALIGN) | |
1859 | #error "Non multi-arch definition of DEPRECATED_STACK_ALIGN" | |
83905903 | 1860 | #endif |
f27dd7fd AC |
1861 | #if !defined (DEPRECATED_STACK_ALIGN) |
1862 | #define DEPRECATED_STACK_ALIGN(sp) (gdbarch_deprecated_stack_align (current_gdbarch, sp)) | |
2ada493a AC |
1863 | #endif |
1864 | ||
dc604539 AC |
1865 | extern int gdbarch_frame_align_p (struct gdbarch *gdbarch); |
1866 | ||
1867 | typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address); | |
1868 | extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address); | |
1869 | extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align); | |
1870 | ||
192cb3d4 MK |
1871 | /* DEPRECATED_REG_STRUCT_HAS_ADDR has been replaced by |
1872 | stabs_argument_has_addr. */ | |
1873 | ||
88d89dbb MK |
1874 | #if defined (DEPRECATED_REG_STRUCT_HAS_ADDR) |
1875 | /* Legacy for systems yet to multi-arch DEPRECATED_REG_STRUCT_HAS_ADDR */ | |
1876 | #if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P) | |
1877 | #define DEPRECATED_REG_STRUCT_HAS_ADDR_P() (1) | |
d03e67c9 | 1878 | #endif |
eee30e78 | 1879 | #endif |
d03e67c9 | 1880 | |
88d89dbb MK |
1881 | extern int gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch); |
1882 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P) | |
1883 | #error "Non multi-arch definition of DEPRECATED_REG_STRUCT_HAS_ADDR" | |
83905903 | 1884 | #endif |
88d89dbb MK |
1885 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P) |
1886 | #define DEPRECATED_REG_STRUCT_HAS_ADDR_P() (gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch)) | |
d03e67c9 AC |
1887 | #endif |
1888 | ||
88d89dbb MK |
1889 | typedef int (gdbarch_deprecated_reg_struct_has_addr_ftype) (int gcc_p, struct type *type); |
1890 | extern int gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type); | |
1891 | extern void set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr); | |
1892 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR) | |
1893 | #error "Non multi-arch definition of DEPRECATED_REG_STRUCT_HAS_ADDR" | |
83905903 | 1894 | #endif |
88d89dbb MK |
1895 | #if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR) |
1896 | #define DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_deprecated_reg_struct_has_addr (current_gdbarch, gcc_p, type)) | |
d03e67c9 AC |
1897 | #endif |
1898 | ||
192cb3d4 MK |
1899 | typedef int (gdbarch_stabs_argument_has_addr_ftype) (struct gdbarch *gdbarch, struct type *type); |
1900 | extern int gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type); | |
1901 | extern void set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr); | |
1902 | ||
8b148df9 AC |
1903 | extern int gdbarch_frame_red_zone_size (struct gdbarch *gdbarch); |
1904 | extern void set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, int frame_red_zone_size); | |
1905 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_RED_ZONE_SIZE) | |
1906 | #error "Non multi-arch definition of FRAME_RED_ZONE_SIZE" | |
1907 | #endif | |
1908 | #if !defined (FRAME_RED_ZONE_SIZE) | |
1909 | #define FRAME_RED_ZONE_SIZE (gdbarch_frame_red_zone_size (current_gdbarch)) | |
1910 | #endif | |
1911 | ||
58d5518e ND |
1912 | extern int gdbarch_parm_boundary (struct gdbarch *gdbarch); |
1913 | extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary); | |
83905903 AC |
1914 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY) |
1915 | #error "Non multi-arch definition of PARM_BOUNDARY" | |
1916 | #endif | |
c25083af | 1917 | #if !defined (PARM_BOUNDARY) |
58d5518e ND |
1918 | #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch)) |
1919 | #endif | |
58d5518e | 1920 | |
f0d4cc9e AC |
1921 | extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch); |
1922 | extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format); | |
83905903 AC |
1923 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT) |
1924 | #error "Non multi-arch definition of TARGET_FLOAT_FORMAT" | |
1925 | #endif | |
c25083af | 1926 | #if !defined (TARGET_FLOAT_FORMAT) |
f0d4cc9e AC |
1927 | #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch)) |
1928 | #endif | |
f0d4cc9e | 1929 | |
f0d4cc9e AC |
1930 | extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch); |
1931 | extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format); | |
83905903 AC |
1932 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT) |
1933 | #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT" | |
1934 | #endif | |
c25083af | 1935 | #if !defined (TARGET_DOUBLE_FORMAT) |
f0d4cc9e AC |
1936 | #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch)) |
1937 | #endif | |
f0d4cc9e | 1938 | |
f0d4cc9e AC |
1939 | extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch); |
1940 | extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format); | |
83905903 AC |
1941 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT) |
1942 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT" | |
1943 | #endif | |
c25083af | 1944 | #if !defined (TARGET_LONG_DOUBLE_FORMAT) |
f0d4cc9e AC |
1945 | #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch)) |
1946 | #endif | |
f0d4cc9e | 1947 | |
e2d0e7eb AC |
1948 | typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ); |
1949 | extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ); | |
f517ea4e | 1950 | extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr); |
f517ea4e | 1951 | |
875e1767 AC |
1952 | /* On some machines there are bits in addresses which are not really |
1953 | part of the address, but are used by the kernel, the hardware, etc. | |
1954 | for special purposes. ADDR_BITS_REMOVE takes out any such bits so | |
1955 | we get a "real" address such as one would find in a symbol table. | |
1956 | This is used only for addresses of instructions, and even then I'm | |
1957 | not sure it's used in all contexts. It exists to deal with there | |
1958 | being a few stray bits in the PC which would mislead us, not as some | |
1959 | sort of generic thing to handle alignment or segmentation (it's | |
1960 | possible it should be in TARGET_READ_PC instead). */ | |
1961 | ||
875e1767 AC |
1962 | typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr); |
1963 | extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr); | |
1964 | extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove); | |
83905903 AC |
1965 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE) |
1966 | #error "Non multi-arch definition of ADDR_BITS_REMOVE" | |
1967 | #endif | |
c25083af | 1968 | #if !defined (ADDR_BITS_REMOVE) |
875e1767 AC |
1969 | #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr)) |
1970 | #endif | |
875e1767 | 1971 | |
2e092625 | 1972 | /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into |
181c1381 RE |
1973 | ADDR_BITS_REMOVE. */ |
1974 | ||
181c1381 RE |
1975 | typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr); |
1976 | extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr); | |
1977 | extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address); | |
1978 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS) | |
1979 | #error "Non multi-arch definition of SMASH_TEXT_ADDRESS" | |
1980 | #endif | |
c25083af | 1981 | #if !defined (SMASH_TEXT_ADDRESS) |
181c1381 RE |
1982 | #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) |
1983 | #endif | |
181c1381 | 1984 | |
64c4637f AC |
1985 | /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if |
1986 | the target needs software single step. An ISA method to implement it. | |
1987 | ||
1988 | FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints | |
1989 | using the breakpoint system instead of blatting memory directly (as with rs6000). | |
1990 | ||
1991 | FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can | |
1992 | single step. If not, then implement single step using breakpoints. */ | |
1993 | ||
1994 | #if defined (SOFTWARE_SINGLE_STEP) | |
1995 | /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ | |
1996 | #if !defined (SOFTWARE_SINGLE_STEP_P) | |
1997 | #define SOFTWARE_SINGLE_STEP_P() (1) | |
1998 | #endif | |
1999 | #endif | |
2000 | ||
64c4637f | 2001 | extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch); |
83905903 AC |
2002 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P) |
2003 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2004 | #endif | |
64c4637f AC |
2005 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P) |
2006 | #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) | |
2007 | #endif | |
2008 | ||
64c4637f AC |
2009 | typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); |
2010 | extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); | |
2011 | extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); | |
83905903 AC |
2012 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP) |
2013 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2014 | #endif | |
c25083af | 2015 | #if !defined (SOFTWARE_SINGLE_STEP) |
64c4637f AC |
2016 | #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p)) |
2017 | #endif | |
64c4637f | 2018 | |
f6c40618 AC |
2019 | /* FIXME: cagney/2003-08-28: Need to find a better way of selecting the |
2020 | disassembler. Perhaphs objdump can handle it? */ | |
2021 | ||
a89aa300 AC |
2022 | typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, struct disassemble_info *info); |
2023 | extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info); | |
2bf0cb65 EZ |
2024 | extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn); |
2025 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN) | |
2026 | #error "Non multi-arch definition of TARGET_PRINT_INSN" | |
2027 | #endif | |
c25083af | 2028 | #if !defined (TARGET_PRINT_INSN) |
2bf0cb65 EZ |
2029 | #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info)) |
2030 | #endif | |
2bf0cb65 | 2031 | |
bdcd319a CV |
2032 | typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc); |
2033 | extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2034 | extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code); | |
2035 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE) | |
2036 | #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE" | |
2037 | #endif | |
c25083af | 2038 | #if !defined (SKIP_TRAMPOLINE_CODE) |
bdcd319a CV |
2039 | #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc)) |
2040 | #endif | |
bdcd319a | 2041 | |
dea0c52f MK |
2042 | /* If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER |
2043 | evaluates non-zero, this is the address where the debugger will place | |
2044 | a step-resume breakpoint to get us past the dynamic linker. */ | |
2045 | ||
4c8c40e6 | 2046 | typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (struct gdbarch *gdbarch, CORE_ADDR pc); |
dea0c52f MK |
2047 | extern CORE_ADDR gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc); |
2048 | extern void set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, gdbarch_skip_solib_resolver_ftype *skip_solib_resolver); | |
dea0c52f | 2049 | |
68e9cc94 CV |
2050 | /* For SVR4 shared libraries, each call goes through a small piece of |
2051 | trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates | |
d50355b6 | 2052 | to nonzero if we are currently stopped in one of these. */ |
68e9cc94 | 2053 | |
68e9cc94 CV |
2054 | typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name); |
2055 | extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2056 | extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline); | |
2057 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2058 | #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE" | |
2059 | #endif | |
c25083af | 2060 | #if !defined (IN_SOLIB_CALL_TRAMPOLINE) |
68e9cc94 CV |
2061 | #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name)) |
2062 | #endif | |
68e9cc94 | 2063 | |
d50355b6 MS |
2064 | /* Some systems also have trampoline code for returning from shared libs. */ |
2065 | ||
d50355b6 MS |
2066 | typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name); |
2067 | extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2068 | extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline); | |
2069 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE) | |
2070 | #error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE" | |
2071 | #endif | |
c25083af | 2072 | #if !defined (IN_SOLIB_RETURN_TRAMPOLINE) |
d50355b6 MS |
2073 | #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name)) |
2074 | #endif | |
d50355b6 | 2075 | |
aa2a3f87 AC |
2076 | /* NOTE: cagney/2004-03-23: DEPRECATED_SIGTRAMP_START, |
2077 | DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been | |
2078 | superseeded by signal trampoline frame sniffers. */ | |
f561f026 AC |
2079 | |
2080 | #if defined (DEPRECATED_PC_IN_SIGTRAMP) | |
2081 | /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_SIGTRAMP */ | |
2082 | #if !defined (DEPRECATED_PC_IN_SIGTRAMP_P) | |
2083 | #define DEPRECATED_PC_IN_SIGTRAMP_P() (1) | |
2084 | #endif | |
2085 | #endif | |
2086 | ||
2087 | extern int gdbarch_deprecated_pc_in_sigtramp_p (struct gdbarch *gdbarch); | |
2088 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_SIGTRAMP_P) | |
2089 | #error "Non multi-arch definition of DEPRECATED_PC_IN_SIGTRAMP" | |
2090 | #endif | |
2091 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_SIGTRAMP_P) | |
2092 | #define DEPRECATED_PC_IN_SIGTRAMP_P() (gdbarch_deprecated_pc_in_sigtramp_p (current_gdbarch)) | |
2093 | #endif | |
2094 | ||
2095 | typedef int (gdbarch_deprecated_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name); | |
2096 | extern int gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2097 | extern void set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp); | |
2098 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_SIGTRAMP) | |
2099 | #error "Non multi-arch definition of DEPRECATED_PC_IN_SIGTRAMP" | |
2100 | #endif | |
2101 | #if !defined (DEPRECATED_PC_IN_SIGTRAMP) | |
2102 | #define DEPRECATED_PC_IN_SIGTRAMP(pc, name) (gdbarch_deprecated_pc_in_sigtramp (current_gdbarch, pc, name)) | |
d7bd68ca | 2103 | #endif |
d7bd68ca | 2104 | |
aa2a3f87 AC |
2105 | #if defined (DEPRECATED_SIGTRAMP_START) |
2106 | /* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_START */ | |
2107 | #if !defined (DEPRECATED_SIGTRAMP_START_P) | |
2108 | #define DEPRECATED_SIGTRAMP_START_P() (1) | |
43156d82 MK |
2109 | #endif |
2110 | #endif | |
2111 | ||
aa2a3f87 AC |
2112 | extern int gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch); |
2113 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START_P) | |
2114 | #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START" | |
43156d82 | 2115 | #endif |
aa2a3f87 AC |
2116 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_START_P) |
2117 | #define DEPRECATED_SIGTRAMP_START_P() (gdbarch_deprecated_sigtramp_start_p (current_gdbarch)) | |
43156d82 MK |
2118 | #endif |
2119 | ||
aa2a3f87 AC |
2120 | typedef CORE_ADDR (gdbarch_deprecated_sigtramp_start_ftype) (CORE_ADDR pc); |
2121 | extern CORE_ADDR gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2122 | extern void set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start); | |
2123 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START) | |
2124 | #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START" | |
43156d82 | 2125 | #endif |
aa2a3f87 AC |
2126 | #if !defined (DEPRECATED_SIGTRAMP_START) |
2127 | #define DEPRECATED_SIGTRAMP_START(pc) (gdbarch_deprecated_sigtramp_start (current_gdbarch, pc)) | |
43156d82 | 2128 | #endif |
43156d82 | 2129 | |
aa2a3f87 AC |
2130 | #if defined (DEPRECATED_SIGTRAMP_END) |
2131 | /* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_END */ | |
2132 | #if !defined (DEPRECATED_SIGTRAMP_END_P) | |
2133 | #define DEPRECATED_SIGTRAMP_END_P() (1) | |
e76cff22 AC |
2134 | #endif |
2135 | #endif | |
2136 | ||
aa2a3f87 AC |
2137 | extern int gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch); |
2138 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END_P) | |
2139 | #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END" | |
e76cff22 | 2140 | #endif |
aa2a3f87 AC |
2141 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_END_P) |
2142 | #define DEPRECATED_SIGTRAMP_END_P() (gdbarch_deprecated_sigtramp_end_p (current_gdbarch)) | |
e76cff22 AC |
2143 | #endif |
2144 | ||
aa2a3f87 AC |
2145 | typedef CORE_ADDR (gdbarch_deprecated_sigtramp_end_ftype) (CORE_ADDR pc); |
2146 | extern CORE_ADDR gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2147 | extern void set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end); | |
2148 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END) | |
2149 | #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END" | |
43156d82 | 2150 | #endif |
aa2a3f87 AC |
2151 | #if !defined (DEPRECATED_SIGTRAMP_END) |
2152 | #define DEPRECATED_SIGTRAMP_END(pc) (gdbarch_deprecated_sigtramp_end (current_gdbarch, pc)) | |
43156d82 | 2153 | #endif |
43156d82 | 2154 | |
c12260ac CV |
2155 | /* A target might have problems with watchpoints as soon as the stack |
2156 | frame of the current function has been destroyed. This mostly happens | |
2157 | as the first action in a funtion's epilogue. in_function_epilogue_p() | |
2158 | is defined to return a non-zero value if either the given addr is one | |
2159 | instruction after the stack destroying instruction up to the trailing | |
2160 | return instruction or if we can figure out that the stack frame has | |
2161 | already been invalidated regardless of the value of addr. Targets | |
2162 | which don't suffer from that problem could just let this functionality | |
2163 | untouched. */ | |
2164 | ||
2165 | typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2166 | extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2167 | extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p); | |
2168 | ||
552c04a7 TT |
2169 | /* Given a vector of command-line arguments, return a newly allocated |
2170 | string which, when passed to the create_inferior function, will be | |
2171 | parsed (on Unix systems, by the shell) to yield the same vector. | |
2172 | This function should call error() if the argument vector is not | |
2173 | representable for this target or if this target does not support | |
2174 | command-line arguments. | |
2175 | ARGC is the number of elements in the vector. | |
2176 | ARGV is an array of strings, one per argument. */ | |
2177 | ||
2178 | typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv); | |
2179 | extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv); | |
2180 | extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments); | |
2181 | ||
a2cf933a EZ |
2182 | typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym); |
2183 | extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym); | |
2184 | extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special); | |
2185 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2186 | #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL" | |
2187 | #endif | |
c25083af | 2188 | #if !defined (ELF_MAKE_MSYMBOL_SPECIAL) |
a2cf933a EZ |
2189 | #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym)) |
2190 | #endif | |
a2cf933a | 2191 | |
a2cf933a EZ |
2192 | typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym); |
2193 | extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym); | |
2194 | extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special); | |
2195 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2196 | #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL" | |
2197 | #endif | |
c25083af | 2198 | #if !defined (COFF_MAKE_MSYMBOL_SPECIAL) |
a2cf933a EZ |
2199 | #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym)) |
2200 | #endif | |
a2cf933a | 2201 | |
5720643c JB |
2202 | extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch); |
2203 | extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc); | |
2204 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC) | |
2205 | #error "Non multi-arch definition of NAME_OF_MALLOC" | |
2206 | #endif | |
c25083af | 2207 | #if !defined (NAME_OF_MALLOC) |
5720643c JB |
2208 | #define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch)) |
2209 | #endif | |
5720643c | 2210 | |
c4ed33b9 AC |
2211 | extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch); |
2212 | extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint); | |
2213 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT) | |
2214 | #error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT" | |
2215 | #endif | |
c25083af | 2216 | #if !defined (CANNOT_STEP_BREAKPOINT) |
c4ed33b9 AC |
2217 | #define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch)) |
2218 | #endif | |
c4ed33b9 | 2219 | |
f74fa174 MM |
2220 | extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch); |
2221 | extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint); | |
2222 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT) | |
2223 | #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT" | |
2224 | #endif | |
c25083af | 2225 | #if !defined (HAVE_NONSTEPPABLE_WATCHPOINT) |
f74fa174 MM |
2226 | #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch)) |
2227 | #endif | |
f74fa174 | 2228 | |
8b2dbe47 KB |
2229 | #if defined (ADDRESS_CLASS_TYPE_FLAGS) |
2230 | /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */ | |
2231 | #if !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2232 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (1) | |
2233 | #endif | |
2234 | #endif | |
2235 | ||
8b2dbe47 KB |
2236 | extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch); |
2237 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2238 | #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" | |
2239 | #endif | |
2240 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2241 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch)) | |
2242 | #endif | |
2243 | ||
8b2dbe47 KB |
2244 | typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class); |
2245 | extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class); | |
2246 | extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags); | |
2247 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS) | |
2248 | #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" | |
2249 | #endif | |
c25083af | 2250 | #if !defined (ADDRESS_CLASS_TYPE_FLAGS) |
8b2dbe47 KB |
2251 | #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class)) |
2252 | #endif | |
8b2dbe47 | 2253 | |
8b2dbe47 | 2254 | extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch); |
8b2dbe47 | 2255 | |
321432c0 KB |
2256 | typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags); |
2257 | extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags); | |
8b2dbe47 | 2258 | extern void set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name); |
8b2dbe47 KB |
2259 | |
2260 | extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch); | |
8b2dbe47 | 2261 | |
321432c0 KB |
2262 | typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr); |
2263 | extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr); | |
8b2dbe47 | 2264 | extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags); |
8b2dbe47 | 2265 | |
b59ff9d5 AC |
2266 | /* Is a register in a group */ |
2267 | ||
2268 | typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); | |
2269 | extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); | |
2270 | extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p); | |
2271 | ||
2e092625 | 2272 | /* Fetch the pointer to the ith function argument. */ |
143985b7 AF |
2273 | |
2274 | #if defined (FETCH_POINTER_ARGUMENT) | |
2275 | /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */ | |
2276 | #if !defined (FETCH_POINTER_ARGUMENT_P) | |
2277 | #define FETCH_POINTER_ARGUMENT_P() (1) | |
2278 | #endif | |
2279 | #endif | |
2280 | ||
143985b7 AF |
2281 | extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch); |
2282 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P) | |
2283 | #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" | |
2284 | #endif | |
2285 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P) | |
2286 | #define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch)) | |
2287 | #endif | |
2288 | ||
143985b7 AF |
2289 | typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type); |
2290 | extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type); | |
2291 | extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument); | |
2292 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT) | |
2293 | #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" | |
2294 | #endif | |
2295 | #if !defined (FETCH_POINTER_ARGUMENT) | |
2296 | #define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type)) | |
2297 | #endif | |
2298 | ||
6ce6d90f MK |
2299 | /* Return the appropriate register set for a core file section with |
2300 | name SECT_NAME and size SECT_SIZE. */ | |
2301 | ||
2302 | extern int gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch); | |
2303 | ||
2304 | typedef const struct regset * (gdbarch_regset_from_core_section_ftype) (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size); | |
2305 | extern const struct regset * gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size); | |
2306 | extern void set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, gdbarch_regset_from_core_section_ftype *regset_from_core_section); | |
2307 | ||
104c1213 | 2308 | extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |
0f71a2f6 JM |
2309 | |
2310 | ||
2311 | /* Mechanism for co-ordinating the selection of a specific | |
2312 | architecture. | |
2313 | ||
2314 | GDB targets (*-tdep.c) can register an interest in a specific | |
2315 | architecture. Other GDB components can register a need to maintain | |
2316 | per-architecture data. | |
2317 | ||
2318 | The mechanisms below ensures that there is only a loose connection | |
2319 | between the set-architecture command and the various GDB | |
99e7bb18 | 2320 | components. Each component can independently register their need |
0f71a2f6 JM |
2321 | to maintain architecture specific data with gdbarch. |
2322 | ||
2323 | Pragmatics: | |
2324 | ||
2325 | Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It | |
2326 | didn't scale. | |
2327 | ||
2328 | The more traditional mega-struct containing architecture specific | |
2329 | data for all the various GDB components was also considered. Since | |
99e7bb18 | 2330 | GDB is built from a variable number of (fairly independent) |
0f71a2f6 JM |
2331 | components it was determined that the global aproach was not |
2332 | applicable. */ | |
2333 | ||
2334 | ||
2335 | /* Register a new architectural family with GDB. | |
2336 | ||
2337 | Register support for the specified ARCHITECTURE with GDB. When | |
2338 | gdbarch determines that the specified architecture has been | |
2339 | selected, the corresponding INIT function is called. | |
2340 | ||
2341 | -- | |
2342 | ||
2343 | The INIT function takes two parameters: INFO which contains the | |
2344 | information available to gdbarch about the (possibly new) | |
2345 | architecture; ARCHES which is a list of the previously created | |
2346 | ``struct gdbarch'' for this architecture. | |
2347 | ||
0f79675b AC |
2348 | The INFO parameter is, as far as possible, be pre-initialized with |
2349 | information obtained from INFO.ABFD or the previously selected | |
2350 | architecture. | |
2351 | ||
2352 | The ARCHES parameter is a linked list (sorted most recently used) | |
2353 | of all the previously created architures for this architecture | |
2354 | family. The (possibly NULL) ARCHES->gdbarch can used to access | |
2355 | values from the previously selected architecture for this | |
2356 | architecture family. The global ``current_gdbarch'' shall not be | |
2357 | used. | |
0f71a2f6 JM |
2358 | |
2359 | The INIT function shall return any of: NULL - indicating that it | |
ec3d358c | 2360 | doesn't recognize the selected architecture; an existing ``struct |
0f71a2f6 JM |
2361 | gdbarch'' from the ARCHES list - indicating that the new |
2362 | architecture is just a synonym for an earlier architecture (see | |
2363 | gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch'' | |
4b9b3959 AC |
2364 | - that describes the selected architecture (see gdbarch_alloc()). |
2365 | ||
2366 | The DUMP_TDEP function shall print out all target specific values. | |
2367 | Care should be taken to ensure that the function works in both the | |
2368 | multi-arch and non- multi-arch cases. */ | |
0f71a2f6 | 2369 | |
adf40b2e JM |
2370 | struct gdbarch_list |
2371 | { | |
2372 | struct gdbarch *gdbarch; | |
2373 | struct gdbarch_list *next; | |
2374 | }; | |
0f71a2f6 | 2375 | |
adf40b2e JM |
2376 | struct gdbarch_info |
2377 | { | |
adf40b2e JM |
2378 | /* Use default: NULL (ZERO). */ |
2379 | const struct bfd_arch_info *bfd_arch_info; | |
0f71a2f6 | 2380 | |
428721aa | 2381 | /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */ |
adf40b2e | 2382 | int byte_order; |
0f71a2f6 | 2383 | |
adf40b2e JM |
2384 | /* Use default: NULL (ZERO). */ |
2385 | bfd *abfd; | |
0f71a2f6 | 2386 | |
adf40b2e JM |
2387 | /* Use default: NULL (ZERO). */ |
2388 | struct gdbarch_tdep_info *tdep_info; | |
4be87837 DJ |
2389 | |
2390 | /* Use default: GDB_OSABI_UNINITIALIZED (-1). */ | |
2391 | enum gdb_osabi osabi; | |
adf40b2e | 2392 | }; |
0f71a2f6 | 2393 | |
104c1213 | 2394 | typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches); |
4b9b3959 | 2395 | typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 2396 | |
4b9b3959 | 2397 | /* DEPRECATED - use gdbarch_register() */ |
104c1213 | 2398 | extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *); |
0f71a2f6 | 2399 | |
4b9b3959 AC |
2400 | extern void gdbarch_register (enum bfd_architecture architecture, |
2401 | gdbarch_init_ftype *, | |
2402 | gdbarch_dump_tdep_ftype *); | |
2403 | ||
0f71a2f6 | 2404 | |
b4a20239 AC |
2405 | /* Return a freshly allocated, NULL terminated, array of the valid |
2406 | architecture names. Since architectures are registered during the | |
2407 | _initialize phase this function only returns useful information | |
2408 | once initialization has been completed. */ | |
2409 | ||
2410 | extern const char **gdbarch_printable_names (void); | |
2411 | ||
2412 | ||
0f71a2f6 JM |
2413 | /* Helper function. Search the list of ARCHES for a GDBARCH that |
2414 | matches the information provided by INFO. */ | |
2415 | ||
104c1213 | 2416 | extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info); |
0f71a2f6 JM |
2417 | |
2418 | ||
2419 | /* Helper function. Create a preliminary ``struct gdbarch''. Perform | |
2420 | basic initialization using values obtained from the INFO andTDEP | |
2421 | parameters. set_gdbarch_*() functions are called to complete the | |
2422 | initialization of the object. */ | |
2423 | ||
104c1213 | 2424 | extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep); |
0f71a2f6 JM |
2425 | |
2426 | ||
4b9b3959 AC |
2427 | /* Helper function. Free a partially-constructed ``struct gdbarch''. |
2428 | It is assumed that the caller freeds the ``struct | |
2429 | gdbarch_tdep''. */ | |
2430 | ||
058f20d5 JB |
2431 | extern void gdbarch_free (struct gdbarch *); |
2432 | ||
2433 | ||
aebd7893 AC |
2434 | /* Helper function. Allocate memory from the ``struct gdbarch'' |
2435 | obstack. The memory is freed when the corresponding architecture | |
2436 | is also freed. */ | |
2437 | ||
2438 | extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size); | |
2439 | #define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), (NR) * sizeof (TYPE))) | |
2440 | #define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), sizeof (TYPE))) | |
2441 | ||
2442 | ||
b732d07d | 2443 | /* Helper function. Force an update of the current architecture. |
0f71a2f6 | 2444 | |
b732d07d AC |
2445 | The actual architecture selected is determined by INFO, ``(gdb) set |
2446 | architecture'' et.al., the existing architecture and BFD's default | |
2447 | architecture. INFO should be initialized to zero and then selected | |
2448 | fields should be updated. | |
0f71a2f6 | 2449 | |
16f33e29 AC |
2450 | Returns non-zero if the update succeeds */ |
2451 | ||
2452 | extern int gdbarch_update_p (struct gdbarch_info info); | |
0f71a2f6 JM |
2453 | |
2454 | ||
ebdba546 AC |
2455 | /* Helper function. Find an architecture matching info. |
2456 | ||
2457 | INFO should be initialized using gdbarch_info_init, relevant fields | |
2458 | set, and then finished using gdbarch_info_fill. | |
2459 | ||
2460 | Returns the corresponding architecture, or NULL if no matching | |
2461 | architecture was found. "current_gdbarch" is not updated. */ | |
2462 | ||
2463 | extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info); | |
2464 | ||
2465 | ||
2466 | /* Helper function. Set the global "current_gdbarch" to "gdbarch". | |
2467 | ||
2468 | FIXME: kettenis/20031124: Of the functions that follow, only | |
2469 | gdbarch_from_bfd is supposed to survive. The others will | |
2470 | dissappear since in the future GDB will (hopefully) be truly | |
2471 | multi-arch. However, for now we're still stuck with the concept of | |
2472 | a single active architecture. */ | |
2473 | ||
2474 | extern void deprecated_current_gdbarch_select_hack (struct gdbarch *gdbarch); | |
2475 | ||
0f71a2f6 JM |
2476 | |
2477 | /* Register per-architecture data-pointer. | |
2478 | ||
2479 | Reserve space for a per-architecture data-pointer. An identifier | |
2480 | for the reserved data-pointer is returned. That identifer should | |
95160752 | 2481 | be saved in a local static variable. |
0f71a2f6 | 2482 | |
fcc1c85c AC |
2483 | Memory for the per-architecture data shall be allocated using |
2484 | gdbarch_obstack_zalloc. That memory will be deleted when the | |
2485 | corresponding architecture object is deleted. | |
0f71a2f6 | 2486 | |
95160752 AC |
2487 | When a previously created architecture is re-selected, the |
2488 | per-architecture data-pointer for that previous architecture is | |
76860b5f | 2489 | restored. INIT() is not re-called. |
0f71a2f6 JM |
2490 | |
2491 | Multiple registrarants for any architecture are allowed (and | |
2492 | strongly encouraged). */ | |
2493 | ||
95160752 | 2494 | struct gdbarch_data; |
0f71a2f6 | 2495 | |
030f20e1 AC |
2496 | typedef void *(gdbarch_data_pre_init_ftype) (struct obstack *obstack); |
2497 | extern struct gdbarch_data *gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *init); | |
2498 | typedef void *(gdbarch_data_post_init_ftype) (struct gdbarch *gdbarch); | |
2499 | extern struct gdbarch_data *gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *init); | |
2500 | extern void deprecated_set_gdbarch_data (struct gdbarch *gdbarch, | |
2501 | struct gdbarch_data *data, | |
2502 | void *pointer); | |
0f71a2f6 | 2503 | |
451fbdda | 2504 | extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *); |
0f71a2f6 JM |
2505 | |
2506 | ||
a8cf2722 | 2507 | |
0f71a2f6 JM |
2508 | /* Register per-architecture memory region. |
2509 | ||
2510 | Provide a memory-region swap mechanism. Per-architecture memory | |
2511 | region are created. These memory regions are swapped whenever the | |
2512 | architecture is changed. For a new architecture, the memory region | |
2513 | is initialized with zero (0) and the INIT function is called. | |
2514 | ||
2515 | Memory regions are swapped / initialized in the order that they are | |
2516 | registered. NULL DATA and/or INIT values can be specified. | |
2517 | ||
030f20e1 | 2518 | New code should use gdbarch_data_register_*(). */ |
0f71a2f6 | 2519 | |
104c1213 | 2520 | typedef void (gdbarch_swap_ftype) (void); |
046a4708 AC |
2521 | extern void deprecated_register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init); |
2522 | #define DEPRECATED_REGISTER_GDBARCH_SWAP(VAR) deprecated_register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL) | |
0f71a2f6 JM |
2523 | |
2524 | ||
2525 | ||
99e7bb18 | 2526 | /* Set the dynamic target-system-dependent parameters (architecture, |
c906108c SS |
2527 | byte-order, ...) using information found in the BFD */ |
2528 | ||
104c1213 | 2529 | extern void set_gdbarch_from_file (bfd *); |
c906108c SS |
2530 | |
2531 | ||
e514a9d6 JM |
2532 | /* Initialize the current architecture to the "first" one we find on |
2533 | our list. */ | |
2534 | ||
2535 | extern void initialize_current_architecture (void); | |
2536 | ||
c906108c | 2537 | /* gdbarch trace variable */ |
adf40b2e | 2538 | extern int gdbarch_debug; |
c906108c | 2539 | |
4b9b3959 | 2540 | extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 2541 | |
c906108c | 2542 | #endif |