1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
38 #include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */
40 /* Pull in function declarations refered to, indirectly, via macros. */
41 #include "inferior.h" /* For unsigned_address_to_pointer(). */
42 #include "symfile.h" /* For entry_point_address(). */
50 struct minimal_symbol;
54 extern struct gdbarch *current_gdbarch;
57 /* If any of the following are defined, the target wasn't correctly
60 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE)
61 #error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file."
65 /* The following are pre-initialized by GDBARCH. */
67 extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch);
68 /* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */
69 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE)
70 #error "Non multi-arch definition of TARGET_ARCHITECTURE"
72 #if !defined (TARGET_ARCHITECTURE)
73 #define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch))
76 extern int gdbarch_byte_order (struct gdbarch *gdbarch);
77 /* set_gdbarch_byte_order() - not applicable - pre-initialized. */
78 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER)
79 #error "Non multi-arch definition of TARGET_BYTE_ORDER"
81 #if !defined (TARGET_BYTE_ORDER)
82 #define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch))
85 extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
86 /* set_gdbarch_osabi() - not applicable - pre-initialized. */
87 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI)
88 #error "Non multi-arch definition of TARGET_OSABI"
90 #if !defined (TARGET_OSABI)
91 #define TARGET_OSABI (gdbarch_osabi (current_gdbarch))
95 /* The following are initialized by the target dependent code. */
97 /* Number of bits in a char or unsigned char for the target machine.
98 Just like CHAR_BIT in <limits.h> but describes the target machine.
99 v:2:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
101 Number of bits in a short or unsigned short for the target machine. */
103 /* Default (value) for non- multi-arch platforms. */
104 #if (!GDB_MULTI_ARCH) && !defined (TARGET_SHORT_BIT)
105 #define TARGET_SHORT_BIT (2*TARGET_CHAR_BIT)
108 extern int gdbarch_short_bit (struct gdbarch *gdbarch);
109 extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit);
110 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT)
111 #error "Non multi-arch definition of TARGET_SHORT_BIT"
113 #if !defined (TARGET_SHORT_BIT)
114 #define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch))
117 /* Number of bits in an int or unsigned int for the target machine. */
119 /* Default (value) for non- multi-arch platforms. */
120 #if (!GDB_MULTI_ARCH) && !defined (TARGET_INT_BIT)
121 #define TARGET_INT_BIT (4*TARGET_CHAR_BIT)
124 extern int gdbarch_int_bit (struct gdbarch *gdbarch);
125 extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit);
126 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT)
127 #error "Non multi-arch definition of TARGET_INT_BIT"
129 #if !defined (TARGET_INT_BIT)
130 #define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch))
133 /* Number of bits in a long or unsigned long for the target machine. */
135 /* Default (value) for non- multi-arch platforms. */
136 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_BIT)
137 #define TARGET_LONG_BIT (4*TARGET_CHAR_BIT)
140 extern int gdbarch_long_bit (struct gdbarch *gdbarch);
141 extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit);
142 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT)
143 #error "Non multi-arch definition of TARGET_LONG_BIT"
145 #if !defined (TARGET_LONG_BIT)
146 #define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch))
149 /* Number of bits in a long long or unsigned long long for the target
152 /* Default (value) for non- multi-arch platforms. */
153 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_LONG_BIT)
154 #define TARGET_LONG_LONG_BIT (2*TARGET_LONG_BIT)
157 extern int gdbarch_long_long_bit (struct gdbarch *gdbarch);
158 extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit);
159 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT)
160 #error "Non multi-arch definition of TARGET_LONG_LONG_BIT"
162 #if !defined (TARGET_LONG_LONG_BIT)
163 #define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch))
166 /* Number of bits in a float for the target machine. */
168 /* Default (value) for non- multi-arch platforms. */
169 #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_BIT)
170 #define TARGET_FLOAT_BIT (4*TARGET_CHAR_BIT)
173 extern int gdbarch_float_bit (struct gdbarch *gdbarch);
174 extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
175 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT)
176 #error "Non multi-arch definition of TARGET_FLOAT_BIT"
178 #if !defined (TARGET_FLOAT_BIT)
179 #define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
182 /* Number of bits in a double for the target machine. */
184 /* Default (value) for non- multi-arch platforms. */
185 #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_BIT)
186 #define TARGET_DOUBLE_BIT (8*TARGET_CHAR_BIT)
189 extern int gdbarch_double_bit (struct gdbarch *gdbarch);
190 extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit);
191 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT)
192 #error "Non multi-arch definition of TARGET_DOUBLE_BIT"
194 #if !defined (TARGET_DOUBLE_BIT)
195 #define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
198 /* Number of bits in a long double for the target machine. */
200 /* Default (value) for non- multi-arch platforms. */
201 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_BIT)
202 #define TARGET_LONG_DOUBLE_BIT (8*TARGET_CHAR_BIT)
205 extern int gdbarch_long_double_bit (struct gdbarch *gdbarch);
206 extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit);
207 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT)
208 #error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT"
210 #if !defined (TARGET_LONG_DOUBLE_BIT)
211 #define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
214 /* For most targets, a pointer on the target and its representation as an
215 address in GDB have the same size and "look the same". For such a
216 target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT
217 / addr_bit will be set from it.
219 If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably
220 also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well.
222 ptr_bit is the size of a pointer on the target */
224 /* Default (value) for non- multi-arch platforms. */
225 #if (!GDB_MULTI_ARCH) && !defined (TARGET_PTR_BIT)
226 #define TARGET_PTR_BIT (TARGET_INT_BIT)
229 extern int gdbarch_ptr_bit (struct gdbarch *gdbarch);
230 extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
231 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT)
232 #error "Non multi-arch definition of TARGET_PTR_BIT"
234 #if !defined (TARGET_PTR_BIT)
235 #define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch))
238 /* addr_bit is the size of a target address as represented in gdb */
240 /* Default (value) for non- multi-arch platforms. */
241 #if (!GDB_MULTI_ARCH) && !defined (TARGET_ADDR_BIT)
242 #define TARGET_ADDR_BIT (TARGET_PTR_BIT)
245 extern int gdbarch_addr_bit (struct gdbarch *gdbarch);
246 extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
247 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT)
248 #error "Non multi-arch definition of TARGET_ADDR_BIT"
250 #if !defined (TARGET_ADDR_BIT)
251 #define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch))
254 /* Number of bits in a BFD_VMA for the target object file format. */
256 /* Default (value) for non- multi-arch platforms. */
257 #if (!GDB_MULTI_ARCH) && !defined (TARGET_BFD_VMA_BIT)
258 #define TARGET_BFD_VMA_BIT (TARGET_ARCHITECTURE->bits_per_address)
261 extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch);
262 extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit);
263 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT)
264 #error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
266 #if !defined (TARGET_BFD_VMA_BIT)
267 #define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch))
270 /* One if `char' acts like `signed char', zero if `unsigned char'. */
272 /* Default (value) for non- multi-arch platforms. */
273 #if (!GDB_MULTI_ARCH) && !defined (TARGET_CHAR_SIGNED)
274 #define TARGET_CHAR_SIGNED (1)
277 extern int gdbarch_char_signed (struct gdbarch *gdbarch);
278 extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed);
279 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED)
280 #error "Non multi-arch definition of TARGET_CHAR_SIGNED"
282 #if !defined (TARGET_CHAR_SIGNED)
283 #define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch))
286 #if defined (TARGET_READ_PC)
287 /* Legacy for systems yet to multi-arch TARGET_READ_PC */
288 #if !defined (TARGET_READ_PC_P)
289 #define TARGET_READ_PC_P() (1)
293 /* Default predicate for non- multi-arch targets. */
294 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC_P)
295 #define TARGET_READ_PC_P() (0)
298 extern int gdbarch_read_pc_p (struct gdbarch *gdbarch);
299 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC_P)
300 #error "Non multi-arch definition of TARGET_READ_PC"
302 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC_P)
303 #define TARGET_READ_PC_P() (gdbarch_read_pc_p (current_gdbarch))
306 /* Default (function) for non- multi-arch platforms. */
307 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC)
308 #define TARGET_READ_PC(ptid) (internal_error (__FILE__, __LINE__, "TARGET_READ_PC"), 0)
311 typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid);
312 extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid);
313 extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc);
314 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC)
315 #error "Non multi-arch definition of TARGET_READ_PC"
317 #if !defined (TARGET_READ_PC)
318 #define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid))
321 /* Default (function) for non- multi-arch platforms. */
322 #if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC)
323 #define TARGET_WRITE_PC(val, ptid) (generic_target_write_pc (val, ptid))
326 typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid);
327 extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid);
328 extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc);
329 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC)
330 #error "Non multi-arch definition of TARGET_WRITE_PC"
332 #if !defined (TARGET_WRITE_PC)
333 #define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
336 /* UNWIND_SP is a direct replacement for TARGET_READ_SP. */
338 #if defined (TARGET_READ_SP)
339 /* Legacy for systems yet to multi-arch TARGET_READ_SP */
340 #if !defined (TARGET_READ_SP_P)
341 #define TARGET_READ_SP_P() (1)
345 /* Default predicate for non- multi-arch targets. */
346 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP_P)
347 #define TARGET_READ_SP_P() (0)
350 extern int gdbarch_read_sp_p (struct gdbarch *gdbarch);
351 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP_P)
352 #error "Non multi-arch definition of TARGET_READ_SP"
354 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP_P)
355 #define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch))
358 /* Default (function) for non- multi-arch platforms. */
359 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP)
360 #define TARGET_READ_SP() (internal_error (__FILE__, __LINE__, "TARGET_READ_SP"), 0)
363 typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
364 extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch);
365 extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp);
366 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
367 #error "Non multi-arch definition of TARGET_READ_SP"
369 #if !defined (TARGET_READ_SP)
370 #define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
373 /* Function for getting target's idea of a frame pointer. FIXME: GDB's
374 whole scheme for dealing with "frames" and "frame pointers" needs a
375 serious shakedown. */
377 /* Default (function) for non- multi-arch platforms. */
378 #if (!GDB_MULTI_ARCH) && !defined (TARGET_VIRTUAL_FRAME_POINTER)
379 #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (legacy_virtual_frame_pointer (pc, frame_regnum, frame_offset))
382 typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
383 extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
384 extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer);
385 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER)
386 #error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
388 #if !defined (TARGET_VIRTUAL_FRAME_POINTER)
389 #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset))
392 extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
394 typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
395 extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
396 extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read);
398 extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
400 typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
401 extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
402 extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
404 extern int gdbarch_num_regs (struct gdbarch *gdbarch);
405 extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
406 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
407 #error "Non multi-arch definition of NUM_REGS"
409 #if !defined (NUM_REGS)
410 #define NUM_REGS (gdbarch_num_regs (current_gdbarch))
413 /* This macro gives the number of pseudo-registers that live in the
414 register namespace but do not get fetched or stored on the target.
415 These pseudo-registers may be aliases for other registers,
416 combinations of other registers, or they may be computed by GDB. */
418 /* Default (value) for non- multi-arch platforms. */
419 #if (!GDB_MULTI_ARCH) && !defined (NUM_PSEUDO_REGS)
420 #define NUM_PSEUDO_REGS (0)
423 extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch);
424 extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs);
425 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
426 #error "Non multi-arch definition of NUM_PSEUDO_REGS"
428 #if !defined (NUM_PSEUDO_REGS)
429 #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
432 /* GDB's standard (or well known) register numbers. These can map onto
433 a real register or a pseudo (computed) register or not be defined at
435 SP_REGNUM will hopefully be replaced by UNWIND_SP. */
437 /* Default (value) for non- multi-arch platforms. */
438 #if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM)
439 #define SP_REGNUM (-1)
442 extern int gdbarch_sp_regnum (struct gdbarch *gdbarch);
443 extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
444 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
445 #error "Non multi-arch definition of SP_REGNUM"
447 #if !defined (SP_REGNUM)
448 #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
451 /* Default (value) for non- multi-arch platforms. */
452 #if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM)
453 #define PC_REGNUM (-1)
456 extern int gdbarch_pc_regnum (struct gdbarch *gdbarch);
457 extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
458 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
459 #error "Non multi-arch definition of PC_REGNUM"
461 #if !defined (PC_REGNUM)
462 #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
465 /* Default (value) for non- multi-arch platforms. */
466 #if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM)
467 #define PS_REGNUM (-1)
470 extern int gdbarch_ps_regnum (struct gdbarch *gdbarch);
471 extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
472 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM)
473 #error "Non multi-arch definition of PS_REGNUM"
475 #if !defined (PS_REGNUM)
476 #define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch))
479 /* Default (value) for non- multi-arch platforms. */
480 #if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM)
481 #define FP0_REGNUM (-1)
484 extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch);
485 extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
486 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
487 #error "Non multi-arch definition of FP0_REGNUM"
489 #if !defined (FP0_REGNUM)
490 #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
493 /* Default (value) for non- multi-arch platforms. */
494 #if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM)
495 #define NPC_REGNUM (-1)
498 extern int gdbarch_npc_regnum (struct gdbarch *gdbarch);
499 extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
500 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
501 #error "Non multi-arch definition of NPC_REGNUM"
503 #if !defined (NPC_REGNUM)
504 #define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
507 /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
509 /* Default (function) for non- multi-arch platforms. */
510 #if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM)
511 #define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr))
514 typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
515 extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr);
516 extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum);
517 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
518 #error "Non multi-arch definition of STAB_REG_TO_REGNUM"
520 #if !defined (STAB_REG_TO_REGNUM)
521 #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
524 /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
526 /* Default (function) for non- multi-arch platforms. */
527 #if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM)
528 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr))
531 typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr);
532 extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr);
533 extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum);
534 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
535 #error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
537 #if !defined (ECOFF_REG_TO_REGNUM)
538 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
541 /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
543 /* Default (function) for non- multi-arch platforms. */
544 #if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM)
545 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr))
548 typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr);
549 extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr);
550 extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum);
551 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
552 #error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
554 #if !defined (DWARF_REG_TO_REGNUM)
555 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
558 /* Convert from an sdb register number to an internal gdb register number.
559 This should be defined in tm.h, if REGISTER_NAMES is not set up
560 to map one to one onto the sdb register numbers. */
562 /* Default (function) for non- multi-arch platforms. */
563 #if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM)
564 #define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr))
567 typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
568 extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
569 extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
570 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
571 #error "Non multi-arch definition of SDB_REG_TO_REGNUM"
573 #if !defined (SDB_REG_TO_REGNUM)
574 #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
577 /* Default (function) for non- multi-arch platforms. */
578 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
579 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr))
582 typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr);
583 extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
584 extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum);
585 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
586 #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
588 #if !defined (DWARF2_REG_TO_REGNUM)
589 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
592 typedef const char * (gdbarch_register_name_ftype) (int regnr);
593 extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
594 extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
595 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
596 #error "Non multi-arch definition of REGISTER_NAME"
598 #if !defined (REGISTER_NAME)
599 #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
602 /* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
604 extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
606 typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr);
607 extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
608 extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
610 /* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
612 #if defined (REGISTER_VIRTUAL_TYPE)
613 /* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
614 #if !defined (REGISTER_VIRTUAL_TYPE_P)
615 #define REGISTER_VIRTUAL_TYPE_P() (1)
619 /* Default predicate for non- multi-arch targets. */
620 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P)
621 #define REGISTER_VIRTUAL_TYPE_P() (0)
624 extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch);
625 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P)
626 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
628 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P)
629 #define REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch))
632 /* Default (function) for non- multi-arch platforms. */
633 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE)
634 #define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0)
637 typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr);
638 extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
639 extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type);
640 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
641 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
643 #if !defined (REGISTER_VIRTUAL_TYPE)
644 #define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr))
647 /* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
648 from REGISTER_TYPE. */
650 extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch);
651 extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes);
652 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES)
653 #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES"
655 #if !defined (DEPRECATED_REGISTER_BYTES)
656 #define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
659 /* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
660 register offsets computed using just REGISTER_TYPE, this can be
661 deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
662 function with predicate has a valid (callable) initial value. As a
663 consequence, even when the predicate is false, the corresponding
664 function works. This simplifies the migration process - old code,
665 calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
667 #if defined (REGISTER_BYTE)
668 /* Legacy for systems yet to multi-arch REGISTER_BYTE */
669 #if !defined (REGISTER_BYTE_P)
670 #define REGISTER_BYTE_P() (1)
674 /* Default predicate for non- multi-arch targets. */
675 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE_P)
676 #define REGISTER_BYTE_P() (0)
679 extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
680 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P)
681 #error "Non multi-arch definition of REGISTER_BYTE"
683 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P)
684 #define REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
687 /* Default (function) for non- multi-arch platforms. */
688 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE)
689 #define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
692 typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr);
693 extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr);
694 extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte);
695 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
696 #error "Non multi-arch definition of REGISTER_BYTE"
698 #if !defined (REGISTER_BYTE)
699 #define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
702 /* If all registers have identical raw and virtual sizes and those
703 sizes agree with the value computed from REGISTER_TYPE,
704 DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
707 #if defined (REGISTER_RAW_SIZE)
708 /* Legacy for systems yet to multi-arch REGISTER_RAW_SIZE */
709 #if !defined (REGISTER_RAW_SIZE_P)
710 #define REGISTER_RAW_SIZE_P() (1)
714 /* Default predicate for non- multi-arch targets. */
715 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE_P)
716 #define REGISTER_RAW_SIZE_P() (0)
719 extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch);
720 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE_P)
721 #error "Non multi-arch definition of REGISTER_RAW_SIZE"
723 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE_P)
724 #define REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch))
727 /* Default (function) for non- multi-arch platforms. */
728 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
729 #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
732 typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr);
733 extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
734 extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size);
735 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
736 #error "Non multi-arch definition of REGISTER_RAW_SIZE"
738 #if !defined (REGISTER_RAW_SIZE)
739 #define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
742 /* If all registers have identical raw and virtual sizes and those
743 sizes agree with the value computed from REGISTER_TYPE,
744 DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
747 #if defined (REGISTER_VIRTUAL_SIZE)
748 /* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_SIZE */
749 #if !defined (REGISTER_VIRTUAL_SIZE_P)
750 #define REGISTER_VIRTUAL_SIZE_P() (1)
754 /* Default predicate for non- multi-arch targets. */
755 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE_P)
756 #define REGISTER_VIRTUAL_SIZE_P() (0)
759 extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch);
760 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE_P)
761 #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
763 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE_P)
764 #define REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch))
767 /* Default (function) for non- multi-arch platforms. */
768 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
769 #define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
772 typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr);
773 extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
774 extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size);
775 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
776 #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
778 #if !defined (REGISTER_VIRTUAL_SIZE)
779 #define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr))
782 /* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
783 replaced by the constant MAX_REGISTER_SIZE. */
785 #if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
786 /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */
787 #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
788 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1)
792 /* Default predicate for non- multi-arch targets. */
793 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
794 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (0)
797 extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch);
798 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
799 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
801 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
802 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch))
805 /* Default (value) for non- multi-arch platforms. */
806 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
807 #define DEPRECATED_MAX_REGISTER_RAW_SIZE (0)
810 extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch);
811 extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size);
812 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
813 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
815 #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
816 #define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch))
819 /* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been
820 replaced by the constant MAX_REGISTER_SIZE. */
822 #if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
823 /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */
824 #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
825 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1)
829 /* Default predicate for non- multi-arch targets. */
830 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
831 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (0)
834 extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch);
835 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
836 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
838 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
839 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch))
842 /* Default (value) for non- multi-arch platforms. */
843 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
844 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (0)
847 extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch);
848 extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size);
849 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
850 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
852 #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
853 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
856 /* See gdbint.texinfo, and PUSH_DUMMY_CALL. */
858 extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
860 typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info);
861 extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info);
862 extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
864 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
865 SAVE_DUMMY_FRAME_TOS. */
867 #if defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
868 /* Legacy for systems yet to multi-arch DEPRECATED_SAVE_DUMMY_FRAME_TOS */
869 #if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
870 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (1)
874 /* Default predicate for non- multi-arch targets. */
875 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
876 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (0)
879 extern int gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
880 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
881 #error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS"
883 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
884 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (gdbarch_deprecated_save_dummy_frame_tos_p (current_gdbarch))
887 /* Default (function) for non- multi-arch platforms. */
888 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
889 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVE_DUMMY_FRAME_TOS"), 0)
892 typedef void (gdbarch_deprecated_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
893 extern void gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
894 extern void set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos);
895 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
896 #error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS"
898 #if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
899 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_deprecated_save_dummy_frame_tos (current_gdbarch, sp))
902 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
903 DEPRECATED_FP_REGNUM. */
905 /* Default (value) for non- multi-arch platforms. */
906 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM)
907 #define DEPRECATED_FP_REGNUM (-1)
910 extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
911 extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
912 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
913 #error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
915 #if !defined (DEPRECATED_FP_REGNUM)
916 #define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
919 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
920 DEPRECATED_TARGET_READ_FP. */
922 #if defined (DEPRECATED_TARGET_READ_FP)
923 /* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
924 #if !defined (DEPRECATED_TARGET_READ_FP_P)
925 #define DEPRECATED_TARGET_READ_FP_P() (1)
929 /* Default predicate for non- multi-arch targets. */
930 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P)
931 #define DEPRECATED_TARGET_READ_FP_P() (0)
934 extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
935 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
936 #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
938 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
939 #define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
942 /* Default (function) for non- multi-arch platforms. */
943 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP)
944 #define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0)
947 typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
948 extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
949 extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
950 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP)
951 #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
953 #if !defined (DEPRECATED_TARGET_READ_FP)
954 #define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
957 /* See gdbint.texinfo. See infcall.c. New, all singing all dancing,
958 replacement for DEPRECATED_PUSH_ARGUMENTS. */
960 extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
962 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);
963 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);
964 extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
966 /* PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS. */
968 #if defined (DEPRECATED_PUSH_ARGUMENTS)
969 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */
970 #if !defined (DEPRECATED_PUSH_ARGUMENTS_P)
971 #define DEPRECATED_PUSH_ARGUMENTS_P() (1)
975 /* Default predicate for non- multi-arch targets. */
976 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P)
977 #define DEPRECATED_PUSH_ARGUMENTS_P() (0)
980 extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch);
981 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
982 #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
984 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P)
985 #define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch))
988 /* Default (function) for non- multi-arch platforms. */
989 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS)
990 #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0)
993 typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
994 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);
995 extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments);
996 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
997 #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
999 #if !defined (DEPRECATED_PUSH_ARGUMENTS)
1000 #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
1003 /* DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true. */
1005 /* Default (value) for non- multi-arch platforms. */
1006 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1007 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (1)
1010 extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch);
1011 extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames);
1012 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1013 #error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES"
1015 #if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1016 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch))
1019 /* Implement PUSH_RETURN_ADDRESS, and then merge in
1020 DEPRECATED_PUSH_RETURN_ADDRESS. */
1022 #if defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1023 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */
1024 #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1025 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1)
1029 /* Default predicate for non- multi-arch targets. */
1030 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1031 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0)
1034 extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch);
1035 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1036 #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
1038 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1039 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch))
1042 /* Default (function) for non- multi-arch platforms. */
1043 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1044 #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0)
1047 typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
1048 extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
1049 extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address);
1050 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1051 #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
1053 #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1054 #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
1057 /* Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP. */
1059 #if defined (DEPRECATED_DUMMY_WRITE_SP)
1060 /* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
1061 #if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
1062 #define DEPRECATED_DUMMY_WRITE_SP_P() (1)
1066 /* Default predicate for non- multi-arch targets. */
1067 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P)
1068 #define DEPRECATED_DUMMY_WRITE_SP_P() (0)
1071 extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
1072 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
1073 #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
1075 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
1076 #define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
1079 /* Default (function) for non- multi-arch platforms. */
1080 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP)
1081 #define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0)
1084 typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
1085 extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
1086 extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
1087 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP)
1088 #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
1090 #if !defined (DEPRECATED_DUMMY_WRITE_SP)
1091 #define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
1094 /* DEPRECATED_REGISTER_SIZE can be deleted. */
1096 extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch);
1097 extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size);
1098 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE)
1099 #error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE"
1101 #if !defined (DEPRECATED_REGISTER_SIZE)
1102 #define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch))
1105 /* Default (value) for non- multi-arch platforms. */
1106 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_LOCATION)
1107 #define CALL_DUMMY_LOCATION (AT_ENTRY_POINT)
1110 extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
1111 extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
1112 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
1113 #error "Non multi-arch definition of CALL_DUMMY_LOCATION"
1115 #if !defined (CALL_DUMMY_LOCATION)
1116 #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
1119 /* Default (function) for non- multi-arch platforms. */
1120 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS)
1121 #define CALL_DUMMY_ADDRESS() (entry_point_address ())
1124 typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
1125 extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
1126 extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
1127 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
1128 #error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
1130 #if !defined (CALL_DUMMY_ADDRESS)
1131 #define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
1134 /* DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted. */
1136 extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch);
1137 extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset);
1138 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
1139 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET"
1141 #if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
1142 #define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch))
1145 /* DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted. */
1147 extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
1148 extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset);
1149 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
1150 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET"
1152 #if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
1153 #define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch))
1156 /* DEPRECATED_CALL_DUMMY_LENGTH can be deleted. */
1158 extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch);
1159 extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length);
1160 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH)
1161 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH"
1163 #if !defined (DEPRECATED_CALL_DUMMY_LENGTH)
1164 #define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch))
1167 /* DEPRECATED_CALL_DUMMY_WORDS can be deleted. */
1169 /* Default (value) for non- multi-arch platforms. */
1170 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_WORDS)
1171 #define DEPRECATED_CALL_DUMMY_WORDS (legacy_call_dummy_words)
1174 extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch);
1175 extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words);
1176 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS)
1177 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS"
1179 #if !defined (DEPRECATED_CALL_DUMMY_WORDS)
1180 #define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch))
1183 /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS. */
1185 /* Default (value) for non- multi-arch platforms. */
1186 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1187 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words)
1190 extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch);
1191 extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words);
1192 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1193 #error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS"
1195 #if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1196 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch))
1199 /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_CALL_DUMMY_STACK_ADJUST. */
1201 #if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1202 /* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_STACK_ADJUST */
1203 #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1204 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (1)
1208 /* Default predicate for non- multi-arch targets. */
1209 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1210 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (0)
1213 extern int gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch);
1214 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1215 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
1217 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1218 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (gdbarch_deprecated_call_dummy_stack_adjust_p (current_gdbarch))
1221 /* Default (value) for non- multi-arch platforms. */
1222 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1223 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (0)
1226 extern int gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch);
1227 extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch, int deprecated_call_dummy_stack_adjust);
1228 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1229 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
1231 #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1232 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (gdbarch_deprecated_call_dummy_stack_adjust (current_gdbarch))
1235 /* DEPRECATED_FIX_CALL_DUMMY can be deleted. For the SPARC, implement
1236 PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK. */
1238 #if defined (DEPRECATED_FIX_CALL_DUMMY)
1239 /* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */
1240 #if !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1241 #define DEPRECATED_FIX_CALL_DUMMY_P() (1)
1245 /* Default predicate for non- multi-arch targets. */
1246 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1247 #define DEPRECATED_FIX_CALL_DUMMY_P() (0)
1250 extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch);
1251 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P)
1252 #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
1254 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1255 #define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch))
1258 /* Default (function) for non- multi-arch platforms. */
1259 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY)
1260 #define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "DEPRECATED_FIX_CALL_DUMMY"), 0)
1263 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);
1264 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);
1265 extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy);
1266 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY)
1267 #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
1269 #if !defined (DEPRECATED_FIX_CALL_DUMMY)
1270 #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))
1273 /* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */
1275 extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
1277 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);
1278 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);
1279 extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
1281 /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME. */
1283 #if defined (DEPRECATED_PUSH_DUMMY_FRAME)
1284 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
1285 #if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1286 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
1290 /* Default predicate for non- multi-arch targets. */
1291 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1292 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (0)
1295 extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
1296 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1297 #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
1299 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1300 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
1303 /* Default (function) for non- multi-arch platforms. */
1304 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME)
1305 #define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0)
1308 typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
1309 extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
1310 extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
1311 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME)
1312 #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
1314 #if !defined (DEPRECATED_PUSH_DUMMY_FRAME)
1315 #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
1318 /* Implement PUSH_DUMMY_CALL, then delete
1319 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED. */
1321 /* Default (value) for non- multi-arch platforms. */
1322 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
1323 #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (0)
1326 extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch);
1327 extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed);
1328 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
1329 #error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED"
1331 #if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
1332 #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch))
1335 #if defined (DEPRECATED_DO_REGISTERS_INFO)
1336 /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
1337 #if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
1338 #define DEPRECATED_DO_REGISTERS_INFO_P() (1)
1342 /* Default predicate for non- multi-arch targets. */
1343 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
1344 #define DEPRECATED_DO_REGISTERS_INFO_P() (0)
1347 extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
1348 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
1349 #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
1351 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
1352 #define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
1355 /* Default (function) for non- multi-arch platforms. */
1356 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO)
1357 #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0)
1360 typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
1361 extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
1362 extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
1363 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO)
1364 #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
1366 #if !defined (DEPRECATED_DO_REGISTERS_INFO)
1367 #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
1370 typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
1371 extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
1372 extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
1374 extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
1376 typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1377 extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1378 extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
1380 extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
1382 typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1383 extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1384 extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
1386 /* MAP a GDB RAW register number onto a simulator register number. See
1387 also include/...-sim.h. */
1389 /* Default (function) for non- multi-arch platforms. */
1390 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
1391 #define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
1394 typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
1395 extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
1396 extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
1397 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
1398 #error "Non multi-arch definition of REGISTER_SIM_REGNO"
1400 #if !defined (REGISTER_SIM_REGNO)
1401 #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
1404 #if defined (REGISTER_BYTES_OK)
1405 /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
1406 #if !defined (REGISTER_BYTES_OK_P)
1407 #define REGISTER_BYTES_OK_P() (1)
1411 /* Default predicate for non- multi-arch targets. */
1412 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
1413 #define REGISTER_BYTES_OK_P() (0)
1416 extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
1417 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
1418 #error "Non multi-arch definition of REGISTER_BYTES_OK"
1420 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
1421 #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
1424 /* Default (function) for non- multi-arch platforms. */
1425 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
1426 #define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
1429 typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
1430 extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
1431 extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
1432 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
1433 #error "Non multi-arch definition of REGISTER_BYTES_OK"
1435 #if !defined (REGISTER_BYTES_OK)
1436 #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
1439 /* Default (function) for non- multi-arch platforms. */
1440 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
1441 #define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
1444 typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
1445 extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
1446 extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
1447 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
1448 #error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
1450 #if !defined (CANNOT_FETCH_REGISTER)
1451 #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
1454 /* Default (function) for non- multi-arch platforms. */
1455 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
1456 #define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
1459 typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
1460 extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
1461 extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
1462 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
1463 #error "Non multi-arch definition of CANNOT_STORE_REGISTER"
1465 #if !defined (CANNOT_STORE_REGISTER)
1466 #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
1469 /* setjmp/longjmp support. */
1471 #if defined (GET_LONGJMP_TARGET)
1472 /* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */
1473 #if !defined (GET_LONGJMP_TARGET_P)
1474 #define GET_LONGJMP_TARGET_P() (1)
1478 /* Default predicate for non- multi-arch targets. */
1479 #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P)
1480 #define GET_LONGJMP_TARGET_P() (0)
1483 extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
1484 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
1485 #error "Non multi-arch definition of GET_LONGJMP_TARGET"
1487 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
1488 #define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
1491 /* Default (function) for non- multi-arch platforms. */
1492 #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET)
1493 #define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0)
1496 typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
1497 extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
1498 extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
1499 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
1500 #error "Non multi-arch definition of GET_LONGJMP_TARGET"
1502 #if !defined (GET_LONGJMP_TARGET)
1503 #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
1506 /* NOTE: cagney/2002-11-24: This function with predicate has a valid
1507 (callable) initial value. As a consequence, even when the predicate
1508 is false, the corresponding function works. This simplifies the
1509 migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
1510 doesn't need to be modified. */
1512 #if defined (DEPRECATED_PC_IN_CALL_DUMMY)
1513 /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
1514 #if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1515 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
1519 /* Default predicate for non- multi-arch targets. */
1520 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1521 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (0)
1524 extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
1525 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1526 #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1528 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1529 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
1532 /* Default (function) for non- multi-arch platforms. */
1533 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1534 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
1537 typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1538 extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1539 extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
1540 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY)
1541 #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1543 #if !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1544 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
1547 #if defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1548 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */
1549 #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1550 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1)
1554 /* Default predicate for non- multi-arch targets. */
1555 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1556 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (0)
1559 extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch);
1560 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1561 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1563 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1564 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch))
1567 /* Default (function) for non- multi-arch platforms. */
1568 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1569 #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC_FIRST"), 0)
1572 typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
1573 extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1574 extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first);
1575 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1576 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1578 #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1579 #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev))
1582 #if defined (DEPRECATED_INIT_FRAME_PC)
1583 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
1584 #if !defined (DEPRECATED_INIT_FRAME_PC_P)
1585 #define DEPRECATED_INIT_FRAME_PC_P() (1)
1589 /* Default predicate for non- multi-arch targets. */
1590 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_P)
1591 #define DEPRECATED_INIT_FRAME_PC_P() (0)
1594 extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch);
1595 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P)
1596 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1598 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P)
1599 #define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch))
1602 /* Default (function) for non- multi-arch platforms. */
1603 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC)
1604 #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC"), 0)
1607 typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev);
1608 extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1609 extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc);
1610 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC)
1611 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1613 #if !defined (DEPRECATED_INIT_FRAME_PC)
1614 #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev))
1617 extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
1618 extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
1619 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
1620 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
1622 #if !defined (BELIEVE_PCC_PROMOTION)
1623 #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
1626 extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
1627 extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
1628 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
1629 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
1631 #if !defined (BELIEVE_PCC_PROMOTION_TYPE)
1632 #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
1635 #if defined (DEPRECATED_GET_SAVED_REGISTER)
1636 /* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */
1637 #if !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1638 #define DEPRECATED_GET_SAVED_REGISTER_P() (1)
1642 /* Default predicate for non- multi-arch targets. */
1643 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1644 #define DEPRECATED_GET_SAVED_REGISTER_P() (0)
1647 extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch);
1648 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P)
1649 #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
1651 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1652 #define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch))
1655 /* Default (function) for non- multi-arch platforms. */
1656 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER)
1657 #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "DEPRECATED_GET_SAVED_REGISTER"), 0)
1660 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);
1661 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);
1662 extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register);
1663 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER)
1664 #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
1666 #if !defined (DEPRECATED_GET_SAVED_REGISTER)
1667 #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))
1670 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1671 For raw <-> cooked register conversions, replaced by pseudo registers. */
1673 /* Default (function) for non- multi-arch platforms. */
1674 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERTIBLE)
1675 #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (deprecated_register_convertible_not (nr))
1678 typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr);
1679 extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr);
1680 extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible);
1681 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE)
1682 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
1684 #if !defined (DEPRECATED_REGISTER_CONVERTIBLE)
1685 #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr))
1688 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1689 For raw <-> cooked register conversions, replaced by pseudo registers. */
1691 /* Default (function) for non- multi-arch platforms. */
1692 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1693 #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"), 0)
1696 typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
1697 extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
1698 extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual);
1699 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1700 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"
1702 #if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1703 #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
1706 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1707 For raw <-> cooked register conversions, replaced by pseudo registers. */
1709 /* Default (function) for non- multi-arch platforms. */
1710 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1711 #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_RAW"), 0)
1714 typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to);
1715 extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to);
1716 extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw);
1717 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1718 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW"
1720 #if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1721 #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
1724 /* Default (function) for non- multi-arch platforms. */
1725 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P)
1726 #define CONVERT_REGISTER_P(regnum, type) (legacy_convert_register_p (regnum, type))
1729 typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type);
1730 extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type);
1731 extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
1732 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
1733 #error "Non multi-arch definition of CONVERT_REGISTER_P"
1735 #if !defined (CONVERT_REGISTER_P)
1736 #define CONVERT_REGISTER_P(regnum, type) (gdbarch_convert_register_p (current_gdbarch, regnum, type))
1739 /* Default (function) for non- multi-arch platforms. */
1740 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
1741 #define REGISTER_TO_VALUE(frame, regnum, type, buf) (legacy_register_to_value (frame, regnum, type, buf))
1744 typedef void (gdbarch_register_to_value_ftype) (struct frame_info *frame, int regnum, struct type *type, void *buf);
1745 extern void gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf);
1746 extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
1747 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
1748 #error "Non multi-arch definition of REGISTER_TO_VALUE"
1750 #if !defined (REGISTER_TO_VALUE)
1751 #define REGISTER_TO_VALUE(frame, regnum, type, buf) (gdbarch_register_to_value (current_gdbarch, frame, regnum, type, buf))
1754 /* Default (function) for non- multi-arch platforms. */
1755 #if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
1756 #define VALUE_TO_REGISTER(frame, regnum, type, buf) (legacy_value_to_register (frame, regnum, type, buf))
1759 typedef void (gdbarch_value_to_register_ftype) (struct frame_info *frame, int regnum, struct type *type, const void *buf);
1760 extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf);
1761 extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
1762 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
1763 #error "Non multi-arch definition of VALUE_TO_REGISTER"
1765 #if !defined (VALUE_TO_REGISTER)
1766 #define VALUE_TO_REGISTER(frame, regnum, type, buf) (gdbarch_value_to_register (current_gdbarch, frame, regnum, type, buf))
1769 /* Default (function) for non- multi-arch platforms. */
1770 #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
1771 #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
1774 typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf);
1775 extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf);
1776 extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
1777 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
1778 #error "Non multi-arch definition of POINTER_TO_ADDRESS"
1780 #if !defined (POINTER_TO_ADDRESS)
1781 #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
1784 /* Default (function) for non- multi-arch platforms. */
1785 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
1786 #define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr))
1789 typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr);
1790 extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr);
1791 extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
1792 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
1793 #error "Non multi-arch definition of ADDRESS_TO_POINTER"
1795 #if !defined (ADDRESS_TO_POINTER)
1796 #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
1799 #if defined (INTEGER_TO_ADDRESS)
1800 /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
1801 #if !defined (INTEGER_TO_ADDRESS_P)
1802 #define INTEGER_TO_ADDRESS_P() (1)
1806 /* Default predicate for non- multi-arch targets. */
1807 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P)
1808 #define INTEGER_TO_ADDRESS_P() (0)
1811 extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch);
1812 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P)
1813 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1815 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P)
1816 #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch))
1819 /* Default (function) for non- multi-arch platforms. */
1820 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
1821 #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0)
1824 typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
1825 extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
1826 extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
1827 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
1828 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1830 #if !defined (INTEGER_TO_ADDRESS)
1831 #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
1834 /* Default (function) for non- multi-arch platforms. */
1835 #if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
1836 #define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type))
1839 typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
1840 extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
1841 extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack);
1842 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
1843 #error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
1845 #if !defined (RETURN_VALUE_ON_STACK)
1846 #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
1849 #if defined (DEPRECATED_POP_FRAME)
1850 /* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */
1851 #if !defined (DEPRECATED_POP_FRAME_P)
1852 #define DEPRECATED_POP_FRAME_P() (1)
1856 /* Default predicate for non- multi-arch targets. */
1857 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME_P)
1858 #define DEPRECATED_POP_FRAME_P() (0)
1861 extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch);
1862 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P)
1863 #error "Non multi-arch definition of DEPRECATED_POP_FRAME"
1865 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P)
1866 #define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch))
1869 /* Default (function) for non- multi-arch platforms. */
1870 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME)
1871 #define DEPRECATED_POP_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_POP_FRAME"), 0)
1874 typedef void (gdbarch_deprecated_pop_frame_ftype) (void);
1875 extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch);
1876 extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame);
1877 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME)
1878 #error "Non multi-arch definition of DEPRECATED_POP_FRAME"
1880 #if !defined (DEPRECATED_POP_FRAME)
1881 #define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch))
1884 /* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */
1886 #if defined (DEPRECATED_STORE_STRUCT_RETURN)
1887 /* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */
1888 #if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1889 #define DEPRECATED_STORE_STRUCT_RETURN_P() (1)
1893 /* Default predicate for non- multi-arch targets. */
1894 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1895 #define DEPRECATED_STORE_STRUCT_RETURN_P() (0)
1898 extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch);
1899 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1900 #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
1902 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1903 #define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch))
1906 /* Default (function) for non- multi-arch platforms. */
1907 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN)
1908 #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_STORE_STRUCT_RETURN"), 0)
1911 typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
1912 extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
1913 extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return);
1914 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN)
1915 #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
1917 #if !defined (DEPRECATED_STORE_STRUCT_RETURN)
1918 #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
1921 /* Default (function) for non- multi-arch platforms. */
1922 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
1923 #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf))
1926 typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf);
1927 extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf);
1928 extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
1929 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
1930 #error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
1932 #if !defined (EXTRACT_RETURN_VALUE)
1933 #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
1936 /* Default (function) for non- multi-arch platforms. */
1937 #if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
1938 #define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf))
1941 typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf);
1942 extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf);
1943 extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
1944 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
1945 #error "Non multi-arch definition of STORE_RETURN_VALUE"
1947 #if !defined (STORE_RETURN_VALUE)
1948 #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
1951 typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
1952 extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
1953 extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
1954 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1955 #error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
1957 #if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1958 #define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
1961 typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
1962 extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
1963 extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
1964 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
1965 #error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
1967 #if !defined (DEPRECATED_STORE_RETURN_VALUE)
1968 #define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
1971 #if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1972 /* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
1973 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1974 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
1978 /* Default predicate for non- multi-arch targets. */
1979 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1980 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
1983 extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
1984 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1985 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1987 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1988 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
1991 /* Default (function) for non- multi-arch platforms. */
1992 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1993 #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
1996 typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache);
1997 extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
1998 extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
1999 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
2000 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
2002 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
2003 #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
2006 #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
2007 /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
2008 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
2009 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
2013 /* Default predicate for non- multi-arch targets. */
2014 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
2015 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
2018 extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
2019 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
2020 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
2022 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
2023 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
2026 /* Default (function) for non- multi-arch platforms. */
2027 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
2028 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
2031 typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
2032 extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
2033 extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
2034 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
2035 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
2037 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
2038 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
2041 /* Default (function) for non- multi-arch platforms. */
2042 #if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
2043 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type))
2046 typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
2047 extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
2048 extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
2049 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
2050 #error "Non multi-arch definition of USE_STRUCT_CONVENTION"
2052 #if !defined (USE_STRUCT_CONVENTION)
2053 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
2056 #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2057 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */
2058 #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2059 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1)
2063 /* Default predicate for non- multi-arch targets. */
2064 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2065 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (0)
2068 extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch);
2069 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2070 #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
2072 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2073 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch))
2076 /* Default (function) for non- multi-arch platforms. */
2077 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2078 #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_INIT_SAVED_REGS"), 0)
2081 typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame);
2082 extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
2083 extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs);
2084 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2085 #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
2087 #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2088 #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame))
2091 #if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2092 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */
2093 #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2094 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1)
2098 /* Default predicate for non- multi-arch targets. */
2099 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2100 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (0)
2103 extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch);
2104 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2105 #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
2107 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2108 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch))
2111 /* Default (function) for non- multi-arch platforms. */
2112 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2113 #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_EXTRA_FRAME_INFO"), 0)
2116 typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
2117 extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
2118 extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info);
2119 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2120 #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
2122 #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2123 #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame))
2126 typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
2127 extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
2128 extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
2129 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
2130 #error "Non multi-arch definition of SKIP_PROLOGUE"
2132 #if !defined (SKIP_PROLOGUE)
2133 #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
2136 /* Default (function) for non- multi-arch platforms. */
2137 #if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
2138 #define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip))
2141 typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
2142 extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
2143 extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
2144 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
2145 #error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
2147 #if !defined (PROLOGUE_FRAMELESS_P)
2148 #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
2151 typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
2152 extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
2153 extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
2154 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
2155 #error "Non multi-arch definition of INNER_THAN"
2157 #if !defined (INNER_THAN)
2158 #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
2161 typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
2162 extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
2163 extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
2164 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
2165 #error "Non multi-arch definition of BREAKPOINT_FROM_PC"
2167 #if !defined (BREAKPOINT_FROM_PC)
2168 #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
2171 /* Default (function) for non- multi-arch platforms. */
2172 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
2173 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache))
2176 typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
2177 extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
2178 extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
2179 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
2180 #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
2182 #if !defined (MEMORY_INSERT_BREAKPOINT)
2183 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
2186 /* Default (function) for non- multi-arch platforms. */
2187 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
2188 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache))
2191 typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
2192 extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
2193 extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
2194 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
2195 #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
2197 #if !defined (MEMORY_REMOVE_BREAKPOINT)
2198 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
2201 extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
2202 extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
2203 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
2204 #error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
2206 #if !defined (DECR_PC_AFTER_BREAK)
2207 #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
2210 extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
2211 extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
2212 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
2213 #error "Non multi-arch definition of FUNCTION_START_OFFSET"
2215 #if !defined (FUNCTION_START_OFFSET)
2216 #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
2219 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);
2220 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);
2221 extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
2223 extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
2224 extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
2225 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
2226 #error "Non multi-arch definition of FRAME_ARGS_SKIP"
2228 #if !defined (FRAME_ARGS_SKIP)
2229 #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
2232 /* Default (function) for non- multi-arch platforms. */
2233 #if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
2234 #define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi))
2237 typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi);
2238 extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
2239 extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation);
2240 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
2241 #error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
2243 #if !defined (FRAMELESS_FUNCTION_INVOCATION)
2244 #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
2247 #if defined (DEPRECATED_FRAME_CHAIN)
2248 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */
2249 #if !defined (DEPRECATED_FRAME_CHAIN_P)
2250 #define DEPRECATED_FRAME_CHAIN_P() (1)
2254 /* Default predicate for non- multi-arch targets. */
2255 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_P)
2256 #define DEPRECATED_FRAME_CHAIN_P() (0)
2259 extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch);
2260 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P)
2261 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
2263 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P)
2264 #define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch))
2267 /* Default (function) for non- multi-arch platforms. */
2268 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN)
2269 #define DEPRECATED_FRAME_CHAIN(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN"), 0)
2272 typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame);
2273 extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
2274 extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain);
2275 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN)
2276 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
2278 #if !defined (DEPRECATED_FRAME_CHAIN)
2279 #define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame))
2282 #if defined (DEPRECATED_FRAME_CHAIN_VALID)
2283 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */
2284 #if !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2285 #define DEPRECATED_FRAME_CHAIN_VALID_P() (1)
2289 /* Default predicate for non- multi-arch targets. */
2290 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2291 #define DEPRECATED_FRAME_CHAIN_VALID_P() (0)
2294 extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch);
2295 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2296 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
2298 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2299 #define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch))
2302 /* Default (function) for non- multi-arch platforms. */
2303 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID)
2304 #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN_VALID"), 0)
2307 typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
2308 extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
2309 extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid);
2310 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID)
2311 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
2313 #if !defined (DEPRECATED_FRAME_CHAIN_VALID)
2314 #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe))
2317 /* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please
2318 note, per UNWIND_PC's doco, that while the two have similar
2319 interfaces they have very different underlying implementations. */
2321 #if defined (DEPRECATED_FRAME_SAVED_PC)
2322 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */
2323 #if !defined (DEPRECATED_FRAME_SAVED_PC_P)
2324 #define DEPRECATED_FRAME_SAVED_PC_P() (1)
2328 /* Default predicate for non- multi-arch targets. */
2329 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC_P)
2330 #define DEPRECATED_FRAME_SAVED_PC_P() (0)
2333 extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch);
2334 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P)
2335 #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
2337 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P)
2338 #define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch))
2341 /* Default (function) for non- multi-arch platforms. */
2342 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC)
2343 #define DEPRECATED_FRAME_SAVED_PC(fi) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_SAVED_PC"), 0)
2346 typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi);
2347 extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
2348 extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc);
2349 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC)
2350 #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
2352 #if !defined (DEPRECATED_FRAME_SAVED_PC)
2353 #define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi))
2356 extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch);
2358 typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
2359 extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame);
2360 extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc);
2362 extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch);
2364 typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
2365 extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
2366 extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
2368 /* DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
2369 frame-base. Enable frame-base before frame-unwind. */
2371 #if defined (DEPRECATED_FRAME_ARGS_ADDRESS)
2372 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_ARGS_ADDRESS */
2373 #if !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
2374 #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (1)
2378 /* Default predicate for non- multi-arch targets. */
2379 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
2380 #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (0)
2383 extern int gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch);
2384 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
2385 #error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
2387 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
2388 #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (gdbarch_deprecated_frame_args_address_p (current_gdbarch))
2391 /* Default (function) for non- multi-arch platforms. */
2392 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
2393 #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
2396 typedef CORE_ADDR (gdbarch_deprecated_frame_args_address_ftype) (struct frame_info *fi);
2397 extern CORE_ADDR gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
2398 extern void set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address);
2399 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS)
2400 #error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
2402 #if !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
2403 #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (gdbarch_deprecated_frame_args_address (current_gdbarch, fi))
2406 /* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
2407 frame-base. Enable frame-base before frame-unwind. */
2409 #if defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
2410 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_LOCALS_ADDRESS */
2411 #if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
2412 #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (1)
2416 /* Default predicate for non- multi-arch targets. */
2417 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
2418 #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (0)
2421 extern int gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch);
2422 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
2423 #error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
2425 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
2426 #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (gdbarch_deprecated_frame_locals_address_p (current_gdbarch))
2429 /* Default (function) for non- multi-arch platforms. */
2430 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
2431 #define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
2434 typedef CORE_ADDR (gdbarch_deprecated_frame_locals_address_ftype) (struct frame_info *fi);
2435 extern CORE_ADDR gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
2436 extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address);
2437 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
2438 #error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
2440 #if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
2441 #define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (gdbarch_deprecated_frame_locals_address (current_gdbarch, fi))
2444 #if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2445 /* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */
2446 #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2447 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (1)
2451 /* Default predicate for non- multi-arch targets. */
2452 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2453 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (0)
2456 extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch);
2457 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2458 #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
2460 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2461 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch))
2464 /* Default (function) for non- multi-arch platforms. */
2465 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2466 #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVED_PC_AFTER_CALL"), 0)
2469 typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame);
2470 extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
2471 extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call);
2472 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2473 #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
2475 #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2476 #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame))
2479 #if defined (FRAME_NUM_ARGS)
2480 /* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */
2481 #if !defined (FRAME_NUM_ARGS_P)
2482 #define FRAME_NUM_ARGS_P() (1)
2486 /* Default predicate for non- multi-arch targets. */
2487 #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P)
2488 #define FRAME_NUM_ARGS_P() (0)
2491 extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch);
2492 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P)
2493 #error "Non multi-arch definition of FRAME_NUM_ARGS"
2495 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P)
2496 #define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch))
2499 /* Default (function) for non- multi-arch platforms. */
2500 #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS)
2501 #define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0)
2504 typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
2505 extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
2506 extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
2507 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
2508 #error "Non multi-arch definition of FRAME_NUM_ARGS"
2510 #if !defined (FRAME_NUM_ARGS)
2511 #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
2514 #if defined (STACK_ALIGN)
2515 /* Legacy for systems yet to multi-arch STACK_ALIGN */
2516 #if !defined (STACK_ALIGN_P)
2517 #define STACK_ALIGN_P() (1)
2521 /* Default predicate for non- multi-arch targets. */
2522 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P)
2523 #define STACK_ALIGN_P() (0)
2526 extern int gdbarch_stack_align_p (struct gdbarch *gdbarch);
2527 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P)
2528 #error "Non multi-arch definition of STACK_ALIGN"
2530 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P)
2531 #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch))
2534 /* Default (function) for non- multi-arch platforms. */
2535 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN)
2536 #define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0)
2539 typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp);
2540 extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp);
2541 extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align);
2542 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
2543 #error "Non multi-arch definition of STACK_ALIGN"
2545 #if !defined (STACK_ALIGN)
2546 #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
2549 extern int gdbarch_frame_align_p (struct gdbarch *gdbarch);
2551 typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address);
2552 extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address);
2553 extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align);
2555 #if defined (REG_STRUCT_HAS_ADDR)
2556 /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
2557 #if !defined (REG_STRUCT_HAS_ADDR_P)
2558 #define REG_STRUCT_HAS_ADDR_P() (1)
2562 /* Default predicate for non- multi-arch targets. */
2563 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P)
2564 #define REG_STRUCT_HAS_ADDR_P() (0)
2567 extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch);
2568 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P)
2569 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2571 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P)
2572 #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch))
2575 /* Default (function) for non- multi-arch platforms. */
2576 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR)
2577 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0)
2580 typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
2581 extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
2582 extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr);
2583 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
2584 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2586 #if !defined (REG_STRUCT_HAS_ADDR)
2587 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
2590 extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
2591 extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
2592 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
2593 #error "Non multi-arch definition of PARM_BOUNDARY"
2595 #if !defined (PARM_BOUNDARY)
2596 #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
2599 /* Default (value) for non- multi-arch platforms. */
2600 #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
2601 #define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch))
2604 extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
2605 extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
2606 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
2607 #error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
2609 #if !defined (TARGET_FLOAT_FORMAT)
2610 #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
2613 /* Default (value) for non- multi-arch platforms. */
2614 #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
2615 #define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2618 extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
2619 extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
2620 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
2621 #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
2623 #if !defined (TARGET_DOUBLE_FORMAT)
2624 #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
2627 /* Default (value) for non- multi-arch platforms. */
2628 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
2629 #define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2632 extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
2633 extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
2634 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
2635 #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
2637 #if !defined (TARGET_LONG_DOUBLE_FORMAT)
2638 #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
2641 /* Default (function) for non- multi-arch platforms. */
2642 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2643 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr))
2646 typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr);
2647 extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr);
2648 extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr);
2649 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
2650 #error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
2652 #if !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2653 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
2656 /* On some machines there are bits in addresses which are not really
2657 part of the address, but are used by the kernel, the hardware, etc.
2658 for special purposes. ADDR_BITS_REMOVE takes out any such bits so
2659 we get a "real" address such as one would find in a symbol table.
2660 This is used only for addresses of instructions, and even then I'm
2661 not sure it's used in all contexts. It exists to deal with there
2662 being a few stray bits in the PC which would mislead us, not as some
2663 sort of generic thing to handle alignment or segmentation (it's
2664 possible it should be in TARGET_READ_PC instead). */
2666 /* Default (function) for non- multi-arch platforms. */
2667 #if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE)
2668 #define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr))
2671 typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
2672 extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
2673 extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
2674 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
2675 #error "Non multi-arch definition of ADDR_BITS_REMOVE"
2677 #if !defined (ADDR_BITS_REMOVE)
2678 #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
2681 /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
2682 ADDR_BITS_REMOVE. */
2684 /* Default (function) for non- multi-arch platforms. */
2685 #if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS)
2686 #define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr))
2689 typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
2690 extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
2691 extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
2692 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
2693 #error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
2695 #if !defined (SMASH_TEXT_ADDRESS)
2696 #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
2699 /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
2700 the target needs software single step. An ISA method to implement it.
2702 FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
2703 using the breakpoint system instead of blatting memory directly (as with rs6000).
2705 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
2706 single step. If not, then implement single step using breakpoints. */
2708 #if defined (SOFTWARE_SINGLE_STEP)
2709 /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
2710 #if !defined (SOFTWARE_SINGLE_STEP_P)
2711 #define SOFTWARE_SINGLE_STEP_P() (1)
2715 /* Default predicate for non- multi-arch targets. */
2716 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P)
2717 #define SOFTWARE_SINGLE_STEP_P() (0)
2720 extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
2721 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
2722 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2724 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
2725 #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
2728 /* Default (function) for non- multi-arch platforms. */
2729 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP)
2730 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
2733 typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
2734 extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
2735 extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
2736 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
2737 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2739 #if !defined (SOFTWARE_SINGLE_STEP)
2740 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
2743 /* Default (function) for non- multi-arch platforms. */
2744 #if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
2745 #define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info))
2748 typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info);
2749 extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info);
2750 extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
2751 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
2752 #error "Non multi-arch definition of TARGET_PRINT_INSN"
2754 #if !defined (TARGET_PRINT_INSN)
2755 #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
2758 /* Default (function) for non- multi-arch platforms. */
2759 #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
2760 #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc))
2763 typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc);
2764 extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc);
2765 extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
2766 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
2767 #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
2769 #if !defined (SKIP_TRAMPOLINE_CODE)
2770 #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
2773 /* For SVR4 shared libraries, each call goes through a small piece of
2774 trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
2775 to nonzero if we are currently stopped in one of these. */
2777 /* Default (function) for non- multi-arch platforms. */
2778 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
2779 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name))
2782 typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name);
2783 extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2784 extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline);
2785 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
2786 #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
2788 #if !defined (IN_SOLIB_CALL_TRAMPOLINE)
2789 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
2792 /* Some systems also have trampoline code for returning from shared libs. */
2794 /* Default (function) for non- multi-arch platforms. */
2795 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2796 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name))
2799 typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
2800 extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2801 extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
2802 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
2803 #error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
2805 #if !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2806 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
2809 /* Sigtramp is a routine that the kernel calls (which then calls the
2810 signal handler). On most machines it is a library routine that is
2811 linked into the executable.
2813 This macro, given a program counter value and the name of the
2814 function in which that PC resides (which can be null if the name is
2815 not known), returns nonzero if the PC and name show that we are in
2818 On most machines just see if the name is sigtramp (and if we have
2819 no name, assume we are not in sigtramp).
2821 FIXME: cagney/2002-04-21: The function find_pc_partial_function
2822 calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
2823 This means PC_IN_SIGTRAMP function can't be implemented by doing its
2824 own local NAME lookup.
2826 FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
2827 Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
2830 /* Default (function) for non- multi-arch platforms. */
2831 #if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP)
2832 #define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name))
2835 typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
2836 extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2837 extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
2838 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
2839 #error "Non multi-arch definition of PC_IN_SIGTRAMP"
2841 #if !defined (PC_IN_SIGTRAMP)
2842 #define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
2845 #if defined (SIGTRAMP_START)
2846 /* Legacy for systems yet to multi-arch SIGTRAMP_START */
2847 #if !defined (SIGTRAMP_START_P)
2848 #define SIGTRAMP_START_P() (1)
2852 /* Default predicate for non- multi-arch targets. */
2853 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START_P)
2854 #define SIGTRAMP_START_P() (0)
2857 extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch);
2858 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P)
2859 #error "Non multi-arch definition of SIGTRAMP_START"
2861 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P)
2862 #define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch))
2865 /* Default (function) for non- multi-arch platforms. */
2866 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START)
2867 #define SIGTRAMP_START(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_START"), 0)
2870 typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc);
2871 extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc);
2872 extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start);
2873 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START)
2874 #error "Non multi-arch definition of SIGTRAMP_START"
2876 #if !defined (SIGTRAMP_START)
2877 #define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc))
2880 #if defined (SIGTRAMP_END)
2881 /* Legacy for systems yet to multi-arch SIGTRAMP_END */
2882 #if !defined (SIGTRAMP_END_P)
2883 #define SIGTRAMP_END_P() (1)
2887 /* Default predicate for non- multi-arch targets. */
2888 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END_P)
2889 #define SIGTRAMP_END_P() (0)
2892 extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch);
2893 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P)
2894 #error "Non multi-arch definition of SIGTRAMP_END"
2896 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P)
2897 #define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch))
2900 /* Default (function) for non- multi-arch platforms. */
2901 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END)
2902 #define SIGTRAMP_END(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_END"), 0)
2905 typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc);
2906 extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc);
2907 extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end);
2908 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END)
2909 #error "Non multi-arch definition of SIGTRAMP_END"
2911 #if !defined (SIGTRAMP_END)
2912 #define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc))
2915 /* A target might have problems with watchpoints as soon as the stack
2916 frame of the current function has been destroyed. This mostly happens
2917 as the first action in a funtion's epilogue. in_function_epilogue_p()
2918 is defined to return a non-zero value if either the given addr is one
2919 instruction after the stack destroying instruction up to the trailing
2920 return instruction or if we can figure out that the stack frame has
2921 already been invalidated regardless of the value of addr. Targets
2922 which don't suffer from that problem could just let this functionality
2925 typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
2926 extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
2927 extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
2929 /* Given a vector of command-line arguments, return a newly allocated
2930 string which, when passed to the create_inferior function, will be
2931 parsed (on Unix systems, by the shell) to yield the same vector.
2932 This function should call error() if the argument vector is not
2933 representable for this target or if this target does not support
2934 command-line arguments.
2935 ARGC is the number of elements in the vector.
2936 ARGV is an array of strings, one per argument. */
2938 typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv);
2939 extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv);
2940 extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments);
2942 /* Default (function) for non- multi-arch platforms. */
2943 #if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2944 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym))
2947 typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym);
2948 extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym);
2949 extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special);
2950 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
2951 #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
2953 #if !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2954 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
2957 /* Default (function) for non- multi-arch platforms. */
2958 #if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2959 #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym))
2962 typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym);
2963 extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
2964 extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
2965 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
2966 #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
2968 #if !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2969 #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
2972 /* Default (value) for non- multi-arch platforms. */
2973 #if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC)
2974 #define NAME_OF_MALLOC ("malloc")
2977 extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch);
2978 extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc);
2979 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
2980 #error "Non multi-arch definition of NAME_OF_MALLOC"
2982 #if !defined (NAME_OF_MALLOC)
2983 #define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch))
2986 /* Default (value) for non- multi-arch platforms. */
2987 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
2988 #define CANNOT_STEP_BREAKPOINT (0)
2991 extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
2992 extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
2993 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
2994 #error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
2996 #if !defined (CANNOT_STEP_BREAKPOINT)
2997 #define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
3000 /* Default (value) for non- multi-arch platforms. */
3001 #if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
3002 #define HAVE_NONSTEPPABLE_WATCHPOINT (0)
3005 extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
3006 extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
3007 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
3008 #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
3010 #if !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
3011 #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
3014 #if defined (ADDRESS_CLASS_TYPE_FLAGS)
3015 /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
3016 #if !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3017 #define ADDRESS_CLASS_TYPE_FLAGS_P() (1)
3021 /* Default predicate for non- multi-arch targets. */
3022 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3023 #define ADDRESS_CLASS_TYPE_FLAGS_P() (0)
3026 extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch);
3027 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3028 #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
3030 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3031 #define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch))
3034 /* Default (function) for non- multi-arch platforms. */
3035 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS)
3036 #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0)
3039 typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class);
3040 extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class);
3041 extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags);
3042 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
3043 #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
3045 #if !defined (ADDRESS_CLASS_TYPE_FLAGS)
3046 #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
3049 extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
3051 typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
3052 extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
3053 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);
3055 extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);
3057 typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
3058 extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
3059 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);
3061 /* Is a register in a group */
3063 typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
3064 extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
3065 extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
3067 /* Fetch the pointer to the ith function argument. */
3069 #if defined (FETCH_POINTER_ARGUMENT)
3070 /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */
3071 #if !defined (FETCH_POINTER_ARGUMENT_P)
3072 #define FETCH_POINTER_ARGUMENT_P() (1)
3076 /* Default predicate for non- multi-arch targets. */
3077 #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P)
3078 #define FETCH_POINTER_ARGUMENT_P() (0)
3081 extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch);
3082 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P)
3083 #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
3085 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P)
3086 #define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch))
3089 /* Default (function) for non- multi-arch platforms. */
3090 #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT)
3091 #define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0)
3094 typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type);
3095 extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type);
3096 extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument);
3097 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT)
3098 #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
3100 #if !defined (FETCH_POINTER_ARGUMENT)
3101 #define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type))
3104 extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
3107 /* Mechanism for co-ordinating the selection of a specific
3110 GDB targets (*-tdep.c) can register an interest in a specific
3111 architecture. Other GDB components can register a need to maintain
3112 per-architecture data.
3114 The mechanisms below ensures that there is only a loose connection
3115 between the set-architecture command and the various GDB
3116 components. Each component can independently register their need
3117 to maintain architecture specific data with gdbarch.
3121 Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It
3124 The more traditional mega-struct containing architecture specific
3125 data for all the various GDB components was also considered. Since
3126 GDB is built from a variable number of (fairly independent)
3127 components it was determined that the global aproach was not
3131 /* Register a new architectural family with GDB.
3133 Register support for the specified ARCHITECTURE with GDB. When
3134 gdbarch determines that the specified architecture has been
3135 selected, the corresponding INIT function is called.
3139 The INIT function takes two parameters: INFO which contains the
3140 information available to gdbarch about the (possibly new)
3141 architecture; ARCHES which is a list of the previously created
3142 ``struct gdbarch'' for this architecture.
3144 The INFO parameter is, as far as possible, be pre-initialized with
3145 information obtained from INFO.ABFD or the previously selected
3148 The ARCHES parameter is a linked list (sorted most recently used)
3149 of all the previously created architures for this architecture
3150 family. The (possibly NULL) ARCHES->gdbarch can used to access
3151 values from the previously selected architecture for this
3152 architecture family. The global ``current_gdbarch'' shall not be
3155 The INIT function shall return any of: NULL - indicating that it
3156 doesn't recognize the selected architecture; an existing ``struct
3157 gdbarch'' from the ARCHES list - indicating that the new
3158 architecture is just a synonym for an earlier architecture (see
3159 gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch''
3160 - that describes the selected architecture (see gdbarch_alloc()).
3162 The DUMP_TDEP function shall print out all target specific values.
3163 Care should be taken to ensure that the function works in both the
3164 multi-arch and non- multi-arch cases. */
3168 struct gdbarch *gdbarch;
3169 struct gdbarch_list *next;
3174 /* Use default: NULL (ZERO). */
3175 const struct bfd_arch_info *bfd_arch_info;
3177 /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */
3180 /* Use default: NULL (ZERO). */
3183 /* Use default: NULL (ZERO). */
3184 struct gdbarch_tdep_info *tdep_info;
3186 /* Use default: GDB_OSABI_UNINITIALIZED (-1). */
3187 enum gdb_osabi osabi;
3190 typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
3191 typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file);
3193 /* DEPRECATED - use gdbarch_register() */
3194 extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *);
3196 extern void gdbarch_register (enum bfd_architecture architecture,
3197 gdbarch_init_ftype *,
3198 gdbarch_dump_tdep_ftype *);
3201 /* Return a freshly allocated, NULL terminated, array of the valid
3202 architecture names. Since architectures are registered during the
3203 _initialize phase this function only returns useful information
3204 once initialization has been completed. */
3206 extern const char **gdbarch_printable_names (void);
3209 /* Helper function. Search the list of ARCHES for a GDBARCH that
3210 matches the information provided by INFO. */
3212 extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info);
3215 /* Helper function. Create a preliminary ``struct gdbarch''. Perform
3216 basic initialization using values obtained from the INFO andTDEP
3217 parameters. set_gdbarch_*() functions are called to complete the
3218 initialization of the object. */
3220 extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
3223 /* Helper function. Free a partially-constructed ``struct gdbarch''.
3224 It is assumed that the caller freeds the ``struct
3227 extern void gdbarch_free (struct gdbarch *);
3230 /* Helper function. Allocate memory from the ``struct gdbarch''
3231 obstack. The memory is freed when the corresponding architecture
3234 extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size);
3235 #define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), (NR) * sizeof (TYPE)))
3236 #define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), sizeof (TYPE)))
3239 /* Helper function. Force an update of the current architecture.
3241 The actual architecture selected is determined by INFO, ``(gdb) set
3242 architecture'' et.al., the existing architecture and BFD's default
3243 architecture. INFO should be initialized to zero and then selected
3244 fields should be updated.
3246 Returns non-zero if the update succeeds */
3248 extern int gdbarch_update_p (struct gdbarch_info info);
3252 /* Register per-architecture data-pointer.
3254 Reserve space for a per-architecture data-pointer. An identifier
3255 for the reserved data-pointer is returned. That identifer should
3256 be saved in a local static variable.
3258 The per-architecture data-pointer is either initialized explicitly
3259 (set_gdbarch_data()) or implicitly (by INIT() via a call to
3260 gdbarch_data()). FREE() is ignored.
3262 When a previously created architecture is re-selected, the
3263 per-architecture data-pointer for that previous architecture is
3264 restored. INIT() is not re-called.
3266 Multiple registrarants for any architecture are allowed (and
3267 strongly encouraged). */
3269 struct gdbarch_data;
3271 typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
3272 typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
3274 extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
3275 gdbarch_data_free_ftype *free);
3276 extern void set_gdbarch_data (struct gdbarch *gdbarch,
3277 struct gdbarch_data *data,
3280 extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
3283 /* Register per-architecture memory region.
3285 Provide a memory-region swap mechanism. Per-architecture memory
3286 region are created. These memory regions are swapped whenever the
3287 architecture is changed. For a new architecture, the memory region
3288 is initialized with zero (0) and the INIT function is called.
3290 Memory regions are swapped / initialized in the order that they are
3291 registered. NULL DATA and/or INIT values can be specified.
3293 New code should use register_gdbarch_data(). */
3295 typedef void (gdbarch_swap_ftype) (void);
3296 extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init);
3297 #define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
3301 /* The target-system-dependent byte order is dynamic */
3303 extern int target_byte_order;
3304 #ifndef TARGET_BYTE_ORDER
3305 #define TARGET_BYTE_ORDER (target_byte_order + 0)
3308 extern int target_byte_order_auto;
3309 #ifndef TARGET_BYTE_ORDER_AUTO
3310 #define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
3315 /* The target-system-dependent BFD architecture is dynamic */
3317 extern int target_architecture_auto;
3318 #ifndef TARGET_ARCHITECTURE_AUTO
3319 #define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
3322 extern const struct bfd_arch_info *target_architecture;
3323 #ifndef TARGET_ARCHITECTURE
3324 #define TARGET_ARCHITECTURE (target_architecture + 0)
3328 /* The target-system-dependent disassembler is semi-dynamic */
3330 /* Use gdb_disassemble, and gdbarch_print_insn instead. */
3331 extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*);
3333 /* Use set_gdbarch_print_insn instead. */
3334 extern disassemble_info deprecated_tm_print_insn_info;
3336 /* Set the dynamic target-system-dependent parameters (architecture,
3337 byte-order, ...) using information found in the BFD */
3339 extern void set_gdbarch_from_file (bfd *);
3342 /* Initialize the current architecture to the "first" one we find on
3345 extern void initialize_current_architecture (void);
3347 /* For non-multiarched targets, do any initialization of the default
3348 gdbarch object necessary after the _initialize_MODULE functions
3350 extern void initialize_non_multiarch (void);
3352 /* gdbarch trace variable */
3353 extern int gdbarch_debug;
3355 extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file);