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 /* The dummy call frame SP should be set by push_dummy_call. */
375 #if defined (DEPRECATED_DUMMY_WRITE_SP)
376 /* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
377 #if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
378 #define DEPRECATED_DUMMY_WRITE_SP_P() (1)
382 /* Default predicate for non- multi-arch targets. */
383 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P)
384 #define DEPRECATED_DUMMY_WRITE_SP_P() (0)
387 extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
388 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
389 #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
391 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
392 #define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
395 /* Default (function) for non- multi-arch platforms. */
396 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP)
397 #define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0)
400 typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
401 extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
402 extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
403 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP)
404 #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
406 #if !defined (DEPRECATED_DUMMY_WRITE_SP)
407 #define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
410 /* Function for getting target's idea of a frame pointer. FIXME: GDB's
411 whole scheme for dealing with "frames" and "frame pointers" needs a
412 serious shakedown. */
414 /* Default (function) for non- multi-arch platforms. */
415 #if (!GDB_MULTI_ARCH) && !defined (TARGET_VIRTUAL_FRAME_POINTER)
416 #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (legacy_virtual_frame_pointer (pc, frame_regnum, frame_offset))
419 typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
420 extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
421 extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer);
422 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER)
423 #error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
425 #if !defined (TARGET_VIRTUAL_FRAME_POINTER)
426 #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset))
429 extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
431 typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
432 extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
433 extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read);
435 extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
437 typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
438 extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
439 extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
441 extern int gdbarch_num_regs (struct gdbarch *gdbarch);
442 extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
443 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
444 #error "Non multi-arch definition of NUM_REGS"
446 #if !defined (NUM_REGS)
447 #define NUM_REGS (gdbarch_num_regs (current_gdbarch))
450 /* This macro gives the number of pseudo-registers that live in the
451 register namespace but do not get fetched or stored on the target.
452 These pseudo-registers may be aliases for other registers,
453 combinations of other registers, or they may be computed by GDB. */
455 /* Default (value) for non- multi-arch platforms. */
456 #if (!GDB_MULTI_ARCH) && !defined (NUM_PSEUDO_REGS)
457 #define NUM_PSEUDO_REGS (0)
460 extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch);
461 extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs);
462 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
463 #error "Non multi-arch definition of NUM_PSEUDO_REGS"
465 #if !defined (NUM_PSEUDO_REGS)
466 #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
469 /* GDB's standard (or well known) register numbers. These can map onto
470 a real register or a pseudo (computed) register or not be defined at
472 SP_REGNUM will hopefully be replaced by UNWIND_SP. */
474 /* Default (value) for non- multi-arch platforms. */
475 #if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM)
476 #define SP_REGNUM (-1)
479 extern int gdbarch_sp_regnum (struct gdbarch *gdbarch);
480 extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
481 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
482 #error "Non multi-arch definition of SP_REGNUM"
484 #if !defined (SP_REGNUM)
485 #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
488 /* Default (value) for non- multi-arch platforms. */
489 #if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM)
490 #define PC_REGNUM (-1)
493 extern int gdbarch_pc_regnum (struct gdbarch *gdbarch);
494 extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
495 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
496 #error "Non multi-arch definition of PC_REGNUM"
498 #if !defined (PC_REGNUM)
499 #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
502 /* Default (value) for non- multi-arch platforms. */
503 #if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM)
504 #define PS_REGNUM (-1)
507 extern int gdbarch_ps_regnum (struct gdbarch *gdbarch);
508 extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
509 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM)
510 #error "Non multi-arch definition of PS_REGNUM"
512 #if !defined (PS_REGNUM)
513 #define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch))
516 /* Default (value) for non- multi-arch platforms. */
517 #if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM)
518 #define FP0_REGNUM (-1)
521 extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch);
522 extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
523 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
524 #error "Non multi-arch definition of FP0_REGNUM"
526 #if !defined (FP0_REGNUM)
527 #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
530 /* Default (value) for non- multi-arch platforms. */
531 #if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM)
532 #define NPC_REGNUM (-1)
535 extern int gdbarch_npc_regnum (struct gdbarch *gdbarch);
536 extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
537 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
538 #error "Non multi-arch definition of NPC_REGNUM"
540 #if !defined (NPC_REGNUM)
541 #define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
544 /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
546 /* Default (function) for non- multi-arch platforms. */
547 #if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM)
548 #define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr))
551 typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
552 extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr);
553 extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum);
554 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
555 #error "Non multi-arch definition of STAB_REG_TO_REGNUM"
557 #if !defined (STAB_REG_TO_REGNUM)
558 #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
561 /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
563 /* Default (function) for non- multi-arch platforms. */
564 #if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM)
565 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr))
568 typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr);
569 extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr);
570 extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum);
571 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
572 #error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
574 #if !defined (ECOFF_REG_TO_REGNUM)
575 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
578 /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
580 /* Default (function) for non- multi-arch platforms. */
581 #if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM)
582 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr))
585 typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr);
586 extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr);
587 extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum);
588 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
589 #error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
591 #if !defined (DWARF_REG_TO_REGNUM)
592 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
595 /* Convert from an sdb register number to an internal gdb register number.
596 This should be defined in tm.h, if REGISTER_NAMES is not set up
597 to map one to one onto the sdb register numbers. */
599 /* Default (function) for non- multi-arch platforms. */
600 #if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM)
601 #define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr))
604 typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
605 extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
606 extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
607 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
608 #error "Non multi-arch definition of SDB_REG_TO_REGNUM"
610 #if !defined (SDB_REG_TO_REGNUM)
611 #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
614 /* Default (function) for non- multi-arch platforms. */
615 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
616 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr))
619 typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr);
620 extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
621 extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum);
622 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
623 #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
625 #if !defined (DWARF2_REG_TO_REGNUM)
626 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
629 /* Default (function) for non- multi-arch platforms. */
630 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
631 #define REGISTER_NAME(regnr) (legacy_register_name (regnr))
634 typedef const char * (gdbarch_register_name_ftype) (int regnr);
635 extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
636 extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
637 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
638 #error "Non multi-arch definition of REGISTER_NAME"
640 #if !defined (REGISTER_NAME)
641 #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
644 /* See the dummy frame code. */
646 extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch);
647 extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size);
648 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE)
649 #error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE"
651 #if !defined (DEPRECATED_REGISTER_SIZE)
652 #define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch))
655 /* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
657 extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
659 typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr);
660 extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
661 extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
663 /* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
665 #if defined (REGISTER_VIRTUAL_TYPE)
666 /* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
667 #if !defined (REGISTER_VIRTUAL_TYPE_P)
668 #define REGISTER_VIRTUAL_TYPE_P() (1)
672 /* Default predicate for non- multi-arch targets. */
673 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P)
674 #define REGISTER_VIRTUAL_TYPE_P() (0)
677 extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch);
678 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P)
679 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
681 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P)
682 #define REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch))
685 /* Default (function) for non- multi-arch platforms. */
686 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE)
687 #define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0)
690 typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr);
691 extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
692 extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type);
693 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
694 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
696 #if !defined (REGISTER_VIRTUAL_TYPE)
697 #define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr))
700 /* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
701 from REGISTER_TYPE. */
703 extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch);
704 extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes);
705 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES)
706 #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES"
708 #if !defined (DEPRECATED_REGISTER_BYTES)
709 #define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
712 /* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
713 register offsets computed using just REGISTER_TYPE, this can be
714 deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
715 function with predicate has a valid (callable) initial value. As a
716 consequence, even when the predicate is false, the corresponding
717 function works. This simplifies the migration process - old code,
718 calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
720 #if defined (REGISTER_BYTE)
721 /* Legacy for systems yet to multi-arch REGISTER_BYTE */
722 #if !defined (REGISTER_BYTE_P)
723 #define REGISTER_BYTE_P() (1)
727 /* Default predicate for non- multi-arch targets. */
728 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE_P)
729 #define REGISTER_BYTE_P() (0)
732 extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
733 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P)
734 #error "Non multi-arch definition of REGISTER_BYTE"
736 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P)
737 #define REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
740 /* Default (function) for non- multi-arch platforms. */
741 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE)
742 #define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
745 typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr);
746 extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr);
747 extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte);
748 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
749 #error "Non multi-arch definition of REGISTER_BYTE"
751 #if !defined (REGISTER_BYTE)
752 #define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
755 /* If all registers have identical raw and virtual sizes and those
756 sizes agree with the value computed from REGISTER_TYPE,
757 DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
760 /* Default (function) for non- multi-arch platforms. */
761 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
762 #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
765 typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr);
766 extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
767 extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size);
768 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
769 #error "Non multi-arch definition of REGISTER_RAW_SIZE"
771 #if !defined (REGISTER_RAW_SIZE)
772 #define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
775 /* If all registers have identical raw and virtual sizes and those
776 sizes agree with the value computed from REGISTER_TYPE,
777 DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
780 /* Default (function) for non- multi-arch platforms. */
781 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
782 #define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
785 typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr);
786 extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
787 extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size);
788 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
789 #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
791 #if !defined (REGISTER_VIRTUAL_SIZE)
792 #define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr))
795 /* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
796 replaced by the constant MAX_REGISTER_SIZE. */
798 #if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
799 /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */
800 #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
801 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1)
805 /* Default predicate for non- multi-arch targets. */
806 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
807 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (0)
810 extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch);
811 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
812 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
814 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
815 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch))
818 /* Default (value) for non- multi-arch platforms. */
819 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
820 #define DEPRECATED_MAX_REGISTER_RAW_SIZE (0)
823 extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch);
824 extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size);
825 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
826 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
828 #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
829 #define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch))
832 /* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been
833 replaced by the constant MAX_REGISTER_SIZE. */
835 #if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
836 /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */
837 #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
838 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1)
842 /* Default predicate for non- multi-arch targets. */
843 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
844 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (0)
847 extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch);
848 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
849 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
851 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
852 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch))
855 /* Default (value) for non- multi-arch platforms. */
856 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
857 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (0)
860 extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch);
861 extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size);
862 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
863 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
865 #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
866 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
869 /* See gdbint.texinfo, and PUSH_DUMMY_CALL. */
871 extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
873 typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info);
874 extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info);
875 extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
877 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
878 SAVE_DUMMY_FRAME_TOS. */
880 #if defined (SAVE_DUMMY_FRAME_TOS)
881 /* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
882 #if !defined (SAVE_DUMMY_FRAME_TOS_P)
883 #define SAVE_DUMMY_FRAME_TOS_P() (1)
887 /* Default predicate for non- multi-arch targets. */
888 #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P)
889 #define SAVE_DUMMY_FRAME_TOS_P() (0)
892 extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
893 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
894 #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
896 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
897 #define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
900 /* Default (function) for non- multi-arch platforms. */
901 #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
902 #define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
905 typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
906 extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
907 extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
908 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
909 #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
911 #if !defined (SAVE_DUMMY_FRAME_TOS)
912 #define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
915 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
916 DEPRECATED_FP_REGNUM. */
918 /* Default (value) for non- multi-arch platforms. */
919 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM)
920 #define DEPRECATED_FP_REGNUM (-1)
923 extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
924 extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
925 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
926 #error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
928 #if !defined (DEPRECATED_FP_REGNUM)
929 #define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
932 /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
933 DEPRECATED_TARGET_READ_FP. */
935 #if defined (DEPRECATED_TARGET_READ_FP)
936 /* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
937 #if !defined (DEPRECATED_TARGET_READ_FP_P)
938 #define DEPRECATED_TARGET_READ_FP_P() (1)
942 /* Default predicate for non- multi-arch targets. */
943 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P)
944 #define DEPRECATED_TARGET_READ_FP_P() (0)
947 extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
948 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
949 #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
951 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
952 #define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
955 /* Default (function) for non- multi-arch platforms. */
956 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP)
957 #define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0)
960 typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
961 extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
962 extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
963 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP)
964 #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
966 #if !defined (DEPRECATED_TARGET_READ_FP)
967 #define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
970 #if defined (DEPRECATED_DO_REGISTERS_INFO)
971 /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
972 #if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
973 #define DEPRECATED_DO_REGISTERS_INFO_P() (1)
977 /* Default predicate for non- multi-arch targets. */
978 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
979 #define DEPRECATED_DO_REGISTERS_INFO_P() (0)
982 extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
983 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
984 #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
986 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
987 #define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
990 /* Default (function) for non- multi-arch platforms. */
991 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO)
992 #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0)
995 typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
996 extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
997 extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
998 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO)
999 #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
1001 #if !defined (DEPRECATED_DO_REGISTERS_INFO)
1002 #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
1005 typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
1006 extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
1007 extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
1009 extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
1011 typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1012 extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1013 extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
1015 extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
1017 typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1018 extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
1019 extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
1021 /* MAP a GDB RAW register number onto a simulator register number. See
1022 also include/...-sim.h. */
1024 /* Default (function) for non- multi-arch platforms. */
1025 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
1026 #define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
1029 typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
1030 extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
1031 extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
1032 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
1033 #error "Non multi-arch definition of REGISTER_SIM_REGNO"
1035 #if !defined (REGISTER_SIM_REGNO)
1036 #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
1039 #if defined (REGISTER_BYTES_OK)
1040 /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
1041 #if !defined (REGISTER_BYTES_OK_P)
1042 #define REGISTER_BYTES_OK_P() (1)
1046 /* Default predicate for non- multi-arch targets. */
1047 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
1048 #define REGISTER_BYTES_OK_P() (0)
1051 extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
1052 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
1053 #error "Non multi-arch definition of REGISTER_BYTES_OK"
1055 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
1056 #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
1059 /* Default (function) for non- multi-arch platforms. */
1060 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
1061 #define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
1064 typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
1065 extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
1066 extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
1067 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
1068 #error "Non multi-arch definition of REGISTER_BYTES_OK"
1070 #if !defined (REGISTER_BYTES_OK)
1071 #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
1074 /* Default (function) for non- multi-arch platforms. */
1075 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
1076 #define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
1079 typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
1080 extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
1081 extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
1082 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
1083 #error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
1085 #if !defined (CANNOT_FETCH_REGISTER)
1086 #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
1089 /* Default (function) for non- multi-arch platforms. */
1090 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
1091 #define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
1094 typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
1095 extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
1096 extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
1097 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
1098 #error "Non multi-arch definition of CANNOT_STORE_REGISTER"
1100 #if !defined (CANNOT_STORE_REGISTER)
1101 #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
1104 /* setjmp/longjmp support. */
1106 #if defined (GET_LONGJMP_TARGET)
1107 /* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */
1108 #if !defined (GET_LONGJMP_TARGET_P)
1109 #define GET_LONGJMP_TARGET_P() (1)
1113 /* Default predicate for non- multi-arch targets. */
1114 #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P)
1115 #define GET_LONGJMP_TARGET_P() (0)
1118 extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
1119 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
1120 #error "Non multi-arch definition of GET_LONGJMP_TARGET"
1122 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
1123 #define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
1126 /* Default (function) for non- multi-arch platforms. */
1127 #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET)
1128 #define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0)
1131 typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
1132 extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
1133 extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
1134 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
1135 #error "Non multi-arch definition of GET_LONGJMP_TARGET"
1137 #if !defined (GET_LONGJMP_TARGET)
1138 #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
1141 /* Non multi-arch DUMMY_FRAMES are a mess (multi-arch ones are not that
1142 much better but at least they are vaguely consistent). The headers
1143 and body contain convoluted #if/#else sequences for determine how
1144 things should be compiled. Instead of trying to mimic that
1145 behaviour here (and hence entrench it further) gdbarch simply
1146 reqires that these methods be set up from the word go. This also
1147 avoids any potential problems with moving beyond multi-arch partial. */
1149 /* Default (value) for non- multi-arch platforms. */
1150 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1151 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (1)
1154 extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch);
1155 extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames);
1156 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1157 #error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES"
1159 #if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1160 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch))
1163 /* Replaced by push_dummy_code. */
1165 /* Default (value) for non- multi-arch platforms. */
1166 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_LOCATION)
1167 #define CALL_DUMMY_LOCATION (AT_ENTRY_POINT)
1170 extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
1171 extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
1172 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
1173 #error "Non multi-arch definition of CALL_DUMMY_LOCATION"
1175 #if !defined (CALL_DUMMY_LOCATION)
1176 #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
1179 /* Replaced by push_dummy_code. */
1181 /* Default (function) for non- multi-arch platforms. */
1182 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS)
1183 #define CALL_DUMMY_ADDRESS() (entry_point_address ())
1186 typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
1187 extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
1188 extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
1189 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
1190 #error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
1192 #if !defined (CALL_DUMMY_ADDRESS)
1193 #define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
1196 /* Replaced by push_dummy_code. */
1198 extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch);
1199 extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset);
1200 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
1201 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET"
1203 #if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
1204 #define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch))
1207 /* Replaced by push_dummy_code. */
1209 extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
1210 extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset);
1211 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
1212 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET"
1214 #if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
1215 #define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch))
1218 /* Replaced by push_dummy_code. */
1220 extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch);
1221 extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length);
1222 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH)
1223 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH"
1225 #if !defined (DEPRECATED_CALL_DUMMY_LENGTH)
1226 #define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch))
1229 /* NOTE: cagney/2002-11-24: This function with predicate has a valid
1230 (callable) initial value. As a consequence, even when the predicate
1231 is false, the corresponding function works. This simplifies the
1232 migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
1233 doesn't need to be modified. */
1235 #if defined (DEPRECATED_PC_IN_CALL_DUMMY)
1236 /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
1237 #if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1238 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
1242 /* Default predicate for non- multi-arch targets. */
1243 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1244 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (0)
1247 extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
1248 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1249 #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1251 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1252 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
1255 /* Default (function) for non- multi-arch platforms. */
1256 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1257 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
1260 typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1261 extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1262 extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
1263 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY)
1264 #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1266 #if !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1267 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
1270 /* Replaced by push_dummy_code. */
1272 /* Default (value) for non- multi-arch platforms. */
1273 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_WORDS)
1274 #define DEPRECATED_CALL_DUMMY_WORDS (legacy_call_dummy_words)
1277 extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch);
1278 extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words);
1279 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS)
1280 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS"
1282 #if !defined (DEPRECATED_CALL_DUMMY_WORDS)
1283 #define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch))
1286 /* Replaced by push_dummy_code. */
1288 /* Default (value) for non- multi-arch platforms. */
1289 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1290 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words)
1293 extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch);
1294 extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words);
1295 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1296 #error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS"
1298 #if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1299 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch))
1302 /* Replaced by push_dummy_code. */
1304 #if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1305 /* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_STACK_ADJUST */
1306 #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1307 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (1)
1311 /* Default predicate for non- multi-arch targets. */
1312 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1313 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (0)
1316 extern int gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch);
1317 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1318 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
1320 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1321 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (gdbarch_deprecated_call_dummy_stack_adjust_p (current_gdbarch))
1324 /* Default (value) for non- multi-arch platforms. */
1325 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1326 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (0)
1329 extern int gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch);
1330 extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch, int deprecated_call_dummy_stack_adjust);
1331 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1332 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
1334 #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1335 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (gdbarch_deprecated_call_dummy_stack_adjust (current_gdbarch))
1338 /* Replaced by push_dummy_code. */
1340 #if defined (DEPRECATED_FIX_CALL_DUMMY)
1341 /* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */
1342 #if !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1343 #define DEPRECATED_FIX_CALL_DUMMY_P() (1)
1347 /* Default predicate for non- multi-arch targets. */
1348 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1349 #define DEPRECATED_FIX_CALL_DUMMY_P() (0)
1352 extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch);
1353 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P)
1354 #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
1356 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1357 #define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch))
1360 /* Default (function) for non- multi-arch platforms. */
1361 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY)
1362 #define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "DEPRECATED_FIX_CALL_DUMMY"), 0)
1365 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);
1366 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);
1367 extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy);
1368 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY)
1369 #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
1371 #if !defined (DEPRECATED_FIX_CALL_DUMMY)
1372 #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))
1375 /* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */
1377 extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
1379 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);
1380 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);
1381 extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
1383 #if defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1384 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */
1385 #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1386 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1)
1390 /* Default predicate for non- multi-arch targets. */
1391 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1392 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (0)
1395 extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch);
1396 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1397 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1399 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1400 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch))
1403 /* Default (function) for non- multi-arch platforms. */
1404 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1405 #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC_FIRST"), 0)
1408 typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
1409 extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1410 extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first);
1411 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1412 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1414 #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1415 #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev))
1418 #if defined (DEPRECATED_INIT_FRAME_PC)
1419 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
1420 #if !defined (DEPRECATED_INIT_FRAME_PC_P)
1421 #define DEPRECATED_INIT_FRAME_PC_P() (1)
1425 /* Default predicate for non- multi-arch targets. */
1426 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_P)
1427 #define DEPRECATED_INIT_FRAME_PC_P() (0)
1430 extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch);
1431 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P)
1432 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1434 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P)
1435 #define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch))
1438 /* Default (function) for non- multi-arch platforms. */
1439 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC)
1440 #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC"), 0)
1443 typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev);
1444 extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1445 extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc);
1446 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC)
1447 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1449 #if !defined (DEPRECATED_INIT_FRAME_PC)
1450 #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev))
1453 extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
1454 extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
1455 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
1456 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
1458 #if !defined (BELIEVE_PCC_PROMOTION)
1459 #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
1462 extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
1463 extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
1464 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
1465 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
1467 #if !defined (BELIEVE_PCC_PROMOTION_TYPE)
1468 #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
1471 #if defined (DEPRECATED_GET_SAVED_REGISTER)
1472 /* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */
1473 #if !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1474 #define DEPRECATED_GET_SAVED_REGISTER_P() (1)
1478 /* Default predicate for non- multi-arch targets. */
1479 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1480 #define DEPRECATED_GET_SAVED_REGISTER_P() (0)
1483 extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch);
1484 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P)
1485 #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
1487 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1488 #define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch))
1491 /* Default (function) for non- multi-arch platforms. */
1492 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER)
1493 #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "DEPRECATED_GET_SAVED_REGISTER"), 0)
1496 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);
1497 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);
1498 extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register);
1499 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER)
1500 #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
1502 #if !defined (DEPRECATED_GET_SAVED_REGISTER)
1503 #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))
1506 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1507 For raw <-> cooked register conversions, replaced by pseudo registers. */
1509 /* Default (function) for non- multi-arch platforms. */
1510 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERTIBLE)
1511 #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (deprecated_register_convertible_not (nr))
1514 typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr);
1515 extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr);
1516 extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible);
1517 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE)
1518 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
1520 #if !defined (DEPRECATED_REGISTER_CONVERTIBLE)
1521 #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr))
1524 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1525 For raw <-> cooked register conversions, replaced by pseudo registers. */
1527 /* Default (function) for non- multi-arch platforms. */
1528 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1529 #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"), 0)
1532 typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
1533 extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
1534 extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual);
1535 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1536 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"
1538 #if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1539 #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
1542 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1543 For raw <-> cooked register conversions, replaced by pseudo registers. */
1545 /* Default (function) for non- multi-arch platforms. */
1546 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1547 #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_RAW"), 0)
1550 typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to);
1551 extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to);
1552 extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw);
1553 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1554 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW"
1556 #if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1557 #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
1560 /* Default (function) for non- multi-arch platforms. */
1561 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P)
1562 #define CONVERT_REGISTER_P(regnum) (legacy_convert_register_p (regnum))
1565 typedef int (gdbarch_convert_register_p_ftype) (int regnum);
1566 extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum);
1567 extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
1568 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
1569 #error "Non multi-arch definition of CONVERT_REGISTER_P"
1571 #if !defined (CONVERT_REGISTER_P)
1572 #define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum))
1575 /* Default (function) for non- multi-arch platforms. */
1576 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
1577 #define REGISTER_TO_VALUE(regnum, type, from, to) (legacy_register_to_value (regnum, type, from, to))
1580 typedef void (gdbarch_register_to_value_ftype) (int regnum, struct type *type, char *from, char *to);
1581 extern void gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
1582 extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
1583 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
1584 #error "Non multi-arch definition of REGISTER_TO_VALUE"
1586 #if !defined (REGISTER_TO_VALUE)
1587 #define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to))
1590 /* Default (function) for non- multi-arch platforms. */
1591 #if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
1592 #define VALUE_TO_REGISTER(type, regnum, from, to) (legacy_value_to_register (type, regnum, from, to))
1595 typedef void (gdbarch_value_to_register_ftype) (struct type *type, int regnum, char *from, char *to);
1596 extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
1597 extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
1598 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
1599 #error "Non multi-arch definition of VALUE_TO_REGISTER"
1601 #if !defined (VALUE_TO_REGISTER)
1602 #define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to))
1605 /* Default (function) for non- multi-arch platforms. */
1606 #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
1607 #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
1610 typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf);
1611 extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf);
1612 extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
1613 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
1614 #error "Non multi-arch definition of POINTER_TO_ADDRESS"
1616 #if !defined (POINTER_TO_ADDRESS)
1617 #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
1620 /* Default (function) for non- multi-arch platforms. */
1621 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
1622 #define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr))
1625 typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr);
1626 extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr);
1627 extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
1628 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
1629 #error "Non multi-arch definition of ADDRESS_TO_POINTER"
1631 #if !defined (ADDRESS_TO_POINTER)
1632 #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
1635 #if defined (INTEGER_TO_ADDRESS)
1636 /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
1637 #if !defined (INTEGER_TO_ADDRESS_P)
1638 #define INTEGER_TO_ADDRESS_P() (1)
1642 /* Default predicate for non- multi-arch targets. */
1643 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P)
1644 #define INTEGER_TO_ADDRESS_P() (0)
1647 extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch);
1648 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P)
1649 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1651 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P)
1652 #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch))
1655 /* Default (function) for non- multi-arch platforms. */
1656 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
1657 #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0)
1660 typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
1661 extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
1662 extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
1663 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
1664 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1666 #if !defined (INTEGER_TO_ADDRESS)
1667 #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
1670 /* Default (function) for non- multi-arch platforms. */
1671 #if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
1672 #define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type))
1675 typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
1676 extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
1677 extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack);
1678 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
1679 #error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
1681 #if !defined (RETURN_VALUE_ON_STACK)
1682 #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
1685 /* Replaced by PUSH_DUMMY_CALL */
1687 #if defined (DEPRECATED_PUSH_ARGUMENTS)
1688 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */
1689 #if !defined (DEPRECATED_PUSH_ARGUMENTS_P)
1690 #define DEPRECATED_PUSH_ARGUMENTS_P() (1)
1694 /* Default predicate for non- multi-arch targets. */
1695 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P)
1696 #define DEPRECATED_PUSH_ARGUMENTS_P() (0)
1699 extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch);
1700 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
1701 #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
1703 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P)
1704 #define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch))
1707 /* Default (function) for non- multi-arch platforms. */
1708 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS)
1709 #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0)
1712 typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
1713 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);
1714 extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments);
1715 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
1716 #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
1718 #if !defined (DEPRECATED_PUSH_ARGUMENTS)
1719 #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
1722 extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
1724 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);
1725 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);
1726 extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
1728 #if defined (DEPRECATED_PUSH_DUMMY_FRAME)
1729 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
1730 #if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1731 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
1735 /* Default predicate for non- multi-arch targets. */
1736 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1737 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (0)
1740 extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
1741 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1742 #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
1744 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1745 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
1748 /* Default (function) for non- multi-arch platforms. */
1749 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME)
1750 #define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0)
1753 typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
1754 extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
1755 extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
1756 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME)
1757 #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
1759 #if !defined (DEPRECATED_PUSH_DUMMY_FRAME)
1760 #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
1763 /* NOTE: This can be handled directly in push_dummy_call. */
1765 #if defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1766 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */
1767 #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1768 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1)
1772 /* Default predicate for non- multi-arch targets. */
1773 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1774 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0)
1777 extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch);
1778 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1779 #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
1781 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1782 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch))
1785 /* Default (function) for non- multi-arch platforms. */
1786 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1787 #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0)
1790 typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
1791 extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
1792 extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address);
1793 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1794 #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
1796 #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1797 #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
1800 #if defined (DEPRECATED_POP_FRAME)
1801 /* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */
1802 #if !defined (DEPRECATED_POP_FRAME_P)
1803 #define DEPRECATED_POP_FRAME_P() (1)
1807 /* Default predicate for non- multi-arch targets. */
1808 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME_P)
1809 #define DEPRECATED_POP_FRAME_P() (0)
1812 extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch);
1813 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P)
1814 #error "Non multi-arch definition of DEPRECATED_POP_FRAME"
1816 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P)
1817 #define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch))
1820 /* Default (function) for non- multi-arch platforms. */
1821 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME)
1822 #define DEPRECATED_POP_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_POP_FRAME"), 0)
1825 typedef void (gdbarch_deprecated_pop_frame_ftype) (void);
1826 extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch);
1827 extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame);
1828 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME)
1829 #error "Non multi-arch definition of DEPRECATED_POP_FRAME"
1831 #if !defined (DEPRECATED_POP_FRAME)
1832 #define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch))
1835 /* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */
1837 #if defined (DEPRECATED_STORE_STRUCT_RETURN)
1838 /* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */
1839 #if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1840 #define DEPRECATED_STORE_STRUCT_RETURN_P() (1)
1844 /* Default predicate for non- multi-arch targets. */
1845 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1846 #define DEPRECATED_STORE_STRUCT_RETURN_P() (0)
1849 extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch);
1850 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1851 #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
1853 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1854 #define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch))
1857 /* Default (function) for non- multi-arch platforms. */
1858 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN)
1859 #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_STORE_STRUCT_RETURN"), 0)
1862 typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
1863 extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
1864 extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return);
1865 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN)
1866 #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
1868 #if !defined (DEPRECATED_STORE_STRUCT_RETURN)
1869 #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
1872 /* Default (function) for non- multi-arch platforms. */
1873 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
1874 #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf))
1877 typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf);
1878 extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf);
1879 extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
1880 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
1881 #error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
1883 #if !defined (EXTRACT_RETURN_VALUE)
1884 #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
1887 /* Default (function) for non- multi-arch platforms. */
1888 #if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
1889 #define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf))
1892 typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf);
1893 extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf);
1894 extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
1895 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
1896 #error "Non multi-arch definition of STORE_RETURN_VALUE"
1898 #if !defined (STORE_RETURN_VALUE)
1899 #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
1902 typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
1903 extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
1904 extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
1905 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1906 #error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
1908 #if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1909 #define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
1912 typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
1913 extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
1914 extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
1915 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
1916 #error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
1918 #if !defined (DEPRECATED_STORE_RETURN_VALUE)
1919 #define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
1922 #if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1923 /* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
1924 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1925 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
1929 /* Default predicate for non- multi-arch targets. */
1930 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1931 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
1934 extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
1935 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1936 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1938 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1939 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
1942 /* Default (function) for non- multi-arch platforms. */
1943 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1944 #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
1947 typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache);
1948 extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
1949 extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
1950 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1951 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1953 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1954 #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
1957 #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1958 /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
1959 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1960 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
1964 /* Default predicate for non- multi-arch targets. */
1965 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1966 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
1969 extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
1970 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1971 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
1973 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1974 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
1977 /* Default (function) for non- multi-arch platforms. */
1978 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1979 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
1982 typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
1983 extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
1984 extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
1985 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1986 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
1988 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1989 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
1992 /* Default (function) for non- multi-arch platforms. */
1993 #if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
1994 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type))
1997 typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
1998 extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
1999 extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
2000 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
2001 #error "Non multi-arch definition of USE_STRUCT_CONVENTION"
2003 #if !defined (USE_STRUCT_CONVENTION)
2004 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
2007 #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2008 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */
2009 #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2010 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1)
2014 /* Default predicate for non- multi-arch targets. */
2015 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2016 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (0)
2019 extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch);
2020 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2021 #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
2023 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
2024 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch))
2027 /* Default (function) for non- multi-arch platforms. */
2028 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2029 #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_INIT_SAVED_REGS"), 0)
2032 typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame);
2033 extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
2034 extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs);
2035 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2036 #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
2038 #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
2039 #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame))
2042 #if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2043 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */
2044 #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2045 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1)
2049 /* Default predicate for non- multi-arch targets. */
2050 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2051 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (0)
2054 extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch);
2055 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2056 #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
2058 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2059 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch))
2062 /* Default (function) for non- multi-arch platforms. */
2063 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2064 #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_EXTRA_FRAME_INFO"), 0)
2067 typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
2068 extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
2069 extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info);
2070 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2071 #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
2073 #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2074 #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame))
2077 typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
2078 extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
2079 extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
2080 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
2081 #error "Non multi-arch definition of SKIP_PROLOGUE"
2083 #if !defined (SKIP_PROLOGUE)
2084 #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
2087 /* Default (function) for non- multi-arch platforms. */
2088 #if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
2089 #define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip))
2092 typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
2093 extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
2094 extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
2095 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
2096 #error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
2098 #if !defined (PROLOGUE_FRAMELESS_P)
2099 #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
2102 typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
2103 extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
2104 extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
2105 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
2106 #error "Non multi-arch definition of INNER_THAN"
2108 #if !defined (INNER_THAN)
2109 #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
2112 typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
2113 extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
2114 extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
2115 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
2116 #error "Non multi-arch definition of BREAKPOINT_FROM_PC"
2118 #if !defined (BREAKPOINT_FROM_PC)
2119 #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
2122 /* Default (function) for non- multi-arch platforms. */
2123 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
2124 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache))
2127 typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
2128 extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
2129 extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
2130 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
2131 #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
2133 #if !defined (MEMORY_INSERT_BREAKPOINT)
2134 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
2137 /* Default (function) for non- multi-arch platforms. */
2138 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
2139 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache))
2142 typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
2143 extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
2144 extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
2145 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
2146 #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
2148 #if !defined (MEMORY_REMOVE_BREAKPOINT)
2149 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
2152 extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
2153 extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
2154 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
2155 #error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
2157 #if !defined (DECR_PC_AFTER_BREAK)
2158 #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
2161 /* Default (function) for non- multi-arch platforms. */
2162 #if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED)
2163 #define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it))
2166 typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it);
2167 extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it);
2168 extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed);
2169 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
2170 #error "Non multi-arch definition of PREPARE_TO_PROCEED"
2172 #if !defined (PREPARE_TO_PROCEED)
2173 #define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
2176 extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
2177 extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
2178 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
2179 #error "Non multi-arch definition of FUNCTION_START_OFFSET"
2181 #if !defined (FUNCTION_START_OFFSET)
2182 #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
2185 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);
2186 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);
2187 extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
2189 extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
2190 extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
2191 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
2192 #error "Non multi-arch definition of FRAME_ARGS_SKIP"
2194 #if !defined (FRAME_ARGS_SKIP)
2195 #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
2198 /* Default (function) for non- multi-arch platforms. */
2199 #if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
2200 #define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi))
2203 typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi);
2204 extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
2205 extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation);
2206 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
2207 #error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
2209 #if !defined (FRAMELESS_FUNCTION_INVOCATION)
2210 #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
2213 #if defined (DEPRECATED_FRAME_CHAIN)
2214 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */
2215 #if !defined (DEPRECATED_FRAME_CHAIN_P)
2216 #define DEPRECATED_FRAME_CHAIN_P() (1)
2220 /* Default predicate for non- multi-arch targets. */
2221 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_P)
2222 #define DEPRECATED_FRAME_CHAIN_P() (0)
2225 extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch);
2226 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P)
2227 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
2229 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P)
2230 #define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch))
2233 /* Default (function) for non- multi-arch platforms. */
2234 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN)
2235 #define DEPRECATED_FRAME_CHAIN(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN"), 0)
2238 typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame);
2239 extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
2240 extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain);
2241 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN)
2242 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
2244 #if !defined (DEPRECATED_FRAME_CHAIN)
2245 #define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame))
2248 #if defined (DEPRECATED_FRAME_CHAIN_VALID)
2249 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */
2250 #if !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2251 #define DEPRECATED_FRAME_CHAIN_VALID_P() (1)
2255 /* Default predicate for non- multi-arch targets. */
2256 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2257 #define DEPRECATED_FRAME_CHAIN_VALID_P() (0)
2260 extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch);
2261 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2262 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
2264 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2265 #define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch))
2268 /* Default (function) for non- multi-arch platforms. */
2269 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID)
2270 #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN_VALID"), 0)
2273 typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
2274 extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
2275 extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid);
2276 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID)
2277 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
2279 #if !defined (DEPRECATED_FRAME_CHAIN_VALID)
2280 #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe))
2283 /* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please
2284 note, per UNWIND_PC's doco, that while the two have similar
2285 interfaces they have very different underlying implementations. */
2287 #if defined (DEPRECATED_FRAME_SAVED_PC)
2288 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */
2289 #if !defined (DEPRECATED_FRAME_SAVED_PC_P)
2290 #define DEPRECATED_FRAME_SAVED_PC_P() (1)
2294 /* Default predicate for non- multi-arch targets. */
2295 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC_P)
2296 #define DEPRECATED_FRAME_SAVED_PC_P() (0)
2299 extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch);
2300 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P)
2301 #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
2303 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P)
2304 #define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch))
2307 /* Default (function) for non- multi-arch platforms. */
2308 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC)
2309 #define DEPRECATED_FRAME_SAVED_PC(fi) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_SAVED_PC"), 0)
2312 typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi);
2313 extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
2314 extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc);
2315 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC)
2316 #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
2318 #if !defined (DEPRECATED_FRAME_SAVED_PC)
2319 #define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi))
2322 extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch);
2324 typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
2325 extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame);
2326 extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc);
2328 extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch);
2330 typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
2331 extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
2332 extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
2334 /* Default (function) for non- multi-arch platforms. */
2335 #if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS)
2336 #define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
2339 typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi);
2340 extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
2341 extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address);
2342 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
2343 #error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
2345 #if !defined (FRAME_ARGS_ADDRESS)
2346 #define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
2349 /* Default (function) for non- multi-arch platforms. */
2350 #if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS)
2351 #define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
2354 typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi);
2355 extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
2356 extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address);
2357 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
2358 #error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
2360 #if !defined (FRAME_LOCALS_ADDRESS)
2361 #define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
2364 #if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2365 /* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */
2366 #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2367 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (1)
2371 /* Default predicate for non- multi-arch targets. */
2372 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2373 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (0)
2376 extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch);
2377 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2378 #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
2380 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2381 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch))
2384 /* Default (function) for non- multi-arch platforms. */
2385 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2386 #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVED_PC_AFTER_CALL"), 0)
2389 typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame);
2390 extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
2391 extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call);
2392 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2393 #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
2395 #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2396 #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame))
2399 #if defined (FRAME_NUM_ARGS)
2400 /* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */
2401 #if !defined (FRAME_NUM_ARGS_P)
2402 #define FRAME_NUM_ARGS_P() (1)
2406 /* Default predicate for non- multi-arch targets. */
2407 #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P)
2408 #define FRAME_NUM_ARGS_P() (0)
2411 extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch);
2412 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P)
2413 #error "Non multi-arch definition of FRAME_NUM_ARGS"
2415 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P)
2416 #define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch))
2419 /* Default (function) for non- multi-arch platforms. */
2420 #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS)
2421 #define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0)
2424 typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
2425 extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
2426 extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
2427 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
2428 #error "Non multi-arch definition of FRAME_NUM_ARGS"
2430 #if !defined (FRAME_NUM_ARGS)
2431 #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
2434 #if defined (STACK_ALIGN)
2435 /* Legacy for systems yet to multi-arch STACK_ALIGN */
2436 #if !defined (STACK_ALIGN_P)
2437 #define STACK_ALIGN_P() (1)
2441 /* Default predicate for non- multi-arch targets. */
2442 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P)
2443 #define STACK_ALIGN_P() (0)
2446 extern int gdbarch_stack_align_p (struct gdbarch *gdbarch);
2447 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P)
2448 #error "Non multi-arch definition of STACK_ALIGN"
2450 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P)
2451 #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch))
2454 /* Default (function) for non- multi-arch platforms. */
2455 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN)
2456 #define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0)
2459 typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp);
2460 extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp);
2461 extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align);
2462 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
2463 #error "Non multi-arch definition of STACK_ALIGN"
2465 #if !defined (STACK_ALIGN)
2466 #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
2469 extern int gdbarch_frame_align_p (struct gdbarch *gdbarch);
2471 typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address);
2472 extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address);
2473 extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align);
2475 /* NOTE: cagney/2003-03-24: This is better handled by PUSH_ARGUMENTS. */
2477 /* Default (value) for non- multi-arch platforms. */
2478 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
2479 #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (0)
2482 extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch);
2483 extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed);
2484 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
2485 #error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED"
2487 #if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
2488 #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch))
2491 #if defined (REG_STRUCT_HAS_ADDR)
2492 /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
2493 #if !defined (REG_STRUCT_HAS_ADDR_P)
2494 #define REG_STRUCT_HAS_ADDR_P() (1)
2498 /* Default predicate for non- multi-arch targets. */
2499 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P)
2500 #define REG_STRUCT_HAS_ADDR_P() (0)
2503 extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch);
2504 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P)
2505 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2507 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P)
2508 #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch))
2511 /* Default (function) for non- multi-arch platforms. */
2512 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR)
2513 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0)
2516 typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
2517 extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
2518 extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr);
2519 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
2520 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2522 #if !defined (REG_STRUCT_HAS_ADDR)
2523 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
2526 extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
2527 extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
2528 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
2529 #error "Non multi-arch definition of PARM_BOUNDARY"
2531 #if !defined (PARM_BOUNDARY)
2532 #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
2535 /* Default (value) for non- multi-arch platforms. */
2536 #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
2537 #define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch))
2540 extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
2541 extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
2542 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
2543 #error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
2545 #if !defined (TARGET_FLOAT_FORMAT)
2546 #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
2549 /* Default (value) for non- multi-arch platforms. */
2550 #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
2551 #define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2554 extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
2555 extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
2556 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
2557 #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
2559 #if !defined (TARGET_DOUBLE_FORMAT)
2560 #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
2563 /* Default (value) for non- multi-arch platforms. */
2564 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
2565 #define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2568 extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
2569 extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
2570 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
2571 #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
2573 #if !defined (TARGET_LONG_DOUBLE_FORMAT)
2574 #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
2577 /* Default (function) for non- multi-arch platforms. */
2578 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2579 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr))
2582 typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr);
2583 extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr);
2584 extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr);
2585 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
2586 #error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
2588 #if !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2589 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
2592 /* On some machines there are bits in addresses which are not really
2593 part of the address, but are used by the kernel, the hardware, etc.
2594 for special purposes. ADDR_BITS_REMOVE takes out any such bits so
2595 we get a "real" address such as one would find in a symbol table.
2596 This is used only for addresses of instructions, and even then I'm
2597 not sure it's used in all contexts. It exists to deal with there
2598 being a few stray bits in the PC which would mislead us, not as some
2599 sort of generic thing to handle alignment or segmentation (it's
2600 possible it should be in TARGET_READ_PC instead). */
2602 /* Default (function) for non- multi-arch platforms. */
2603 #if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE)
2604 #define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr))
2607 typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
2608 extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
2609 extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
2610 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
2611 #error "Non multi-arch definition of ADDR_BITS_REMOVE"
2613 #if !defined (ADDR_BITS_REMOVE)
2614 #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
2617 /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
2618 ADDR_BITS_REMOVE. */
2620 /* Default (function) for non- multi-arch platforms. */
2621 #if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS)
2622 #define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr))
2625 typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
2626 extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
2627 extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
2628 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
2629 #error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
2631 #if !defined (SMASH_TEXT_ADDRESS)
2632 #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
2635 /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
2636 the target needs software single step. An ISA method to implement it.
2638 FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
2639 using the breakpoint system instead of blatting memory directly (as with rs6000).
2641 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
2642 single step. If not, then implement single step using breakpoints. */
2644 #if defined (SOFTWARE_SINGLE_STEP)
2645 /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
2646 #if !defined (SOFTWARE_SINGLE_STEP_P)
2647 #define SOFTWARE_SINGLE_STEP_P() (1)
2651 /* Default predicate for non- multi-arch targets. */
2652 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P)
2653 #define SOFTWARE_SINGLE_STEP_P() (0)
2656 extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
2657 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
2658 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2660 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
2661 #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
2664 /* Default (function) for non- multi-arch platforms. */
2665 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP)
2666 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
2669 typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
2670 extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
2671 extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
2672 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
2673 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2675 #if !defined (SOFTWARE_SINGLE_STEP)
2676 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
2679 /* Default (function) for non- multi-arch platforms. */
2680 #if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
2681 #define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info))
2684 typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info);
2685 extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info);
2686 extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
2687 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
2688 #error "Non multi-arch definition of TARGET_PRINT_INSN"
2690 #if !defined (TARGET_PRINT_INSN)
2691 #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
2694 /* Default (function) for non- multi-arch platforms. */
2695 #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
2696 #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc))
2699 typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc);
2700 extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc);
2701 extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
2702 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
2703 #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
2705 #if !defined (SKIP_TRAMPOLINE_CODE)
2706 #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
2709 /* For SVR4 shared libraries, each call goes through a small piece of
2710 trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
2711 to nonzero if we are currently stopped in one of these. */
2713 /* Default (function) for non- multi-arch platforms. */
2714 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
2715 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name))
2718 typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name);
2719 extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2720 extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline);
2721 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
2722 #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
2724 #if !defined (IN_SOLIB_CALL_TRAMPOLINE)
2725 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
2728 /* Some systems also have trampoline code for returning from shared libs. */
2730 /* Default (function) for non- multi-arch platforms. */
2731 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2732 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name))
2735 typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
2736 extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2737 extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
2738 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
2739 #error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
2741 #if !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2742 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
2745 /* Sigtramp is a routine that the kernel calls (which then calls the
2746 signal handler). On most machines it is a library routine that is
2747 linked into the executable.
2749 This macro, given a program counter value and the name of the
2750 function in which that PC resides (which can be null if the name is
2751 not known), returns nonzero if the PC and name show that we are in
2754 On most machines just see if the name is sigtramp (and if we have
2755 no name, assume we are not in sigtramp).
2757 FIXME: cagney/2002-04-21: The function find_pc_partial_function
2758 calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
2759 This means PC_IN_SIGTRAMP function can't be implemented by doing its
2760 own local NAME lookup.
2762 FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
2763 Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
2766 /* Default (function) for non- multi-arch platforms. */
2767 #if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP)
2768 #define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name))
2771 typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
2772 extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2773 extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
2774 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
2775 #error "Non multi-arch definition of PC_IN_SIGTRAMP"
2777 #if !defined (PC_IN_SIGTRAMP)
2778 #define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
2781 #if defined (SIGTRAMP_START)
2782 /* Legacy for systems yet to multi-arch SIGTRAMP_START */
2783 #if !defined (SIGTRAMP_START_P)
2784 #define SIGTRAMP_START_P() (1)
2788 /* Default predicate for non- multi-arch targets. */
2789 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START_P)
2790 #define SIGTRAMP_START_P() (0)
2793 extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch);
2794 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P)
2795 #error "Non multi-arch definition of SIGTRAMP_START"
2797 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P)
2798 #define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch))
2801 /* Default (function) for non- multi-arch platforms. */
2802 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START)
2803 #define SIGTRAMP_START(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_START"), 0)
2806 typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc);
2807 extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc);
2808 extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start);
2809 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START)
2810 #error "Non multi-arch definition of SIGTRAMP_START"
2812 #if !defined (SIGTRAMP_START)
2813 #define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc))
2816 #if defined (SIGTRAMP_END)
2817 /* Legacy for systems yet to multi-arch SIGTRAMP_END */
2818 #if !defined (SIGTRAMP_END_P)
2819 #define SIGTRAMP_END_P() (1)
2823 /* Default predicate for non- multi-arch targets. */
2824 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END_P)
2825 #define SIGTRAMP_END_P() (0)
2828 extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch);
2829 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P)
2830 #error "Non multi-arch definition of SIGTRAMP_END"
2832 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P)
2833 #define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch))
2836 /* Default (function) for non- multi-arch platforms. */
2837 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END)
2838 #define SIGTRAMP_END(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_END"), 0)
2841 typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc);
2842 extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc);
2843 extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end);
2844 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END)
2845 #error "Non multi-arch definition of SIGTRAMP_END"
2847 #if !defined (SIGTRAMP_END)
2848 #define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc))
2851 /* A target might have problems with watchpoints as soon as the stack
2852 frame of the current function has been destroyed. This mostly happens
2853 as the first action in a funtion's epilogue. in_function_epilogue_p()
2854 is defined to return a non-zero value if either the given addr is one
2855 instruction after the stack destroying instruction up to the trailing
2856 return instruction or if we can figure out that the stack frame has
2857 already been invalidated regardless of the value of addr. Targets
2858 which don't suffer from that problem could just let this functionality
2861 typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
2862 extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
2863 extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
2865 /* Given a vector of command-line arguments, return a newly allocated
2866 string which, when passed to the create_inferior function, will be
2867 parsed (on Unix systems, by the shell) to yield the same vector.
2868 This function should call error() if the argument vector is not
2869 representable for this target or if this target does not support
2870 command-line arguments.
2871 ARGC is the number of elements in the vector.
2872 ARGV is an array of strings, one per argument. */
2874 typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv);
2875 extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv);
2876 extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments);
2878 #if defined (DWARF2_BUILD_FRAME_INFO)
2879 /* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */
2880 #if !defined (DWARF2_BUILD_FRAME_INFO_P)
2881 #define DWARF2_BUILD_FRAME_INFO_P() (1)
2885 /* Default predicate for non- multi-arch targets. */
2886 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P)
2887 #define DWARF2_BUILD_FRAME_INFO_P() (0)
2890 extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch);
2891 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P)
2892 #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
2894 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P)
2895 #define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch))
2898 /* Default (function) for non- multi-arch platforms. */
2899 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO)
2900 #define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0)
2903 typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile);
2904 extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile);
2905 extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info);
2906 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO)
2907 #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
2909 #if !defined (DWARF2_BUILD_FRAME_INFO)
2910 #define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile))
2913 /* Default (function) for non- multi-arch platforms. */
2914 #if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2915 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym))
2918 typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym);
2919 extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym);
2920 extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special);
2921 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
2922 #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
2924 #if !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2925 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
2928 /* Default (function) for non- multi-arch platforms. */
2929 #if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2930 #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym))
2933 typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym);
2934 extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
2935 extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
2936 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
2937 #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
2939 #if !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2940 #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
2943 /* Default (value) for non- multi-arch platforms. */
2944 #if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC)
2945 #define NAME_OF_MALLOC ("malloc")
2948 extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch);
2949 extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc);
2950 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
2951 #error "Non multi-arch definition of NAME_OF_MALLOC"
2953 #if !defined (NAME_OF_MALLOC)
2954 #define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch))
2957 /* Default (value) for non- multi-arch platforms. */
2958 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
2959 #define CANNOT_STEP_BREAKPOINT (0)
2962 extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
2963 extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
2964 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
2965 #error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
2967 #if !defined (CANNOT_STEP_BREAKPOINT)
2968 #define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
2971 /* Default (value) for non- multi-arch platforms. */
2972 #if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2973 #define HAVE_NONSTEPPABLE_WATCHPOINT (0)
2976 extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
2977 extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
2978 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2979 #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
2981 #if !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2982 #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
2985 #if defined (ADDRESS_CLASS_TYPE_FLAGS)
2986 /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
2987 #if !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2988 #define ADDRESS_CLASS_TYPE_FLAGS_P() (1)
2992 /* Default predicate for non- multi-arch targets. */
2993 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2994 #define ADDRESS_CLASS_TYPE_FLAGS_P() (0)
2997 extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch);
2998 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2999 #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
3001 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
3002 #define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch))
3005 /* Default (function) for non- multi-arch platforms. */
3006 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS)
3007 #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0)
3010 typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class);
3011 extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class);
3012 extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags);
3013 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
3014 #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
3016 #if !defined (ADDRESS_CLASS_TYPE_FLAGS)
3017 #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
3020 extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
3022 typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
3023 extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
3024 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);
3026 extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);
3028 typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
3029 extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
3030 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);
3032 /* Is a register in a group */
3034 typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
3035 extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
3036 extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
3038 /* Fetch the pointer to the ith function argument. */
3040 #if defined (FETCH_POINTER_ARGUMENT)
3041 /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */
3042 #if !defined (FETCH_POINTER_ARGUMENT_P)
3043 #define FETCH_POINTER_ARGUMENT_P() (1)
3047 /* Default predicate for non- multi-arch targets. */
3048 #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P)
3049 #define FETCH_POINTER_ARGUMENT_P() (0)
3052 extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch);
3053 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P)
3054 #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
3056 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P)
3057 #define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch))
3060 /* Default (function) for non- multi-arch platforms. */
3061 #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT)
3062 #define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0)
3065 typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type);
3066 extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type);
3067 extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument);
3068 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT)
3069 #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
3071 #if !defined (FETCH_POINTER_ARGUMENT)
3072 #define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type))
3075 extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
3078 /* Mechanism for co-ordinating the selection of a specific
3081 GDB targets (*-tdep.c) can register an interest in a specific
3082 architecture. Other GDB components can register a need to maintain
3083 per-architecture data.
3085 The mechanisms below ensures that there is only a loose connection
3086 between the set-architecture command and the various GDB
3087 components. Each component can independently register their need
3088 to maintain architecture specific data with gdbarch.
3092 Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It
3095 The more traditional mega-struct containing architecture specific
3096 data for all the various GDB components was also considered. Since
3097 GDB is built from a variable number of (fairly independent)
3098 components it was determined that the global aproach was not
3102 /* Register a new architectural family with GDB.
3104 Register support for the specified ARCHITECTURE with GDB. When
3105 gdbarch determines that the specified architecture has been
3106 selected, the corresponding INIT function is called.
3110 The INIT function takes two parameters: INFO which contains the
3111 information available to gdbarch about the (possibly new)
3112 architecture; ARCHES which is a list of the previously created
3113 ``struct gdbarch'' for this architecture.
3115 The INFO parameter is, as far as possible, be pre-initialized with
3116 information obtained from INFO.ABFD or the previously selected
3119 The ARCHES parameter is a linked list (sorted most recently used)
3120 of all the previously created architures for this architecture
3121 family. The (possibly NULL) ARCHES->gdbarch can used to access
3122 values from the previously selected architecture for this
3123 architecture family. The global ``current_gdbarch'' shall not be
3126 The INIT function shall return any of: NULL - indicating that it
3127 doesn't recognize the selected architecture; an existing ``struct
3128 gdbarch'' from the ARCHES list - indicating that the new
3129 architecture is just a synonym for an earlier architecture (see
3130 gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch''
3131 - that describes the selected architecture (see gdbarch_alloc()).
3133 The DUMP_TDEP function shall print out all target specific values.
3134 Care should be taken to ensure that the function works in both the
3135 multi-arch and non- multi-arch cases. */
3139 struct gdbarch *gdbarch;
3140 struct gdbarch_list *next;
3145 /* Use default: NULL (ZERO). */
3146 const struct bfd_arch_info *bfd_arch_info;
3148 /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */
3151 /* Use default: NULL (ZERO). */
3154 /* Use default: NULL (ZERO). */
3155 struct gdbarch_tdep_info *tdep_info;
3157 /* Use default: GDB_OSABI_UNINITIALIZED (-1). */
3158 enum gdb_osabi osabi;
3161 typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
3162 typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file);
3164 /* DEPRECATED - use gdbarch_register() */
3165 extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *);
3167 extern void gdbarch_register (enum bfd_architecture architecture,
3168 gdbarch_init_ftype *,
3169 gdbarch_dump_tdep_ftype *);
3172 /* Return a freshly allocated, NULL terminated, array of the valid
3173 architecture names. Since architectures are registered during the
3174 _initialize phase this function only returns useful information
3175 once initialization has been completed. */
3177 extern const char **gdbarch_printable_names (void);
3180 /* Helper function. Search the list of ARCHES for a GDBARCH that
3181 matches the information provided by INFO. */
3183 extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info);
3186 /* Helper function. Create a preliminary ``struct gdbarch''. Perform
3187 basic initialization using values obtained from the INFO andTDEP
3188 parameters. set_gdbarch_*() functions are called to complete the
3189 initialization of the object. */
3191 extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
3194 /* Helper function. Free a partially-constructed ``struct gdbarch''.
3195 It is assumed that the caller freeds the ``struct
3198 extern void gdbarch_free (struct gdbarch *);
3201 /* Helper function. Force an update of the current architecture.
3203 The actual architecture selected is determined by INFO, ``(gdb) set
3204 architecture'' et.al., the existing architecture and BFD's default
3205 architecture. INFO should be initialized to zero and then selected
3206 fields should be updated.
3208 Returns non-zero if the update succeeds */
3210 extern int gdbarch_update_p (struct gdbarch_info info);
3214 /* Register per-architecture data-pointer.
3216 Reserve space for a per-architecture data-pointer. An identifier
3217 for the reserved data-pointer is returned. That identifer should
3218 be saved in a local static variable.
3220 The per-architecture data-pointer is either initialized explicitly
3221 (set_gdbarch_data()) or implicitly (by INIT() via a call to
3222 gdbarch_data()). FREE() is called to delete either an existing
3223 data-pointer overridden by set_gdbarch_data() or when the
3224 architecture object is being deleted.
3226 When a previously created architecture is re-selected, the
3227 per-architecture data-pointer for that previous architecture is
3228 restored. INIT() is not re-called.
3230 Multiple registrarants for any architecture are allowed (and
3231 strongly encouraged). */
3233 struct gdbarch_data;
3235 typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
3236 typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
3238 extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
3239 gdbarch_data_free_ftype *free);
3240 extern void set_gdbarch_data (struct gdbarch *gdbarch,
3241 struct gdbarch_data *data,
3244 extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
3247 /* Register per-architecture memory region.
3249 Provide a memory-region swap mechanism. Per-architecture memory
3250 region are created. These memory regions are swapped whenever the
3251 architecture is changed. For a new architecture, the memory region
3252 is initialized with zero (0) and the INIT function is called.
3254 Memory regions are swapped / initialized in the order that they are
3255 registered. NULL DATA and/or INIT values can be specified.
3257 New code should use register_gdbarch_data(). */
3259 typedef void (gdbarch_swap_ftype) (void);
3260 extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init);
3261 #define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
3265 /* The target-system-dependent byte order is dynamic */
3267 extern int target_byte_order;
3268 #ifndef TARGET_BYTE_ORDER
3269 #define TARGET_BYTE_ORDER (target_byte_order + 0)
3272 extern int target_byte_order_auto;
3273 #ifndef TARGET_BYTE_ORDER_AUTO
3274 #define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
3279 /* The target-system-dependent BFD architecture is dynamic */
3281 extern int target_architecture_auto;
3282 #ifndef TARGET_ARCHITECTURE_AUTO
3283 #define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
3286 extern const struct bfd_arch_info *target_architecture;
3287 #ifndef TARGET_ARCHITECTURE
3288 #define TARGET_ARCHITECTURE (target_architecture + 0)
3292 /* The target-system-dependent disassembler is semi-dynamic */
3294 /* Use gdb_disassemble, and gdbarch_print_insn instead. */
3295 extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*);
3297 /* Use set_gdbarch_print_insn instead. */
3298 extern disassemble_info deprecated_tm_print_insn_info;
3300 /* Set the dynamic target-system-dependent parameters (architecture,
3301 byte-order, ...) using information found in the BFD */
3303 extern void set_gdbarch_from_file (bfd *);
3306 /* Initialize the current architecture to the "first" one we find on
3309 extern void initialize_current_architecture (void);
3311 /* For non-multiarched targets, do any initialization of the default
3312 gdbarch object necessary after the _initialize_MODULE functions
3314 extern void initialize_non_multiarch (void);
3316 /* gdbarch trace variable */
3317 extern int gdbarch_debug;
3319 extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file);