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 /* Default (function) for non- multi-arch platforms. */
593 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
594 #define REGISTER_NAME(regnr) (legacy_register_name (regnr))
597 typedef const char * (gdbarch_register_name_ftype) (int regnr);
598 extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
599 extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
600 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
601 #error "Non multi-arch definition of REGISTER_NAME"
603 #if !defined (REGISTER_NAME)
604 #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
607 /* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
609 extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
611 typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr);
612 extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
613 extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
615 /* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
617 #if defined (REGISTER_VIRTUAL_TYPE)
618 /* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
619 #if !defined (REGISTER_VIRTUAL_TYPE_P)
620 #define REGISTER_VIRTUAL_TYPE_P() (1)
624 /* Default predicate for non- multi-arch targets. */
625 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P)
626 #define REGISTER_VIRTUAL_TYPE_P() (0)
629 extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch);
630 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P)
631 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
633 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P)
634 #define REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch))
637 /* Default (function) for non- multi-arch platforms. */
638 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE)
639 #define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0)
642 typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr);
643 extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
644 extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type);
645 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
646 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
648 #if !defined (REGISTER_VIRTUAL_TYPE)
649 #define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr))
652 /* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
653 from REGISTER_TYPE. */
655 extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch);
656 extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes);
657 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES)
658 #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES"
660 #if !defined (DEPRECATED_REGISTER_BYTES)
661 #define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
664 /* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
665 register offsets computed using just REGISTER_TYPE, this can be
666 deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
667 function with predicate has a valid (callable) initial value. As a
668 consequence, even when the predicate is false, the corresponding
669 function works. This simplifies the migration process - old code,
670 calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
672 #if defined (REGISTER_BYTE)
673 /* Legacy for systems yet to multi-arch REGISTER_BYTE */
674 #if !defined (REGISTER_BYTE_P)
675 #define REGISTER_BYTE_P() (1)
679 /* Default predicate for non- multi-arch targets. */
680 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE_P)
681 #define REGISTER_BYTE_P() (0)
684 extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
685 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P)
686 #error "Non multi-arch definition of REGISTER_BYTE"
688 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P)
689 #define REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
692 /* Default (function) for non- multi-arch platforms. */
693 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE)
694 #define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
697 typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr);
698 extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr);
699 extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte);
700 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
701 #error "Non multi-arch definition of REGISTER_BYTE"
703 #if !defined (REGISTER_BYTE)
704 #define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
707 /* If all registers have identical raw and virtual sizes and those
708 sizes agree with the value computed from REGISTER_TYPE,
709 DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
712 #if defined (REGISTER_RAW_SIZE)
713 /* Legacy for systems yet to multi-arch REGISTER_RAW_SIZE */
714 #if !defined (REGISTER_RAW_SIZE_P)
715 #define REGISTER_RAW_SIZE_P() (1)
719 /* Default predicate for non- multi-arch targets. */
720 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE_P)
721 #define REGISTER_RAW_SIZE_P() (0)
724 extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch);
725 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE_P)
726 #error "Non multi-arch definition of REGISTER_RAW_SIZE"
728 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE_P)
729 #define REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch))
732 /* Default (function) for non- multi-arch platforms. */
733 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
734 #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
737 typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr);
738 extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
739 extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size);
740 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
741 #error "Non multi-arch definition of REGISTER_RAW_SIZE"
743 #if !defined (REGISTER_RAW_SIZE)
744 #define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
747 /* If all registers have identical raw and virtual sizes and those
748 sizes agree with the value computed from REGISTER_TYPE,
749 DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
752 #if defined (REGISTER_VIRTUAL_SIZE)
753 /* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_SIZE */
754 #if !defined (REGISTER_VIRTUAL_SIZE_P)
755 #define REGISTER_VIRTUAL_SIZE_P() (1)
759 /* Default predicate for non- multi-arch targets. */
760 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE_P)
761 #define REGISTER_VIRTUAL_SIZE_P() (0)
764 extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch);
765 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE_P)
766 #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
768 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE_P)
769 #define REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch))
772 /* Default (function) for non- multi-arch platforms. */
773 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
774 #define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
777 typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr);
778 extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
779 extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size);
780 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
781 #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
783 #if !defined (REGISTER_VIRTUAL_SIZE)
784 #define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr))
787 /* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
788 replaced by the constant MAX_REGISTER_SIZE. */
790 #if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
791 /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */
792 #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
793 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1)
797 /* Default predicate for non- multi-arch targets. */
798 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
799 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (0)
802 extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch);
803 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
804 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
806 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
807 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch))
810 /* Default (value) for non- multi-arch platforms. */
811 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
812 #define DEPRECATED_MAX_REGISTER_RAW_SIZE (0)
815 extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch);
816 extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size);
817 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
818 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
820 #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
821 #define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch))
824 /* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been
825 replaced by the constant MAX_REGISTER_SIZE. */
827 #if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
828 /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */
829 #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
830 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1)
834 /* Default predicate for non- multi-arch targets. */
835 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
836 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (0)
839 extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch);
840 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
841 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
843 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
844 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch))
847 /* Default (value) for non- multi-arch platforms. */
848 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
849 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (0)
852 extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch);
853 extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size);
854 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
855 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
857 #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
858 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
861 /* See gdbint.texinfo, and PUSH_DUMMY_CALL. */
863 extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
865 typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info);
866 extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info);
867 extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
869 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
870 SAVE_DUMMY_FRAME_TOS. */
872 #if defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
873 /* Legacy for systems yet to multi-arch DEPRECATED_SAVE_DUMMY_FRAME_TOS */
874 #if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
875 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (1)
879 /* Default predicate for non- multi-arch targets. */
880 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
881 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (0)
884 extern int gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
885 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
886 #error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS"
888 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
889 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (gdbarch_deprecated_save_dummy_frame_tos_p (current_gdbarch))
892 /* Default (function) for non- multi-arch platforms. */
893 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
894 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVE_DUMMY_FRAME_TOS"), 0)
897 typedef void (gdbarch_deprecated_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
898 extern void gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
899 extern void set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos);
900 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
901 #error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS"
903 #if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
904 #define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_deprecated_save_dummy_frame_tos (current_gdbarch, sp))
907 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
908 DEPRECATED_FP_REGNUM. */
910 /* Default (value) for non- multi-arch platforms. */
911 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM)
912 #define DEPRECATED_FP_REGNUM (-1)
915 extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
916 extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
917 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
918 #error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
920 #if !defined (DEPRECATED_FP_REGNUM)
921 #define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
924 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
925 DEPRECATED_TARGET_READ_FP. */
927 #if defined (DEPRECATED_TARGET_READ_FP)
928 /* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
929 #if !defined (DEPRECATED_TARGET_READ_FP_P)
930 #define DEPRECATED_TARGET_READ_FP_P() (1)
934 /* Default predicate for non- multi-arch targets. */
935 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P)
936 #define DEPRECATED_TARGET_READ_FP_P() (0)
939 extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
940 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
941 #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
943 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
944 #define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
947 /* Default (function) for non- multi-arch platforms. */
948 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP)
949 #define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0)
952 typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
953 extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
954 extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
955 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP)
956 #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
958 #if !defined (DEPRECATED_TARGET_READ_FP)
959 #define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
962 /* See gdbint.texinfo. See infcall.c. New, all singing all dancing,
963 replacement for DEPRECATED_PUSH_ARGUMENTS. */
965 extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
967 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);
968 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);
969 extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
971 /* PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS. */
973 #if defined (DEPRECATED_PUSH_ARGUMENTS)
974 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */
975 #if !defined (DEPRECATED_PUSH_ARGUMENTS_P)
976 #define DEPRECATED_PUSH_ARGUMENTS_P() (1)
980 /* Default predicate for non- multi-arch targets. */
981 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P)
982 #define DEPRECATED_PUSH_ARGUMENTS_P() (0)
985 extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch);
986 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
987 #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
989 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P)
990 #define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch))
993 /* Default (function) for non- multi-arch platforms. */
994 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS)
995 #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0)
998 typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
999 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);
1000 extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments);
1001 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
1002 #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
1004 #if !defined (DEPRECATED_PUSH_ARGUMENTS)
1005 #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
1008 /* DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true. */
1010 /* Default (value) for non- multi-arch platforms. */
1011 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1012 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (1)
1015 extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch);
1016 extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames);
1017 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1018 #error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES"
1020 #if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1021 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch))
1024 /* Implement PUSH_RETURN_ADDRESS, and then merge in
1025 DEPRECATED_PUSH_RETURN_ADDRESS. */
1027 #if defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1028 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */
1029 #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1030 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1)
1034 /* Default predicate for non- multi-arch targets. */
1035 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1036 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0)
1039 extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch);
1040 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1041 #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
1043 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1044 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch))
1047 /* Default (function) for non- multi-arch platforms. */
1048 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1049 #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0)
1052 typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
1053 extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
1054 extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address);
1055 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1056 #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
1058 #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1059 #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
1062 /* Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP. */
1064 #if defined (DEPRECATED_DUMMY_WRITE_SP)
1065 /* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
1066 #if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
1067 #define DEPRECATED_DUMMY_WRITE_SP_P() (1)
1071 /* Default predicate for non- multi-arch targets. */
1072 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P)
1073 #define DEPRECATED_DUMMY_WRITE_SP_P() (0)
1076 extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
1077 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
1078 #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
1080 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
1081 #define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
1084 /* Default (function) for non- multi-arch platforms. */
1085 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP)
1086 #define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0)
1089 typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
1090 extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
1091 extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
1092 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP)
1093 #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
1095 #if !defined (DEPRECATED_DUMMY_WRITE_SP)
1096 #define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
1099 /* DEPRECATED_REGISTER_SIZE can be deleted. */
1101 extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch);
1102 extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size);
1103 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE)
1104 #error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE"
1106 #if !defined (DEPRECATED_REGISTER_SIZE)
1107 #define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch))
1110 /* Default (value) for non- multi-arch platforms. */
1111 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_LOCATION)
1112 #define CALL_DUMMY_LOCATION (AT_ENTRY_POINT)
1115 extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
1116 extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
1117 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
1118 #error "Non multi-arch definition of CALL_DUMMY_LOCATION"
1120 #if !defined (CALL_DUMMY_LOCATION)
1121 #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
1124 /* Default (function) for non- multi-arch platforms. */
1125 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS)
1126 #define CALL_DUMMY_ADDRESS() (entry_point_address ())
1129 typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
1130 extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
1131 extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
1132 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
1133 #error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
1135 #if !defined (CALL_DUMMY_ADDRESS)
1136 #define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
1139 /* DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted. */
1141 extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch);
1142 extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset);
1143 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
1144 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET"
1146 #if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
1147 #define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch))
1150 /* DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted. */
1152 extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
1153 extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset);
1154 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
1155 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET"
1157 #if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
1158 #define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch))
1161 /* DEPRECATED_CALL_DUMMY_LENGTH can be deleted. */
1163 extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch);
1164 extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length);
1165 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH)
1166 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH"
1168 #if !defined (DEPRECATED_CALL_DUMMY_LENGTH)
1169 #define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch))
1172 /* DEPRECATED_CALL_DUMMY_WORDS can be deleted. */
1174 /* Default (value) for non- multi-arch platforms. */
1175 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_WORDS)
1176 #define DEPRECATED_CALL_DUMMY_WORDS (legacy_call_dummy_words)
1179 extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch);
1180 extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words);
1181 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS)
1182 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS"
1184 #if !defined (DEPRECATED_CALL_DUMMY_WORDS)
1185 #define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch))
1188 /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS. */
1190 /* Default (value) for non- multi-arch platforms. */
1191 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1192 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words)
1195 extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch);
1196 extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words);
1197 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1198 #error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS"
1200 #if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1201 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch))
1204 /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_CALL_DUMMY_STACK_ADJUST. */
1206 #if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1207 /* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_STACK_ADJUST */
1208 #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1209 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (1)
1213 /* Default predicate for non- multi-arch targets. */
1214 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1215 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (0)
1218 extern int gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch);
1219 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1220 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
1222 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1223 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (gdbarch_deprecated_call_dummy_stack_adjust_p (current_gdbarch))
1226 /* Default (value) for non- multi-arch platforms. */
1227 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1228 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (0)
1231 extern int gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch);
1232 extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch, int deprecated_call_dummy_stack_adjust);
1233 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1234 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
1236 #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1237 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (gdbarch_deprecated_call_dummy_stack_adjust (current_gdbarch))
1240 /* DEPRECATED_FIX_CALL_DUMMY can be deleted. For the SPARC, implement
1241 PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK. */
1243 #if defined (DEPRECATED_FIX_CALL_DUMMY)
1244 /* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */
1245 #if !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1246 #define DEPRECATED_FIX_CALL_DUMMY_P() (1)
1250 /* Default predicate for non- multi-arch targets. */
1251 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1252 #define DEPRECATED_FIX_CALL_DUMMY_P() (0)
1255 extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch);
1256 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P)
1257 #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
1259 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1260 #define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch))
1263 /* Default (function) for non- multi-arch platforms. */
1264 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY)
1265 #define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "DEPRECATED_FIX_CALL_DUMMY"), 0)
1268 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);
1269 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);
1270 extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy);
1271 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY)
1272 #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
1274 #if !defined (DEPRECATED_FIX_CALL_DUMMY)
1275 #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))
1278 /* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */
1280 extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
1282 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);
1283 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);
1284 extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
1286 /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME. */
1288 #if defined (DEPRECATED_PUSH_DUMMY_FRAME)
1289 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
1290 #if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1291 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
1295 /* Default predicate for non- multi-arch targets. */
1296 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1297 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (0)
1300 extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
1301 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1302 #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
1304 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1305 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
1308 /* Default (function) for non- multi-arch platforms. */
1309 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME)
1310 #define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0)
1313 typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
1314 extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
1315 extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
1316 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME)
1317 #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
1319 #if !defined (DEPRECATED_PUSH_DUMMY_FRAME)
1320 #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
1323 /* Implement PUSH_DUMMY_CALL, then delete
1324 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED. */
1326 /* Default (value) for non- multi-arch platforms. */
1327 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
1328 #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (0)
1331 extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch);
1332 extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed);
1333 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
1334 #error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED"
1336 #if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
1337 #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch))
1340 #if defined (DEPRECATED_DO_REGISTERS_INFO)
1341 /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
1342 #if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
1343 #define DEPRECATED_DO_REGISTERS_INFO_P() (1)
1347 /* Default predicate for non- multi-arch targets. */
1348 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
1349 #define DEPRECATED_DO_REGISTERS_INFO_P() (0)
1352 extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
1353 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
1354 #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
1356 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
1357 #define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
1360 /* Default (function) for non- multi-arch platforms. */
1361 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO)
1362 #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0)
1365 typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
1366 extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
1367 extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
1368 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO)
1369 #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
1371 #if !defined (DEPRECATED_DO_REGISTERS_INFO)
1372 #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
1375 typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
1376 extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
1377 extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
1379 extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
1381 typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1382 extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1383 extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
1385 extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
1387 typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1388 extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1389 extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
1391 /* MAP a GDB RAW register number onto a simulator register number. See
1392 also include/...-sim.h. */
1394 /* Default (function) for non- multi-arch platforms. */
1395 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
1396 #define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
1399 typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
1400 extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
1401 extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
1402 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
1403 #error "Non multi-arch definition of REGISTER_SIM_REGNO"
1405 #if !defined (REGISTER_SIM_REGNO)
1406 #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
1409 #if defined (REGISTER_BYTES_OK)
1410 /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
1411 #if !defined (REGISTER_BYTES_OK_P)
1412 #define REGISTER_BYTES_OK_P() (1)
1416 /* Default predicate for non- multi-arch targets. */
1417 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
1418 #define REGISTER_BYTES_OK_P() (0)
1421 extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
1422 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
1423 #error "Non multi-arch definition of REGISTER_BYTES_OK"
1425 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
1426 #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
1429 /* Default (function) for non- multi-arch platforms. */
1430 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
1431 #define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
1434 typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
1435 extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
1436 extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
1437 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
1438 #error "Non multi-arch definition of REGISTER_BYTES_OK"
1440 #if !defined (REGISTER_BYTES_OK)
1441 #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
1444 /* Default (function) for non- multi-arch platforms. */
1445 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
1446 #define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
1449 typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
1450 extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
1451 extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
1452 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
1453 #error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
1455 #if !defined (CANNOT_FETCH_REGISTER)
1456 #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
1459 /* Default (function) for non- multi-arch platforms. */
1460 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
1461 #define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
1464 typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
1465 extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
1466 extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
1467 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
1468 #error "Non multi-arch definition of CANNOT_STORE_REGISTER"
1470 #if !defined (CANNOT_STORE_REGISTER)
1471 #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
1474 /* setjmp/longjmp support. */
1476 #if defined (GET_LONGJMP_TARGET)
1477 /* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */
1478 #if !defined (GET_LONGJMP_TARGET_P)
1479 #define GET_LONGJMP_TARGET_P() (1)
1483 /* Default predicate for non- multi-arch targets. */
1484 #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P)
1485 #define GET_LONGJMP_TARGET_P() (0)
1488 extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
1489 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
1490 #error "Non multi-arch definition of GET_LONGJMP_TARGET"
1492 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
1493 #define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
1496 /* Default (function) for non- multi-arch platforms. */
1497 #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET)
1498 #define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0)
1501 typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
1502 extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
1503 extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
1504 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
1505 #error "Non multi-arch definition of GET_LONGJMP_TARGET"
1507 #if !defined (GET_LONGJMP_TARGET)
1508 #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
1511 /* NOTE: cagney/2002-11-24: This function with predicate has a valid
1512 (callable) initial value. As a consequence, even when the predicate
1513 is false, the corresponding function works. This simplifies the
1514 migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
1515 doesn't need to be modified. */
1517 #if defined (DEPRECATED_PC_IN_CALL_DUMMY)
1518 /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
1519 #if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1520 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
1524 /* Default predicate for non- multi-arch targets. */
1525 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1526 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (0)
1529 extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
1530 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1531 #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1533 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1534 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
1537 /* Default (function) for non- multi-arch platforms. */
1538 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1539 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
1542 typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1543 extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1544 extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
1545 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY)
1546 #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1548 #if !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1549 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
1552 #if defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1553 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */
1554 #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1555 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1)
1559 /* Default predicate for non- multi-arch targets. */
1560 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1561 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (0)
1564 extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch);
1565 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1566 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1568 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1569 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch))
1572 /* Default (function) for non- multi-arch platforms. */
1573 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1574 #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC_FIRST"), 0)
1577 typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
1578 extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1579 extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first);
1580 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1581 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1583 #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1584 #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev))
1587 #if defined (DEPRECATED_INIT_FRAME_PC)
1588 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
1589 #if !defined (DEPRECATED_INIT_FRAME_PC_P)
1590 #define DEPRECATED_INIT_FRAME_PC_P() (1)
1594 /* Default predicate for non- multi-arch targets. */
1595 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_P)
1596 #define DEPRECATED_INIT_FRAME_PC_P() (0)
1599 extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch);
1600 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P)
1601 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1603 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P)
1604 #define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch))
1607 /* Default (function) for non- multi-arch platforms. */
1608 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC)
1609 #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC"), 0)
1612 typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev);
1613 extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1614 extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc);
1615 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC)
1616 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1618 #if !defined (DEPRECATED_INIT_FRAME_PC)
1619 #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev))
1622 extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
1623 extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
1624 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
1625 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
1627 #if !defined (BELIEVE_PCC_PROMOTION)
1628 #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
1631 extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
1632 extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
1633 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
1634 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
1636 #if !defined (BELIEVE_PCC_PROMOTION_TYPE)
1637 #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
1640 #if defined (DEPRECATED_GET_SAVED_REGISTER)
1641 /* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */
1642 #if !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1643 #define DEPRECATED_GET_SAVED_REGISTER_P() (1)
1647 /* Default predicate for non- multi-arch targets. */
1648 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1649 #define DEPRECATED_GET_SAVED_REGISTER_P() (0)
1652 extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch);
1653 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P)
1654 #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
1656 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1657 #define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch))
1660 /* Default (function) for non- multi-arch platforms. */
1661 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER)
1662 #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "DEPRECATED_GET_SAVED_REGISTER"), 0)
1665 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);
1666 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);
1667 extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register);
1668 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER)
1669 #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
1671 #if !defined (DEPRECATED_GET_SAVED_REGISTER)
1672 #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))
1675 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1676 For raw <-> cooked register conversions, replaced by pseudo registers. */
1678 /* Default (function) for non- multi-arch platforms. */
1679 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERTIBLE)
1680 #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (deprecated_register_convertible_not (nr))
1683 typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr);
1684 extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr);
1685 extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible);
1686 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE)
1687 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
1689 #if !defined (DEPRECATED_REGISTER_CONVERTIBLE)
1690 #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr))
1693 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1694 For raw <-> cooked register conversions, replaced by pseudo registers. */
1696 /* Default (function) for non- multi-arch platforms. */
1697 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1698 #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"), 0)
1701 typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
1702 extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
1703 extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual);
1704 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1705 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"
1707 #if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1708 #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
1711 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1712 For raw <-> cooked register conversions, replaced by pseudo registers. */
1714 /* Default (function) for non- multi-arch platforms. */
1715 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1716 #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_RAW"), 0)
1719 typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to);
1720 extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to);
1721 extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw);
1722 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1723 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW"
1725 #if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1726 #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
1729 /* Default (function) for non- multi-arch platforms. */
1730 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P)
1731 #define CONVERT_REGISTER_P(regnum, type) (legacy_convert_register_p (regnum, type))
1734 typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type);
1735 extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type);
1736 extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
1737 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
1738 #error "Non multi-arch definition of CONVERT_REGISTER_P"
1740 #if !defined (CONVERT_REGISTER_P)
1741 #define CONVERT_REGISTER_P(regnum, type) (gdbarch_convert_register_p (current_gdbarch, regnum, type))
1744 /* Default (function) for non- multi-arch platforms. */
1745 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
1746 #define REGISTER_TO_VALUE(frame, regnum, type, buf) (legacy_register_to_value (frame, regnum, type, buf))
1749 typedef void (gdbarch_register_to_value_ftype) (struct frame_info *frame, int regnum, struct type *type, void *buf);
1750 extern void gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf);
1751 extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
1752 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
1753 #error "Non multi-arch definition of REGISTER_TO_VALUE"
1755 #if !defined (REGISTER_TO_VALUE)
1756 #define REGISTER_TO_VALUE(frame, regnum, type, buf) (gdbarch_register_to_value (current_gdbarch, frame, regnum, type, buf))
1759 /* Default (function) for non- multi-arch platforms. */
1760 #if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
1761 #define VALUE_TO_REGISTER(frame, regnum, type, buf) (legacy_value_to_register (frame, regnum, type, buf))
1764 typedef void (gdbarch_value_to_register_ftype) (struct frame_info *frame, int regnum, struct type *type, const void *buf);
1765 extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf);
1766 extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
1767 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
1768 #error "Non multi-arch definition of VALUE_TO_REGISTER"
1770 #if !defined (VALUE_TO_REGISTER)
1771 #define VALUE_TO_REGISTER(frame, regnum, type, buf) (gdbarch_value_to_register (current_gdbarch, frame, regnum, type, buf))
1774 /* Default (function) for non- multi-arch platforms. */
1775 #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
1776 #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
1779 typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf);
1780 extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf);
1781 extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
1782 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
1783 #error "Non multi-arch definition of POINTER_TO_ADDRESS"
1785 #if !defined (POINTER_TO_ADDRESS)
1786 #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
1789 /* Default (function) for non- multi-arch platforms. */
1790 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
1791 #define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr))
1794 typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr);
1795 extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr);
1796 extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
1797 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
1798 #error "Non multi-arch definition of ADDRESS_TO_POINTER"
1800 #if !defined (ADDRESS_TO_POINTER)
1801 #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
1804 #if defined (INTEGER_TO_ADDRESS)
1805 /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
1806 #if !defined (INTEGER_TO_ADDRESS_P)
1807 #define INTEGER_TO_ADDRESS_P() (1)
1811 /* Default predicate for non- multi-arch targets. */
1812 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P)
1813 #define INTEGER_TO_ADDRESS_P() (0)
1816 extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch);
1817 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P)
1818 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1820 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P)
1821 #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch))
1824 /* Default (function) for non- multi-arch platforms. */
1825 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
1826 #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0)
1829 typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
1830 extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
1831 extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
1832 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
1833 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1835 #if !defined (INTEGER_TO_ADDRESS)
1836 #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
1839 /* Default (function) for non- multi-arch platforms. */
1840 #if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
1841 #define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type))
1844 typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
1845 extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
1846 extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack);
1847 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
1848 #error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
1850 #if !defined (RETURN_VALUE_ON_STACK)
1851 #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
1854 #if defined (DEPRECATED_POP_FRAME)
1855 /* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */
1856 #if !defined (DEPRECATED_POP_FRAME_P)
1857 #define DEPRECATED_POP_FRAME_P() (1)
1861 /* Default predicate for non- multi-arch targets. */
1862 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME_P)
1863 #define DEPRECATED_POP_FRAME_P() (0)
1866 extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch);
1867 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P)
1868 #error "Non multi-arch definition of DEPRECATED_POP_FRAME"
1870 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P)
1871 #define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch))
1874 /* Default (function) for non- multi-arch platforms. */
1875 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME)
1876 #define DEPRECATED_POP_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_POP_FRAME"), 0)
1879 typedef void (gdbarch_deprecated_pop_frame_ftype) (void);
1880 extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch);
1881 extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame);
1882 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME)
1883 #error "Non multi-arch definition of DEPRECATED_POP_FRAME"
1885 #if !defined (DEPRECATED_POP_FRAME)
1886 #define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch))
1889 /* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */
1891 #if defined (DEPRECATED_STORE_STRUCT_RETURN)
1892 /* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */
1893 #if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1894 #define DEPRECATED_STORE_STRUCT_RETURN_P() (1)
1898 /* Default predicate for non- multi-arch targets. */
1899 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1900 #define DEPRECATED_STORE_STRUCT_RETURN_P() (0)
1903 extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch);
1904 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1905 #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
1907 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1908 #define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch))
1911 /* Default (function) for non- multi-arch platforms. */
1912 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN)
1913 #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_STORE_STRUCT_RETURN"), 0)
1916 typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
1917 extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
1918 extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return);
1919 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN)
1920 #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
1922 #if !defined (DEPRECATED_STORE_STRUCT_RETURN)
1923 #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
1926 /* Default (function) for non- multi-arch platforms. */
1927 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
1928 #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf))
1931 typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf);
1932 extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf);
1933 extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
1934 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
1935 #error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
1937 #if !defined (EXTRACT_RETURN_VALUE)
1938 #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
1941 /* Default (function) for non- multi-arch platforms. */
1942 #if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
1943 #define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf))
1946 typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf);
1947 extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf);
1948 extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
1949 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
1950 #error "Non multi-arch definition of STORE_RETURN_VALUE"
1952 #if !defined (STORE_RETURN_VALUE)
1953 #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
1956 typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
1957 extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
1958 extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
1959 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1960 #error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
1962 #if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1963 #define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
1966 typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
1967 extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
1968 extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
1969 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
1970 #error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
1972 #if !defined (DEPRECATED_STORE_RETURN_VALUE)
1973 #define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
1976 #if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1977 /* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
1978 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1979 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
1983 /* Default predicate for non- multi-arch targets. */
1984 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1985 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
1988 extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
1989 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1990 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1992 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1993 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
1996 /* Default (function) for non- multi-arch platforms. */
1997 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1998 #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
2001 typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache);
2002 extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
2003 extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
2004 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
2005 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
2007 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
2008 #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
2011 #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
2012 /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
2013 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
2014 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
2018 /* Default predicate for non- multi-arch targets. */
2019 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
2020 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
2023 extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
2024 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
2025 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
2027 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
2028 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
2031 /* Default (function) for non- multi-arch platforms. */
2032 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
2033 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
2036 typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
2037 extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
2038 extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
2039 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
2040 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
2042 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
2043 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
2046 /* Default (function) for non- multi-arch platforms. */
2047 #if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
2048 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type))
2051 typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
2052 extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
2053 extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
2054 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
2055 #error "Non multi-arch definition of USE_STRUCT_CONVENTION"
2057 #if !defined (USE_STRUCT_CONVENTION)
2058 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
2061 #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2062 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */
2063 #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2064 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1)
2068 /* Default predicate for non- multi-arch targets. */
2069 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2070 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (0)
2073 extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch);
2074 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2075 #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
2077 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2078 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch))
2081 /* Default (function) for non- multi-arch platforms. */
2082 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2083 #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_INIT_SAVED_REGS"), 0)
2086 typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame);
2087 extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
2088 extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs);
2089 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2090 #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
2092 #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2093 #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame))
2096 #if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2097 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */
2098 #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2099 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1)
2103 /* Default predicate for non- multi-arch targets. */
2104 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2105 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (0)
2108 extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch);
2109 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2110 #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
2112 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2113 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch))
2116 /* Default (function) for non- multi-arch platforms. */
2117 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2118 #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_EXTRA_FRAME_INFO"), 0)
2121 typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
2122 extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
2123 extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info);
2124 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2125 #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
2127 #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2128 #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame))
2131 typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
2132 extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
2133 extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
2134 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
2135 #error "Non multi-arch definition of SKIP_PROLOGUE"
2137 #if !defined (SKIP_PROLOGUE)
2138 #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
2141 /* Default (function) for non- multi-arch platforms. */
2142 #if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
2143 #define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip))
2146 typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
2147 extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
2148 extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
2149 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
2150 #error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
2152 #if !defined (PROLOGUE_FRAMELESS_P)
2153 #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
2156 typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
2157 extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
2158 extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
2159 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
2160 #error "Non multi-arch definition of INNER_THAN"
2162 #if !defined (INNER_THAN)
2163 #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
2166 typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
2167 extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
2168 extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
2169 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
2170 #error "Non multi-arch definition of BREAKPOINT_FROM_PC"
2172 #if !defined (BREAKPOINT_FROM_PC)
2173 #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
2176 /* Default (function) for non- multi-arch platforms. */
2177 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
2178 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache))
2181 typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
2182 extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
2183 extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
2184 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
2185 #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
2187 #if !defined (MEMORY_INSERT_BREAKPOINT)
2188 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
2191 /* Default (function) for non- multi-arch platforms. */
2192 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
2193 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache))
2196 typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
2197 extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
2198 extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
2199 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
2200 #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
2202 #if !defined (MEMORY_REMOVE_BREAKPOINT)
2203 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
2206 extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
2207 extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
2208 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
2209 #error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
2211 #if !defined (DECR_PC_AFTER_BREAK)
2212 #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
2215 extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
2216 extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
2217 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
2218 #error "Non multi-arch definition of FUNCTION_START_OFFSET"
2220 #if !defined (FUNCTION_START_OFFSET)
2221 #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
2224 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);
2225 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);
2226 extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
2228 extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
2229 extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
2230 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
2231 #error "Non multi-arch definition of FRAME_ARGS_SKIP"
2233 #if !defined (FRAME_ARGS_SKIP)
2234 #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
2237 /* Default (function) for non- multi-arch platforms. */
2238 #if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
2239 #define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi))
2242 typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi);
2243 extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
2244 extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation);
2245 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
2246 #error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
2248 #if !defined (FRAMELESS_FUNCTION_INVOCATION)
2249 #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
2252 #if defined (DEPRECATED_FRAME_CHAIN)
2253 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */
2254 #if !defined (DEPRECATED_FRAME_CHAIN_P)
2255 #define DEPRECATED_FRAME_CHAIN_P() (1)
2259 /* Default predicate for non- multi-arch targets. */
2260 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_P)
2261 #define DEPRECATED_FRAME_CHAIN_P() (0)
2264 extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch);
2265 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P)
2266 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
2268 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P)
2269 #define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch))
2272 /* Default (function) for non- multi-arch platforms. */
2273 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN)
2274 #define DEPRECATED_FRAME_CHAIN(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN"), 0)
2277 typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame);
2278 extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
2279 extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain);
2280 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN)
2281 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
2283 #if !defined (DEPRECATED_FRAME_CHAIN)
2284 #define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame))
2287 #if defined (DEPRECATED_FRAME_CHAIN_VALID)
2288 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */
2289 #if !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2290 #define DEPRECATED_FRAME_CHAIN_VALID_P() (1)
2294 /* Default predicate for non- multi-arch targets. */
2295 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2296 #define DEPRECATED_FRAME_CHAIN_VALID_P() (0)
2299 extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch);
2300 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2301 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
2303 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2304 #define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch))
2307 /* Default (function) for non- multi-arch platforms. */
2308 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID)
2309 #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN_VALID"), 0)
2312 typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
2313 extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
2314 extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid);
2315 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID)
2316 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
2318 #if !defined (DEPRECATED_FRAME_CHAIN_VALID)
2319 #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe))
2322 /* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please
2323 note, per UNWIND_PC's doco, that while the two have similar
2324 interfaces they have very different underlying implementations. */
2326 #if defined (DEPRECATED_FRAME_SAVED_PC)
2327 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */
2328 #if !defined (DEPRECATED_FRAME_SAVED_PC_P)
2329 #define DEPRECATED_FRAME_SAVED_PC_P() (1)
2333 /* Default predicate for non- multi-arch targets. */
2334 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC_P)
2335 #define DEPRECATED_FRAME_SAVED_PC_P() (0)
2338 extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch);
2339 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P)
2340 #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
2342 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P)
2343 #define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch))
2346 /* Default (function) for non- multi-arch platforms. */
2347 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC)
2348 #define DEPRECATED_FRAME_SAVED_PC(fi) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_SAVED_PC"), 0)
2351 typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi);
2352 extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
2353 extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc);
2354 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC)
2355 #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
2357 #if !defined (DEPRECATED_FRAME_SAVED_PC)
2358 #define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi))
2361 extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch);
2363 typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
2364 extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame);
2365 extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc);
2367 extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch);
2369 typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
2370 extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
2371 extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
2373 /* DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
2374 frame-base. Enable frame-base before frame-unwind. */
2376 #if defined (DEPRECATED_FRAME_ARGS_ADDRESS)
2377 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_ARGS_ADDRESS */
2378 #if !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
2379 #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (1)
2383 /* Default predicate for non- multi-arch targets. */
2384 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
2385 #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (0)
2388 extern int gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch);
2389 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
2390 #error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
2392 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
2393 #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (gdbarch_deprecated_frame_args_address_p (current_gdbarch))
2396 /* Default (function) for non- multi-arch platforms. */
2397 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
2398 #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
2401 typedef CORE_ADDR (gdbarch_deprecated_frame_args_address_ftype) (struct frame_info *fi);
2402 extern CORE_ADDR gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
2403 extern void set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address);
2404 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS)
2405 #error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
2407 #if !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
2408 #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (gdbarch_deprecated_frame_args_address (current_gdbarch, fi))
2411 /* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
2412 frame-base. Enable frame-base before frame-unwind. */
2414 #if defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
2415 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_LOCALS_ADDRESS */
2416 #if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
2417 #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (1)
2421 /* Default predicate for non- multi-arch targets. */
2422 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
2423 #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (0)
2426 extern int gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch);
2427 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
2428 #error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
2430 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
2431 #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (gdbarch_deprecated_frame_locals_address_p (current_gdbarch))
2434 /* Default (function) for non- multi-arch platforms. */
2435 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
2436 #define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
2439 typedef CORE_ADDR (gdbarch_deprecated_frame_locals_address_ftype) (struct frame_info *fi);
2440 extern CORE_ADDR gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
2441 extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address);
2442 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
2443 #error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
2445 #if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
2446 #define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (gdbarch_deprecated_frame_locals_address (current_gdbarch, fi))
2449 #if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2450 /* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */
2451 #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2452 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (1)
2456 /* Default predicate for non- multi-arch targets. */
2457 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2458 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (0)
2461 extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch);
2462 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2463 #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
2465 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2466 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch))
2469 /* Default (function) for non- multi-arch platforms. */
2470 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2471 #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVED_PC_AFTER_CALL"), 0)
2474 typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame);
2475 extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
2476 extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call);
2477 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2478 #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
2480 #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2481 #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame))
2484 #if defined (FRAME_NUM_ARGS)
2485 /* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */
2486 #if !defined (FRAME_NUM_ARGS_P)
2487 #define FRAME_NUM_ARGS_P() (1)
2491 /* Default predicate for non- multi-arch targets. */
2492 #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P)
2493 #define FRAME_NUM_ARGS_P() (0)
2496 extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch);
2497 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P)
2498 #error "Non multi-arch definition of FRAME_NUM_ARGS"
2500 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P)
2501 #define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch))
2504 /* Default (function) for non- multi-arch platforms. */
2505 #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS)
2506 #define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0)
2509 typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
2510 extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
2511 extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
2512 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
2513 #error "Non multi-arch definition of FRAME_NUM_ARGS"
2515 #if !defined (FRAME_NUM_ARGS)
2516 #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
2519 #if defined (STACK_ALIGN)
2520 /* Legacy for systems yet to multi-arch STACK_ALIGN */
2521 #if !defined (STACK_ALIGN_P)
2522 #define STACK_ALIGN_P() (1)
2526 /* Default predicate for non- multi-arch targets. */
2527 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P)
2528 #define STACK_ALIGN_P() (0)
2531 extern int gdbarch_stack_align_p (struct gdbarch *gdbarch);
2532 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P)
2533 #error "Non multi-arch definition of STACK_ALIGN"
2535 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P)
2536 #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch))
2539 /* Default (function) for non- multi-arch platforms. */
2540 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN)
2541 #define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0)
2544 typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp);
2545 extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp);
2546 extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align);
2547 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
2548 #error "Non multi-arch definition of STACK_ALIGN"
2550 #if !defined (STACK_ALIGN)
2551 #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
2554 extern int gdbarch_frame_align_p (struct gdbarch *gdbarch);
2556 typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address);
2557 extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address);
2558 extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align);
2560 #if defined (REG_STRUCT_HAS_ADDR)
2561 /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
2562 #if !defined (REG_STRUCT_HAS_ADDR_P)
2563 #define REG_STRUCT_HAS_ADDR_P() (1)
2567 /* Default predicate for non- multi-arch targets. */
2568 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P)
2569 #define REG_STRUCT_HAS_ADDR_P() (0)
2572 extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch);
2573 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P)
2574 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2576 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P)
2577 #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch))
2580 /* Default (function) for non- multi-arch platforms. */
2581 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR)
2582 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0)
2585 typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
2586 extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
2587 extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr);
2588 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
2589 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2591 #if !defined (REG_STRUCT_HAS_ADDR)
2592 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
2595 extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
2596 extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
2597 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
2598 #error "Non multi-arch definition of PARM_BOUNDARY"
2600 #if !defined (PARM_BOUNDARY)
2601 #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
2604 /* Default (value) for non- multi-arch platforms. */
2605 #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
2606 #define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch))
2609 extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
2610 extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
2611 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
2612 #error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
2614 #if !defined (TARGET_FLOAT_FORMAT)
2615 #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
2618 /* Default (value) for non- multi-arch platforms. */
2619 #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
2620 #define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2623 extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
2624 extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
2625 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
2626 #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
2628 #if !defined (TARGET_DOUBLE_FORMAT)
2629 #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
2632 /* Default (value) for non- multi-arch platforms. */
2633 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
2634 #define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2637 extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
2638 extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
2639 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
2640 #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
2642 #if !defined (TARGET_LONG_DOUBLE_FORMAT)
2643 #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
2646 /* Default (function) for non- multi-arch platforms. */
2647 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2648 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr))
2651 typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr);
2652 extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr);
2653 extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr);
2654 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
2655 #error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
2657 #if !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2658 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
2661 /* On some machines there are bits in addresses which are not really
2662 part of the address, but are used by the kernel, the hardware, etc.
2663 for special purposes. ADDR_BITS_REMOVE takes out any such bits so
2664 we get a "real" address such as one would find in a symbol table.
2665 This is used only for addresses of instructions, and even then I'm
2666 not sure it's used in all contexts. It exists to deal with there
2667 being a few stray bits in the PC which would mislead us, not as some
2668 sort of generic thing to handle alignment or segmentation (it's
2669 possible it should be in TARGET_READ_PC instead). */
2671 /* Default (function) for non- multi-arch platforms. */
2672 #if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE)
2673 #define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr))
2676 typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
2677 extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
2678 extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
2679 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
2680 #error "Non multi-arch definition of ADDR_BITS_REMOVE"
2682 #if !defined (ADDR_BITS_REMOVE)
2683 #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
2686 /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
2687 ADDR_BITS_REMOVE. */
2689 /* Default (function) for non- multi-arch platforms. */
2690 #if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS)
2691 #define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr))
2694 typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
2695 extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
2696 extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
2697 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
2698 #error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
2700 #if !defined (SMASH_TEXT_ADDRESS)
2701 #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
2704 /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
2705 the target needs software single step. An ISA method to implement it.
2707 FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
2708 using the breakpoint system instead of blatting memory directly (as with rs6000).
2710 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
2711 single step. If not, then implement single step using breakpoints. */
2713 #if defined (SOFTWARE_SINGLE_STEP)
2714 /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
2715 #if !defined (SOFTWARE_SINGLE_STEP_P)
2716 #define SOFTWARE_SINGLE_STEP_P() (1)
2720 /* Default predicate for non- multi-arch targets. */
2721 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P)
2722 #define SOFTWARE_SINGLE_STEP_P() (0)
2725 extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
2726 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
2727 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2729 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
2730 #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
2733 /* Default (function) for non- multi-arch platforms. */
2734 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP)
2735 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
2738 typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
2739 extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
2740 extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
2741 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
2742 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2744 #if !defined (SOFTWARE_SINGLE_STEP)
2745 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
2748 /* Default (function) for non- multi-arch platforms. */
2749 #if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
2750 #define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info))
2753 typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info);
2754 extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info);
2755 extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
2756 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
2757 #error "Non multi-arch definition of TARGET_PRINT_INSN"
2759 #if !defined (TARGET_PRINT_INSN)
2760 #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
2763 /* Default (function) for non- multi-arch platforms. */
2764 #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
2765 #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc))
2768 typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc);
2769 extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc);
2770 extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
2771 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
2772 #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
2774 #if !defined (SKIP_TRAMPOLINE_CODE)
2775 #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
2778 /* For SVR4 shared libraries, each call goes through a small piece of
2779 trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
2780 to nonzero if we are currently stopped in one of these. */
2782 /* Default (function) for non- multi-arch platforms. */
2783 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
2784 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name))
2787 typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name);
2788 extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2789 extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline);
2790 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
2791 #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
2793 #if !defined (IN_SOLIB_CALL_TRAMPOLINE)
2794 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
2797 /* Some systems also have trampoline code for returning from shared libs. */
2799 /* Default (function) for non- multi-arch platforms. */
2800 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2801 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name))
2804 typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
2805 extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2806 extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
2807 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
2808 #error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
2810 #if !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2811 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
2814 /* Sigtramp is a routine that the kernel calls (which then calls the
2815 signal handler). On most machines it is a library routine that is
2816 linked into the executable.
2818 This macro, given a program counter value and the name of the
2819 function in which that PC resides (which can be null if the name is
2820 not known), returns nonzero if the PC and name show that we are in
2823 On most machines just see if the name is sigtramp (and if we have
2824 no name, assume we are not in sigtramp).
2826 FIXME: cagney/2002-04-21: The function find_pc_partial_function
2827 calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
2828 This means PC_IN_SIGTRAMP function can't be implemented by doing its
2829 own local NAME lookup.
2831 FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
2832 Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
2835 /* Default (function) for non- multi-arch platforms. */
2836 #if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP)
2837 #define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name))
2840 typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
2841 extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2842 extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
2843 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
2844 #error "Non multi-arch definition of PC_IN_SIGTRAMP"
2846 #if !defined (PC_IN_SIGTRAMP)
2847 #define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
2850 #if defined (SIGTRAMP_START)
2851 /* Legacy for systems yet to multi-arch SIGTRAMP_START */
2852 #if !defined (SIGTRAMP_START_P)
2853 #define SIGTRAMP_START_P() (1)
2857 /* Default predicate for non- multi-arch targets. */
2858 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START_P)
2859 #define SIGTRAMP_START_P() (0)
2862 extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch);
2863 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P)
2864 #error "Non multi-arch definition of SIGTRAMP_START"
2866 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P)
2867 #define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch))
2870 /* Default (function) for non- multi-arch platforms. */
2871 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START)
2872 #define SIGTRAMP_START(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_START"), 0)
2875 typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc);
2876 extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc);
2877 extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start);
2878 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START)
2879 #error "Non multi-arch definition of SIGTRAMP_START"
2881 #if !defined (SIGTRAMP_START)
2882 #define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc))
2885 #if defined (SIGTRAMP_END)
2886 /* Legacy for systems yet to multi-arch SIGTRAMP_END */
2887 #if !defined (SIGTRAMP_END_P)
2888 #define SIGTRAMP_END_P() (1)
2892 /* Default predicate for non- multi-arch targets. */
2893 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END_P)
2894 #define SIGTRAMP_END_P() (0)
2897 extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch);
2898 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P)
2899 #error "Non multi-arch definition of SIGTRAMP_END"
2901 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P)
2902 #define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch))
2905 /* Default (function) for non- multi-arch platforms. */
2906 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END)
2907 #define SIGTRAMP_END(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_END"), 0)
2910 typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc);
2911 extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc);
2912 extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end);
2913 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END)
2914 #error "Non multi-arch definition of SIGTRAMP_END"
2916 #if !defined (SIGTRAMP_END)
2917 #define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc))
2920 /* A target might have problems with watchpoints as soon as the stack
2921 frame of the current function has been destroyed. This mostly happens
2922 as the first action in a funtion's epilogue. in_function_epilogue_p()
2923 is defined to return a non-zero value if either the given addr is one
2924 instruction after the stack destroying instruction up to the trailing
2925 return instruction or if we can figure out that the stack frame has
2926 already been invalidated regardless of the value of addr. Targets
2927 which don't suffer from that problem could just let this functionality
2930 typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
2931 extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
2932 extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
2934 /* Given a vector of command-line arguments, return a newly allocated
2935 string which, when passed to the create_inferior function, will be
2936 parsed (on Unix systems, by the shell) to yield the same vector.
2937 This function should call error() if the argument vector is not
2938 representable for this target or if this target does not support
2939 command-line arguments.
2940 ARGC is the number of elements in the vector.
2941 ARGV is an array of strings, one per argument. */
2943 typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv);
2944 extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv);
2945 extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments);
2947 #if defined (DWARF2_BUILD_FRAME_INFO)
2948 /* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */
2949 #if !defined (DWARF2_BUILD_FRAME_INFO_P)
2950 #define DWARF2_BUILD_FRAME_INFO_P() (1)
2954 /* Default predicate for non- multi-arch targets. */
2955 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P)
2956 #define DWARF2_BUILD_FRAME_INFO_P() (0)
2959 extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch);
2960 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P)
2961 #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
2963 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P)
2964 #define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch))
2967 /* Default (function) for non- multi-arch platforms. */
2968 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO)
2969 #define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0)
2972 typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile);
2973 extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile);
2974 extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info);
2975 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO)
2976 #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
2978 #if !defined (DWARF2_BUILD_FRAME_INFO)
2979 #define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile))
2982 /* Default (function) for non- multi-arch platforms. */
2983 #if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2984 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym))
2987 typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym);
2988 extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym);
2989 extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special);
2990 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
2991 #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
2993 #if !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2994 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
2997 /* Default (function) for non- multi-arch platforms. */
2998 #if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2999 #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym))
3002 typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym);
3003 extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
3004 extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
3005 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
3006 #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
3008 #if !defined (COFF_MAKE_MSYMBOL_SPECIAL)
3009 #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
3012 /* Default (value) for non- multi-arch platforms. */
3013 #if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC)
3014 #define NAME_OF_MALLOC ("malloc")
3017 extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch);
3018 extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc);
3019 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
3020 #error "Non multi-arch definition of NAME_OF_MALLOC"
3022 #if !defined (NAME_OF_MALLOC)
3023 #define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch))
3026 /* Default (value) for non- multi-arch platforms. */
3027 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
3028 #define CANNOT_STEP_BREAKPOINT (0)
3031 extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
3032 extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
3033 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
3034 #error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
3036 #if !defined (CANNOT_STEP_BREAKPOINT)
3037 #define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
3040 /* Default (value) for non- multi-arch platforms. */
3041 #if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
3042 #define HAVE_NONSTEPPABLE_WATCHPOINT (0)
3045 extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
3046 extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
3047 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
3048 #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
3050 #if !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
3051 #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
3054 #if defined (ADDRESS_CLASS_TYPE_FLAGS)
3055 /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
3056 #if !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3057 #define ADDRESS_CLASS_TYPE_FLAGS_P() (1)
3061 /* Default predicate for non- multi-arch targets. */
3062 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3063 #define ADDRESS_CLASS_TYPE_FLAGS_P() (0)
3066 extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch);
3067 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3068 #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
3070 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3071 #define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch))
3074 /* Default (function) for non- multi-arch platforms. */
3075 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS)
3076 #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0)
3079 typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class);
3080 extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class);
3081 extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags);
3082 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
3083 #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
3085 #if !defined (ADDRESS_CLASS_TYPE_FLAGS)
3086 #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
3089 extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
3091 typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
3092 extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
3093 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);
3095 extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);
3097 typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
3098 extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
3099 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);
3101 /* Is a register in a group */
3103 typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
3104 extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
3105 extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
3107 /* Fetch the pointer to the ith function argument. */
3109 #if defined (FETCH_POINTER_ARGUMENT)
3110 /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */
3111 #if !defined (FETCH_POINTER_ARGUMENT_P)
3112 #define FETCH_POINTER_ARGUMENT_P() (1)
3116 /* Default predicate for non- multi-arch targets. */
3117 #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P)
3118 #define FETCH_POINTER_ARGUMENT_P() (0)
3121 extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch);
3122 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P)
3123 #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
3125 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P)
3126 #define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch))
3129 /* Default (function) for non- multi-arch platforms. */
3130 #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT)
3131 #define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0)
3134 typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type);
3135 extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type);
3136 extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument);
3137 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT)
3138 #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
3140 #if !defined (FETCH_POINTER_ARGUMENT)
3141 #define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type))
3144 extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
3147 /* Mechanism for co-ordinating the selection of a specific
3150 GDB targets (*-tdep.c) can register an interest in a specific
3151 architecture. Other GDB components can register a need to maintain
3152 per-architecture data.
3154 The mechanisms below ensures that there is only a loose connection
3155 between the set-architecture command and the various GDB
3156 components. Each component can independently register their need
3157 to maintain architecture specific data with gdbarch.
3161 Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It
3164 The more traditional mega-struct containing architecture specific
3165 data for all the various GDB components was also considered. Since
3166 GDB is built from a variable number of (fairly independent)
3167 components it was determined that the global aproach was not
3171 /* Register a new architectural family with GDB.
3173 Register support for the specified ARCHITECTURE with GDB. When
3174 gdbarch determines that the specified architecture has been
3175 selected, the corresponding INIT function is called.
3179 The INIT function takes two parameters: INFO which contains the
3180 information available to gdbarch about the (possibly new)
3181 architecture; ARCHES which is a list of the previously created
3182 ``struct gdbarch'' for this architecture.
3184 The INFO parameter is, as far as possible, be pre-initialized with
3185 information obtained from INFO.ABFD or the previously selected
3188 The ARCHES parameter is a linked list (sorted most recently used)
3189 of all the previously created architures for this architecture
3190 family. The (possibly NULL) ARCHES->gdbarch can used to access
3191 values from the previously selected architecture for this
3192 architecture family. The global ``current_gdbarch'' shall not be
3195 The INIT function shall return any of: NULL - indicating that it
3196 doesn't recognize the selected architecture; an existing ``struct
3197 gdbarch'' from the ARCHES list - indicating that the new
3198 architecture is just a synonym for an earlier architecture (see
3199 gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch''
3200 - that describes the selected architecture (see gdbarch_alloc()).
3202 The DUMP_TDEP function shall print out all target specific values.
3203 Care should be taken to ensure that the function works in both the
3204 multi-arch and non- multi-arch cases. */
3208 struct gdbarch *gdbarch;
3209 struct gdbarch_list *next;
3214 /* Use default: NULL (ZERO). */
3215 const struct bfd_arch_info *bfd_arch_info;
3217 /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */
3220 /* Use default: NULL (ZERO). */
3223 /* Use default: NULL (ZERO). */
3224 struct gdbarch_tdep_info *tdep_info;
3226 /* Use default: GDB_OSABI_UNINITIALIZED (-1). */
3227 enum gdb_osabi osabi;
3230 typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
3231 typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file);
3233 /* DEPRECATED - use gdbarch_register() */
3234 extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *);
3236 extern void gdbarch_register (enum bfd_architecture architecture,
3237 gdbarch_init_ftype *,
3238 gdbarch_dump_tdep_ftype *);
3241 /* Return a freshly allocated, NULL terminated, array of the valid
3242 architecture names. Since architectures are registered during the
3243 _initialize phase this function only returns useful information
3244 once initialization has been completed. */
3246 extern const char **gdbarch_printable_names (void);
3249 /* Helper function. Search the list of ARCHES for a GDBARCH that
3250 matches the information provided by INFO. */
3252 extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info);
3255 /* Helper function. Create a preliminary ``struct gdbarch''. Perform
3256 basic initialization using values obtained from the INFO andTDEP
3257 parameters. set_gdbarch_*() functions are called to complete the
3258 initialization of the object. */
3260 extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
3263 /* Helper function. Free a partially-constructed ``struct gdbarch''.
3264 It is assumed that the caller freeds the ``struct
3267 extern void gdbarch_free (struct gdbarch *);
3270 /* Helper function. Force an update of the current architecture.
3272 The actual architecture selected is determined by INFO, ``(gdb) set
3273 architecture'' et.al., the existing architecture and BFD's default
3274 architecture. INFO should be initialized to zero and then selected
3275 fields should be updated.
3277 Returns non-zero if the update succeeds */
3279 extern int gdbarch_update_p (struct gdbarch_info info);
3283 /* Register per-architecture data-pointer.
3285 Reserve space for a per-architecture data-pointer. An identifier
3286 for the reserved data-pointer is returned. That identifer should
3287 be saved in a local static variable.
3289 The per-architecture data-pointer is either initialized explicitly
3290 (set_gdbarch_data()) or implicitly (by INIT() via a call to
3291 gdbarch_data()). FREE() is called to delete either an existing
3292 data-pointer overridden by set_gdbarch_data() or when the
3293 architecture object is being deleted.
3295 When a previously created architecture is re-selected, the
3296 per-architecture data-pointer for that previous architecture is
3297 restored. INIT() is not re-called.
3299 Multiple registrarants for any architecture are allowed (and
3300 strongly encouraged). */
3302 struct gdbarch_data;
3304 typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
3305 typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
3307 extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
3308 gdbarch_data_free_ftype *free);
3309 extern void set_gdbarch_data (struct gdbarch *gdbarch,
3310 struct gdbarch_data *data,
3313 extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
3316 /* Register per-architecture memory region.
3318 Provide a memory-region swap mechanism. Per-architecture memory
3319 region are created. These memory regions are swapped whenever the
3320 architecture is changed. For a new architecture, the memory region
3321 is initialized with zero (0) and the INIT function is called.
3323 Memory regions are swapped / initialized in the order that they are
3324 registered. NULL DATA and/or INIT values can be specified.
3326 New code should use register_gdbarch_data(). */
3328 typedef void (gdbarch_swap_ftype) (void);
3329 extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init);
3330 #define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
3334 /* The target-system-dependent byte order is dynamic */
3336 extern int target_byte_order;
3337 #ifndef TARGET_BYTE_ORDER
3338 #define TARGET_BYTE_ORDER (target_byte_order + 0)
3341 extern int target_byte_order_auto;
3342 #ifndef TARGET_BYTE_ORDER_AUTO
3343 #define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
3348 /* The target-system-dependent BFD architecture is dynamic */
3350 extern int target_architecture_auto;
3351 #ifndef TARGET_ARCHITECTURE_AUTO
3352 #define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
3355 extern const struct bfd_arch_info *target_architecture;
3356 #ifndef TARGET_ARCHITECTURE
3357 #define TARGET_ARCHITECTURE (target_architecture + 0)
3361 /* The target-system-dependent disassembler is semi-dynamic */
3363 /* Use gdb_disassemble, and gdbarch_print_insn instead. */
3364 extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*);
3366 /* Use set_gdbarch_print_insn instead. */
3367 extern disassemble_info deprecated_tm_print_insn_info;
3369 /* Set the dynamic target-system-dependent parameters (architecture,
3370 byte-order, ...) using information found in the BFD */
3372 extern void set_gdbarch_from_file (bfd *);
3375 /* Initialize the current architecture to the "first" one we find on
3378 extern void initialize_current_architecture (void);
3380 /* For non-multiarched targets, do any initialization of the default
3381 gdbarch object necessary after the _initialize_MODULE functions
3383 extern void initialize_non_multiarch (void);
3385 /* gdbarch trace variable */
3386 extern int gdbarch_debug;
3388 extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file);