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 /* This is simply not needed. See value_of_builtin_frame_fp_reg and
337 call_function_by_hand. */
339 #if defined (DEPRECATED_TARGET_READ_FP)
340 /* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
341 #if !defined (DEPRECATED_TARGET_READ_FP_P)
342 #define DEPRECATED_TARGET_READ_FP_P() (1)
346 /* Default predicate for non- multi-arch targets. */
347 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P)
348 #define DEPRECATED_TARGET_READ_FP_P() (0)
351 extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
352 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
353 #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
355 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
356 #define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
359 /* Default (function) for non- multi-arch platforms. */
360 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP)
361 #define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0)
364 typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
365 extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
366 extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
367 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP)
368 #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
370 #if !defined (DEPRECATED_TARGET_READ_FP)
371 #define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
374 /* UNWIND_SP is a direct replacement for TARGET_READ_SP. */
376 #if defined (TARGET_READ_SP)
377 /* Legacy for systems yet to multi-arch TARGET_READ_SP */
378 #if !defined (TARGET_READ_SP_P)
379 #define TARGET_READ_SP_P() (1)
383 /* Default predicate for non- multi-arch targets. */
384 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP_P)
385 #define TARGET_READ_SP_P() (0)
388 extern int gdbarch_read_sp_p (struct gdbarch *gdbarch);
389 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP_P)
390 #error "Non multi-arch definition of TARGET_READ_SP"
392 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP_P)
393 #define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch))
396 /* Default (function) for non- multi-arch platforms. */
397 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP)
398 #define TARGET_READ_SP() (internal_error (__FILE__, __LINE__, "TARGET_READ_SP"), 0)
401 typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
402 extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch);
403 extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp);
404 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
405 #error "Non multi-arch definition of TARGET_READ_SP"
407 #if !defined (TARGET_READ_SP)
408 #define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
411 /* The dummy call frame SP should be set by push_dummy_call. */
413 #if defined (DEPRECATED_DUMMY_WRITE_SP)
414 /* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
415 #if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
416 #define DEPRECATED_DUMMY_WRITE_SP_P() (1)
420 /* Default predicate for non- multi-arch targets. */
421 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P)
422 #define DEPRECATED_DUMMY_WRITE_SP_P() (0)
425 extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
426 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
427 #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
429 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
430 #define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
433 /* Default (function) for non- multi-arch platforms. */
434 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP)
435 #define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0)
438 typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
439 extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
440 extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
441 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP)
442 #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
444 #if !defined (DEPRECATED_DUMMY_WRITE_SP)
445 #define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
448 /* Function for getting target's idea of a frame pointer. FIXME: GDB's
449 whole scheme for dealing with "frames" and "frame pointers" needs a
450 serious shakedown. */
452 /* Default (function) for non- multi-arch platforms. */
453 #if (!GDB_MULTI_ARCH) && !defined (TARGET_VIRTUAL_FRAME_POINTER)
454 #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (legacy_virtual_frame_pointer (pc, frame_regnum, frame_offset))
457 typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
458 extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
459 extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer);
460 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER)
461 #error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
463 #if !defined (TARGET_VIRTUAL_FRAME_POINTER)
464 #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset))
467 extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
469 typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
470 extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
471 extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read);
473 extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
475 typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
476 extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
477 extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
479 extern int gdbarch_num_regs (struct gdbarch *gdbarch);
480 extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
481 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
482 #error "Non multi-arch definition of NUM_REGS"
484 #if !defined (NUM_REGS)
485 #define NUM_REGS (gdbarch_num_regs (current_gdbarch))
488 /* This macro gives the number of pseudo-registers that live in the
489 register namespace but do not get fetched or stored on the target.
490 These pseudo-registers may be aliases for other registers,
491 combinations of other registers, or they may be computed by GDB. */
493 /* Default (value) for non- multi-arch platforms. */
494 #if (!GDB_MULTI_ARCH) && !defined (NUM_PSEUDO_REGS)
495 #define NUM_PSEUDO_REGS (0)
498 extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch);
499 extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs);
500 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
501 #error "Non multi-arch definition of NUM_PSEUDO_REGS"
503 #if !defined (NUM_PSEUDO_REGS)
504 #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
507 /* GDB's standard (or well known) register numbers. These can map onto
508 a real register or a pseudo (computed) register or not be defined at
510 SP_REGNUM will hopefully be replaced by UNWIND_SP. */
512 /* Default (value) for non- multi-arch platforms. */
513 #if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM)
514 #define SP_REGNUM (-1)
517 extern int gdbarch_sp_regnum (struct gdbarch *gdbarch);
518 extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
519 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
520 #error "Non multi-arch definition of SP_REGNUM"
522 #if !defined (SP_REGNUM)
523 #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
526 /* This is simply not needed. See value_of_builtin_frame_fp_reg and
527 call_function_by_hand. */
529 /* Default (value) for non- multi-arch platforms. */
530 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM)
531 #define DEPRECATED_FP_REGNUM (-1)
534 extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
535 extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
536 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
537 #error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
539 #if !defined (DEPRECATED_FP_REGNUM)
540 #define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
543 /* Default (value) for non- multi-arch platforms. */
544 #if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM)
545 #define PC_REGNUM (-1)
548 extern int gdbarch_pc_regnum (struct gdbarch *gdbarch);
549 extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
550 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
551 #error "Non multi-arch definition of PC_REGNUM"
553 #if !defined (PC_REGNUM)
554 #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
557 /* Default (value) for non- multi-arch platforms. */
558 #if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM)
559 #define PS_REGNUM (-1)
562 extern int gdbarch_ps_regnum (struct gdbarch *gdbarch);
563 extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
564 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM)
565 #error "Non multi-arch definition of PS_REGNUM"
567 #if !defined (PS_REGNUM)
568 #define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch))
571 /* Default (value) for non- multi-arch platforms. */
572 #if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM)
573 #define FP0_REGNUM (-1)
576 extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch);
577 extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
578 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
579 #error "Non multi-arch definition of FP0_REGNUM"
581 #if !defined (FP0_REGNUM)
582 #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
585 /* Default (value) for non- multi-arch platforms. */
586 #if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM)
587 #define NPC_REGNUM (-1)
590 extern int gdbarch_npc_regnum (struct gdbarch *gdbarch);
591 extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
592 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
593 #error "Non multi-arch definition of NPC_REGNUM"
595 #if !defined (NPC_REGNUM)
596 #define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
599 /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
601 /* Default (function) for non- multi-arch platforms. */
602 #if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM)
603 #define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr))
606 typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
607 extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr);
608 extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum);
609 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
610 #error "Non multi-arch definition of STAB_REG_TO_REGNUM"
612 #if !defined (STAB_REG_TO_REGNUM)
613 #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
616 /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
618 /* Default (function) for non- multi-arch platforms. */
619 #if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM)
620 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr))
623 typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr);
624 extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr);
625 extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum);
626 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
627 #error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
629 #if !defined (ECOFF_REG_TO_REGNUM)
630 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
633 /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
635 /* Default (function) for non- multi-arch platforms. */
636 #if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM)
637 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr))
640 typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr);
641 extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr);
642 extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum);
643 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
644 #error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
646 #if !defined (DWARF_REG_TO_REGNUM)
647 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
650 /* Convert from an sdb register number to an internal gdb register number.
651 This should be defined in tm.h, if REGISTER_NAMES is not set up
652 to map one to one onto the sdb register numbers. */
654 /* Default (function) for non- multi-arch platforms. */
655 #if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM)
656 #define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr))
659 typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
660 extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
661 extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
662 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
663 #error "Non multi-arch definition of SDB_REG_TO_REGNUM"
665 #if !defined (SDB_REG_TO_REGNUM)
666 #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
669 /* Default (function) for non- multi-arch platforms. */
670 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
671 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr))
674 typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr);
675 extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
676 extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum);
677 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
678 #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
680 #if !defined (DWARF2_REG_TO_REGNUM)
681 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
684 /* Default (function) for non- multi-arch platforms. */
685 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
686 #define REGISTER_NAME(regnr) (legacy_register_name (regnr))
689 typedef const char * (gdbarch_register_name_ftype) (int regnr);
690 extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
691 extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
692 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
693 #error "Non multi-arch definition of REGISTER_NAME"
695 #if !defined (REGISTER_NAME)
696 #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
699 /* See the dummy frame code. */
701 extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch);
702 extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size);
703 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE)
704 #error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE"
706 #if !defined (DEPRECATED_REGISTER_SIZE)
707 #define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch))
710 /* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
712 extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
714 typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr);
715 extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
716 extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
718 /* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
720 #if defined (REGISTER_VIRTUAL_TYPE)
721 /* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
722 #if !defined (REGISTER_VIRTUAL_TYPE_P)
723 #define REGISTER_VIRTUAL_TYPE_P() (1)
727 /* Default predicate for non- multi-arch targets. */
728 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P)
729 #define REGISTER_VIRTUAL_TYPE_P() (0)
732 extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch);
733 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P)
734 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
736 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P)
737 #define REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch))
740 /* Default (function) for non- multi-arch platforms. */
741 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE)
742 #define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0)
745 typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr);
746 extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
747 extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type);
748 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
749 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
751 #if !defined (REGISTER_VIRTUAL_TYPE)
752 #define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr))
755 /* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
756 from REGISTER_TYPE. */
758 extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch);
759 extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes);
760 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES)
761 #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES"
763 #if !defined (DEPRECATED_REGISTER_BYTES)
764 #define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
767 /* DEPRECATED_REGISTER_BYTE can be deleted. The value is computed from
768 REGISTER_TYPE. NOTE: cagney/2002-05-02: This function with
769 predicate has a valid (callable) initial value. As a consequence,
770 even when the predicate is false, the corresponding function works.
771 This simplifies the migration process - old code, calling
772 DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
774 #if defined (REGISTER_BYTE)
775 /* Legacy for systems yet to multi-arch REGISTER_BYTE */
776 #if !defined (REGISTER_BYTE_P)
777 #define REGISTER_BYTE_P() (1)
781 /* Default predicate for non- multi-arch targets. */
782 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE_P)
783 #define REGISTER_BYTE_P() (0)
786 extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
787 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P)
788 #error "Non multi-arch definition of REGISTER_BYTE"
790 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P)
791 #define REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
794 /* Default (function) for non- multi-arch platforms. */
795 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE)
796 #define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
799 typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr);
800 extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr);
801 extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte);
802 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
803 #error "Non multi-arch definition of REGISTER_BYTE"
805 #if !defined (REGISTER_BYTE)
806 #define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
809 /* DEPRECATED_REGISTER_RAW_SIZE can be deleted. The value is computed
810 from REGISTER_TYPE. */
812 /* Default (function) for non- multi-arch platforms. */
813 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
814 #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
817 typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr);
818 extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
819 extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size);
820 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
821 #error "Non multi-arch definition of REGISTER_RAW_SIZE"
823 #if !defined (REGISTER_RAW_SIZE)
824 #define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
827 /* DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. The value is
828 computed from REGISTER_TYPE. */
830 /* Default (function) for non- multi-arch platforms. */
831 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
832 #define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
835 typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr);
836 extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
837 extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size);
838 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
839 #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
841 #if !defined (REGISTER_VIRTUAL_SIZE)
842 #define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr))
845 /* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
846 replaced by the constant MAX_REGISTER_SIZE. */
848 #if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
849 /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */
850 #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
851 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1)
855 /* Default predicate for non- multi-arch targets. */
856 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
857 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (0)
860 extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch);
861 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
862 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
864 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P)
865 #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch))
868 /* Default (value) for non- multi-arch platforms. */
869 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
870 #define DEPRECATED_MAX_REGISTER_RAW_SIZE (0)
873 extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch);
874 extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size);
875 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
876 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
878 #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
879 #define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch))
882 /* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been
883 replaced by the constant MAX_REGISTER_SIZE. */
885 #if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
886 /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */
887 #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
888 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1)
892 /* Default predicate for non- multi-arch targets. */
893 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
894 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (0)
897 extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch);
898 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
899 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
901 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P)
902 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch))
905 /* Default (value) for non- multi-arch platforms. */
906 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
907 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (0)
910 extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch);
911 extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size);
912 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
913 #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
915 #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
916 #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
919 #if defined (DEPRECATED_DO_REGISTERS_INFO)
920 /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
921 #if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
922 #define DEPRECATED_DO_REGISTERS_INFO_P() (1)
926 /* Default predicate for non- multi-arch targets. */
927 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
928 #define DEPRECATED_DO_REGISTERS_INFO_P() (0)
931 extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
932 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
933 #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
935 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
936 #define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
939 /* Default (function) for non- multi-arch platforms. */
940 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO)
941 #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0)
944 typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
945 extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
946 extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
947 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO)
948 #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
950 #if !defined (DEPRECATED_DO_REGISTERS_INFO)
951 #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
954 typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
955 extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
956 extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
958 extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
960 typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
961 extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
962 extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
964 extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
966 typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
967 extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
968 extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
970 /* MAP a GDB RAW register number onto a simulator register number. See
971 also include/...-sim.h. */
973 /* Default (function) for non- multi-arch platforms. */
974 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
975 #define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
978 typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
979 extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
980 extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
981 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
982 #error "Non multi-arch definition of REGISTER_SIM_REGNO"
984 #if !defined (REGISTER_SIM_REGNO)
985 #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
988 #if defined (REGISTER_BYTES_OK)
989 /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
990 #if !defined (REGISTER_BYTES_OK_P)
991 #define REGISTER_BYTES_OK_P() (1)
995 /* Default predicate for non- multi-arch targets. */
996 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
997 #define REGISTER_BYTES_OK_P() (0)
1000 extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
1001 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
1002 #error "Non multi-arch definition of REGISTER_BYTES_OK"
1004 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
1005 #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
1008 /* Default (function) for non- multi-arch platforms. */
1009 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
1010 #define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
1013 typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
1014 extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
1015 extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
1016 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
1017 #error "Non multi-arch definition of REGISTER_BYTES_OK"
1019 #if !defined (REGISTER_BYTES_OK)
1020 #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
1023 /* Default (function) for non- multi-arch platforms. */
1024 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
1025 #define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
1028 typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
1029 extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
1030 extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
1031 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
1032 #error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
1034 #if !defined (CANNOT_FETCH_REGISTER)
1035 #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
1038 /* Default (function) for non- multi-arch platforms. */
1039 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
1040 #define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
1043 typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
1044 extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
1045 extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
1046 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
1047 #error "Non multi-arch definition of CANNOT_STORE_REGISTER"
1049 #if !defined (CANNOT_STORE_REGISTER)
1050 #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
1053 /* setjmp/longjmp support. */
1055 #if defined (GET_LONGJMP_TARGET)
1056 /* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */
1057 #if !defined (GET_LONGJMP_TARGET_P)
1058 #define GET_LONGJMP_TARGET_P() (1)
1062 /* Default predicate for non- multi-arch targets. */
1063 #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P)
1064 #define GET_LONGJMP_TARGET_P() (0)
1067 extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
1068 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
1069 #error "Non multi-arch definition of GET_LONGJMP_TARGET"
1071 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
1072 #define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
1075 /* Default (function) for non- multi-arch platforms. */
1076 #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET)
1077 #define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0)
1080 typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
1081 extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
1082 extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
1083 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
1084 #error "Non multi-arch definition of GET_LONGJMP_TARGET"
1086 #if !defined (GET_LONGJMP_TARGET)
1087 #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
1090 /* Non multi-arch DUMMY_FRAMES are a mess (multi-arch ones are not that
1091 much better but at least they are vaguely consistent). The headers
1092 and body contain convoluted #if/#else sequences for determine how
1093 things should be compiled. Instead of trying to mimic that
1094 behaviour here (and hence entrench it further) gdbarch simply
1095 reqires that these methods be set up from the word go. This also
1096 avoids any potential problems with moving beyond multi-arch partial. */
1098 /* Default (value) for non- multi-arch platforms. */
1099 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1100 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (1)
1103 extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch);
1104 extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames);
1105 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1106 #error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES"
1108 #if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
1109 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch))
1112 /* Replaced by push_dummy_code. */
1114 /* Default (value) for non- multi-arch platforms. */
1115 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_LOCATION)
1116 #define CALL_DUMMY_LOCATION (AT_ENTRY_POINT)
1119 extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
1120 extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
1121 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
1122 #error "Non multi-arch definition of CALL_DUMMY_LOCATION"
1124 #if !defined (CALL_DUMMY_LOCATION)
1125 #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
1128 /* Replaced by push_dummy_code. */
1130 /* Default (function) for non- multi-arch platforms. */
1131 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS)
1132 #define CALL_DUMMY_ADDRESS() (entry_point_address ())
1135 typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
1136 extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
1137 extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
1138 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
1139 #error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
1141 #if !defined (CALL_DUMMY_ADDRESS)
1142 #define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
1145 /* Replaced by push_dummy_code. */
1147 extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch);
1148 extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset);
1149 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
1150 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET"
1152 #if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET)
1153 #define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch))
1156 /* Replaced by push_dummy_code. */
1158 extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
1159 extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset);
1160 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
1161 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET"
1163 #if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)
1164 #define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch))
1167 /* Replaced by push_dummy_code. */
1169 extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch);
1170 extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length);
1171 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH)
1172 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH"
1174 #if !defined (DEPRECATED_CALL_DUMMY_LENGTH)
1175 #define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch))
1178 /* NOTE: cagney/2002-11-24: This function with predicate has a valid
1179 (callable) initial value. As a consequence, even when the predicate
1180 is false, the corresponding function works. This simplifies the
1181 migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
1182 doesn't need to be modified. */
1184 #if defined (DEPRECATED_PC_IN_CALL_DUMMY)
1185 /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
1186 #if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1187 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
1191 /* Default predicate for non- multi-arch targets. */
1192 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1193 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (0)
1196 extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
1197 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1198 #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1200 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1201 #define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
1204 /* Default (function) for non- multi-arch platforms. */
1205 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1206 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
1209 typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1210 extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1211 extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
1212 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY)
1213 #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1215 #if !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1216 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
1219 /* Replaced by push_dummy_code. */
1221 /* Default (value) for non- multi-arch platforms. */
1222 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_WORDS)
1223 #define DEPRECATED_CALL_DUMMY_WORDS (legacy_call_dummy_words)
1226 extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch);
1227 extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words);
1228 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS)
1229 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS"
1231 #if !defined (DEPRECATED_CALL_DUMMY_WORDS)
1232 #define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch))
1235 /* Replaced by push_dummy_code. */
1237 /* Default (value) for non- multi-arch platforms. */
1238 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1239 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words)
1242 extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch);
1243 extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words);
1244 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1245 #error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS"
1247 #if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
1248 #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch))
1251 /* Replaced by push_dummy_code. */
1253 #if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1254 /* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_STACK_ADJUST */
1255 #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1256 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (1)
1260 /* Default predicate for non- multi-arch targets. */
1261 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1262 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (0)
1265 extern int gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch);
1266 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1267 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
1269 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P)
1270 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (gdbarch_deprecated_call_dummy_stack_adjust_p (current_gdbarch))
1273 /* Default (value) for non- multi-arch platforms. */
1274 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1275 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (0)
1278 extern int gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch);
1279 extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch, int deprecated_call_dummy_stack_adjust);
1280 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1281 #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
1283 #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
1284 #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (gdbarch_deprecated_call_dummy_stack_adjust (current_gdbarch))
1287 /* Replaced by push_dummy_code. */
1289 #if defined (DEPRECATED_FIX_CALL_DUMMY)
1290 /* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */
1291 #if !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1292 #define DEPRECATED_FIX_CALL_DUMMY_P() (1)
1296 /* Default predicate for non- multi-arch targets. */
1297 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1298 #define DEPRECATED_FIX_CALL_DUMMY_P() (0)
1301 extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch);
1302 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P)
1303 #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
1305 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P)
1306 #define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch))
1309 /* Default (function) for non- multi-arch platforms. */
1310 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY)
1311 #define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "DEPRECATED_FIX_CALL_DUMMY"), 0)
1314 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);
1315 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);
1316 extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy);
1317 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY)
1318 #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
1320 #if !defined (DEPRECATED_FIX_CALL_DUMMY)
1321 #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))
1324 /* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */
1326 extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
1328 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);
1329 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);
1330 extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
1332 #if defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1333 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */
1334 #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1335 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1)
1339 /* Default predicate for non- multi-arch targets. */
1340 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1341 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (0)
1344 extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch);
1345 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1346 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1348 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1349 #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch))
1352 /* Default (function) for non- multi-arch platforms. */
1353 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1354 #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC_FIRST"), 0)
1357 typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
1358 extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1359 extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first);
1360 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1361 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1363 #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1364 #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev))
1367 #if defined (DEPRECATED_INIT_FRAME_PC)
1368 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
1369 #if !defined (DEPRECATED_INIT_FRAME_PC_P)
1370 #define DEPRECATED_INIT_FRAME_PC_P() (1)
1374 /* Default predicate for non- multi-arch targets. */
1375 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_P)
1376 #define DEPRECATED_INIT_FRAME_PC_P() (0)
1379 extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch);
1380 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P)
1381 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1383 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P)
1384 #define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch))
1387 /* Default (function) for non- multi-arch platforms. */
1388 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC)
1389 #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC"), 0)
1392 typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev);
1393 extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1394 extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc);
1395 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC)
1396 #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1398 #if !defined (DEPRECATED_INIT_FRAME_PC)
1399 #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev))
1402 extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
1403 extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
1404 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
1405 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
1407 #if !defined (BELIEVE_PCC_PROMOTION)
1408 #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
1411 extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
1412 extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
1413 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
1414 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
1416 #if !defined (BELIEVE_PCC_PROMOTION_TYPE)
1417 #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
1420 #if defined (DEPRECATED_GET_SAVED_REGISTER)
1421 /* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */
1422 #if !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1423 #define DEPRECATED_GET_SAVED_REGISTER_P() (1)
1427 /* Default predicate for non- multi-arch targets. */
1428 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1429 #define DEPRECATED_GET_SAVED_REGISTER_P() (0)
1432 extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch);
1433 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P)
1434 #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
1436 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P)
1437 #define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch))
1440 /* Default (function) for non- multi-arch platforms. */
1441 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER)
1442 #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "DEPRECATED_GET_SAVED_REGISTER"), 0)
1445 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);
1446 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);
1447 extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register);
1448 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER)
1449 #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
1451 #if !defined (DEPRECATED_GET_SAVED_REGISTER)
1452 #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))
1455 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1456 For raw <-> cooked register conversions, replaced by pseudo registers. */
1458 /* Default (function) for non- multi-arch platforms. */
1459 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERTIBLE)
1460 #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (deprecated_register_convertible_not (nr))
1463 typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr);
1464 extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr);
1465 extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible);
1466 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE)
1467 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
1469 #if !defined (DEPRECATED_REGISTER_CONVERTIBLE)
1470 #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr))
1473 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1474 For raw <-> cooked register conversions, replaced by pseudo registers. */
1476 /* Default (function) for non- multi-arch platforms. */
1477 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1478 #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"), 0)
1481 typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
1482 extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
1483 extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual);
1484 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1485 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"
1487 #if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
1488 #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
1491 /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
1492 For raw <-> cooked register conversions, replaced by pseudo registers. */
1494 /* Default (function) for non- multi-arch platforms. */
1495 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1496 #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_RAW"), 0)
1499 typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to);
1500 extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to);
1501 extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw);
1502 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1503 #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW"
1505 #if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
1506 #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
1509 /* Default (function) for non- multi-arch platforms. */
1510 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P)
1511 #define CONVERT_REGISTER_P(regnum) (legacy_convert_register_p (regnum))
1514 typedef int (gdbarch_convert_register_p_ftype) (int regnum);
1515 extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum);
1516 extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
1517 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
1518 #error "Non multi-arch definition of CONVERT_REGISTER_P"
1520 #if !defined (CONVERT_REGISTER_P)
1521 #define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum))
1524 /* Default (function) for non- multi-arch platforms. */
1525 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
1526 #define REGISTER_TO_VALUE(regnum, type, from, to) (legacy_register_to_value (regnum, type, from, to))
1529 typedef void (gdbarch_register_to_value_ftype) (int regnum, struct type *type, char *from, char *to);
1530 extern void gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
1531 extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
1532 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
1533 #error "Non multi-arch definition of REGISTER_TO_VALUE"
1535 #if !defined (REGISTER_TO_VALUE)
1536 #define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to))
1539 /* Default (function) for non- multi-arch platforms. */
1540 #if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
1541 #define VALUE_TO_REGISTER(type, regnum, from, to) (legacy_value_to_register (type, regnum, from, to))
1544 typedef void (gdbarch_value_to_register_ftype) (struct type *type, int regnum, char *from, char *to);
1545 extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
1546 extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
1547 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
1548 #error "Non multi-arch definition of VALUE_TO_REGISTER"
1550 #if !defined (VALUE_TO_REGISTER)
1551 #define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to))
1554 /* Default (function) for non- multi-arch platforms. */
1555 #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
1556 #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
1559 typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf);
1560 extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf);
1561 extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
1562 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
1563 #error "Non multi-arch definition of POINTER_TO_ADDRESS"
1565 #if !defined (POINTER_TO_ADDRESS)
1566 #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
1569 /* Default (function) for non- multi-arch platforms. */
1570 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
1571 #define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr))
1574 typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr);
1575 extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr);
1576 extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
1577 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
1578 #error "Non multi-arch definition of ADDRESS_TO_POINTER"
1580 #if !defined (ADDRESS_TO_POINTER)
1581 #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
1584 #if defined (INTEGER_TO_ADDRESS)
1585 /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
1586 #if !defined (INTEGER_TO_ADDRESS_P)
1587 #define INTEGER_TO_ADDRESS_P() (1)
1591 /* Default predicate for non- multi-arch targets. */
1592 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P)
1593 #define INTEGER_TO_ADDRESS_P() (0)
1596 extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch);
1597 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P)
1598 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1600 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P)
1601 #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch))
1604 /* Default (function) for non- multi-arch platforms. */
1605 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
1606 #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0)
1609 typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
1610 extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
1611 extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
1612 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
1613 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1615 #if !defined (INTEGER_TO_ADDRESS)
1616 #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
1619 /* Default (function) for non- multi-arch platforms. */
1620 #if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
1621 #define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type))
1624 typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
1625 extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
1626 extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack);
1627 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
1628 #error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
1630 #if !defined (RETURN_VALUE_ON_STACK)
1631 #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
1634 /* Replaced by PUSH_DUMMY_CALL */
1636 #if defined (DEPRECATED_PUSH_ARGUMENTS)
1637 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */
1638 #if !defined (DEPRECATED_PUSH_ARGUMENTS_P)
1639 #define DEPRECATED_PUSH_ARGUMENTS_P() (1)
1643 /* Default predicate for non- multi-arch targets. */
1644 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P)
1645 #define DEPRECATED_PUSH_ARGUMENTS_P() (0)
1648 extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch);
1649 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
1650 #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
1652 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P)
1653 #define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch))
1656 /* Default (function) for non- multi-arch platforms. */
1657 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS)
1658 #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0)
1661 typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
1662 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);
1663 extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments);
1664 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
1665 #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
1667 #if !defined (DEPRECATED_PUSH_ARGUMENTS)
1668 #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
1671 extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
1673 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);
1674 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);
1675 extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
1677 #if defined (DEPRECATED_PUSH_DUMMY_FRAME)
1678 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
1679 #if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1680 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
1684 /* Default predicate for non- multi-arch targets. */
1685 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1686 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (0)
1689 extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
1690 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1691 #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
1693 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
1694 #define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
1697 /* Default (function) for non- multi-arch platforms. */
1698 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME)
1699 #define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0)
1702 typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
1703 extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
1704 extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
1705 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME)
1706 #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
1708 #if !defined (DEPRECATED_PUSH_DUMMY_FRAME)
1709 #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
1712 /* NOTE: This can be handled directly in push_dummy_call. */
1714 #if defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1715 /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */
1716 #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1717 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1)
1721 /* Default predicate for non- multi-arch targets. */
1722 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1723 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0)
1726 extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch);
1727 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1728 #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
1730 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
1731 #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch))
1734 /* Default (function) for non- multi-arch platforms. */
1735 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1736 #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0)
1739 typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
1740 extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
1741 extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address);
1742 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1743 #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
1745 #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
1746 #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
1749 #if defined (DEPRECATED_POP_FRAME)
1750 /* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */
1751 #if !defined (DEPRECATED_POP_FRAME_P)
1752 #define DEPRECATED_POP_FRAME_P() (1)
1756 /* Default predicate for non- multi-arch targets. */
1757 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME_P)
1758 #define DEPRECATED_POP_FRAME_P() (0)
1761 extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch);
1762 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P)
1763 #error "Non multi-arch definition of DEPRECATED_POP_FRAME"
1765 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P)
1766 #define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch))
1769 /* Default (function) for non- multi-arch platforms. */
1770 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME)
1771 #define DEPRECATED_POP_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_POP_FRAME"), 0)
1774 typedef void (gdbarch_deprecated_pop_frame_ftype) (void);
1775 extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch);
1776 extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame);
1777 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME)
1778 #error "Non multi-arch definition of DEPRECATED_POP_FRAME"
1780 #if !defined (DEPRECATED_POP_FRAME)
1781 #define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch))
1784 /* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */
1786 #if defined (DEPRECATED_STORE_STRUCT_RETURN)
1787 /* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */
1788 #if !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1789 #define DEPRECATED_STORE_STRUCT_RETURN_P() (1)
1793 /* Default predicate for non- multi-arch targets. */
1794 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1795 #define DEPRECATED_STORE_STRUCT_RETURN_P() (0)
1798 extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch);
1799 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1800 #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
1802 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P)
1803 #define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch))
1806 /* Default (function) for non- multi-arch platforms. */
1807 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN)
1808 #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_STORE_STRUCT_RETURN"), 0)
1811 typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
1812 extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
1813 extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return);
1814 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN)
1815 #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
1817 #if !defined (DEPRECATED_STORE_STRUCT_RETURN)
1818 #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
1821 /* Default (function) for non- multi-arch platforms. */
1822 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
1823 #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf))
1826 typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf);
1827 extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf);
1828 extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
1829 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
1830 #error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
1832 #if !defined (EXTRACT_RETURN_VALUE)
1833 #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
1836 /* Default (function) for non- multi-arch platforms. */
1837 #if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
1838 #define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf))
1841 typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf);
1842 extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf);
1843 extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
1844 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
1845 #error "Non multi-arch definition of STORE_RETURN_VALUE"
1847 #if !defined (STORE_RETURN_VALUE)
1848 #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
1851 typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
1852 extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
1853 extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
1854 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1855 #error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
1857 #if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1858 #define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
1861 typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
1862 extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
1863 extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
1864 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
1865 #error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
1867 #if !defined (DEPRECATED_STORE_RETURN_VALUE)
1868 #define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
1871 #if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1872 /* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
1873 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1874 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
1878 /* Default predicate for non- multi-arch targets. */
1879 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1880 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
1883 extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
1884 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1885 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1887 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1888 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
1891 /* Default (function) for non- multi-arch platforms. */
1892 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1893 #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
1896 typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache);
1897 extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
1898 extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
1899 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1900 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1902 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1903 #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
1906 #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1907 /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
1908 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1909 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
1913 /* Default predicate for non- multi-arch targets. */
1914 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1915 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
1918 extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
1919 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1920 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
1922 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1923 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
1926 /* Default (function) for non- multi-arch platforms. */
1927 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1928 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
1931 typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
1932 extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
1933 extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
1934 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1935 #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
1937 #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1938 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
1941 /* Default (function) for non- multi-arch platforms. */
1942 #if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
1943 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type))
1946 typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
1947 extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
1948 extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
1949 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
1950 #error "Non multi-arch definition of USE_STRUCT_CONVENTION"
1952 #if !defined (USE_STRUCT_CONVENTION)
1953 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
1956 #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
1957 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */
1958 #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
1959 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1)
1963 /* Default predicate for non- multi-arch targets. */
1964 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
1965 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (0)
1968 extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch);
1969 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
1970 #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
1972 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P)
1973 #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch))
1976 /* Default (function) for non- multi-arch platforms. */
1977 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
1978 #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_INIT_SAVED_REGS"), 0)
1981 typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame);
1982 extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
1983 extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs);
1984 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
1985 #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
1987 #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
1988 #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame))
1991 #if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
1992 /* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */
1993 #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
1994 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1)
1998 /* Default predicate for non- multi-arch targets. */
1999 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2000 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (0)
2003 extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch);
2004 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2005 #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
2007 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P)
2008 #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch))
2011 /* Default (function) for non- multi-arch platforms. */
2012 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2013 #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_EXTRA_FRAME_INFO"), 0)
2016 typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
2017 extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
2018 extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info);
2019 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2020 #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
2022 #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
2023 #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame))
2026 typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
2027 extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
2028 extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
2029 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
2030 #error "Non multi-arch definition of SKIP_PROLOGUE"
2032 #if !defined (SKIP_PROLOGUE)
2033 #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
2036 /* Default (function) for non- multi-arch platforms. */
2037 #if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
2038 #define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip))
2041 typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
2042 extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
2043 extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
2044 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
2045 #error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
2047 #if !defined (PROLOGUE_FRAMELESS_P)
2048 #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
2051 typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
2052 extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
2053 extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
2054 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
2055 #error "Non multi-arch definition of INNER_THAN"
2057 #if !defined (INNER_THAN)
2058 #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
2061 typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
2062 extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
2063 extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
2064 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
2065 #error "Non multi-arch definition of BREAKPOINT_FROM_PC"
2067 #if !defined (BREAKPOINT_FROM_PC)
2068 #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
2071 /* Default (function) for non- multi-arch platforms. */
2072 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
2073 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache))
2076 typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
2077 extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
2078 extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
2079 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
2080 #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
2082 #if !defined (MEMORY_INSERT_BREAKPOINT)
2083 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
2086 /* Default (function) for non- multi-arch platforms. */
2087 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
2088 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache))
2091 typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
2092 extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
2093 extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
2094 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
2095 #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
2097 #if !defined (MEMORY_REMOVE_BREAKPOINT)
2098 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
2101 extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
2102 extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
2103 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
2104 #error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
2106 #if !defined (DECR_PC_AFTER_BREAK)
2107 #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
2110 /* Default (function) for non- multi-arch platforms. */
2111 #if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED)
2112 #define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it))
2115 typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it);
2116 extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it);
2117 extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed);
2118 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
2119 #error "Non multi-arch definition of PREPARE_TO_PROCEED"
2121 #if !defined (PREPARE_TO_PROCEED)
2122 #define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
2125 extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
2126 extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
2127 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
2128 #error "Non multi-arch definition of FUNCTION_START_OFFSET"
2130 #if !defined (FUNCTION_START_OFFSET)
2131 #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
2134 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);
2135 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);
2136 extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
2138 extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
2139 extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
2140 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
2141 #error "Non multi-arch definition of FRAME_ARGS_SKIP"
2143 #if !defined (FRAME_ARGS_SKIP)
2144 #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
2147 /* Default (function) for non- multi-arch platforms. */
2148 #if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
2149 #define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi))
2152 typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi);
2153 extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
2154 extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation);
2155 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
2156 #error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
2158 #if !defined (FRAMELESS_FUNCTION_INVOCATION)
2159 #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
2162 #if defined (DEPRECATED_FRAME_CHAIN)
2163 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */
2164 #if !defined (DEPRECATED_FRAME_CHAIN_P)
2165 #define DEPRECATED_FRAME_CHAIN_P() (1)
2169 /* Default predicate for non- multi-arch targets. */
2170 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_P)
2171 #define DEPRECATED_FRAME_CHAIN_P() (0)
2174 extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch);
2175 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P)
2176 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
2178 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P)
2179 #define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch))
2182 /* Default (function) for non- multi-arch platforms. */
2183 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN)
2184 #define DEPRECATED_FRAME_CHAIN(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN"), 0)
2187 typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame);
2188 extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
2189 extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain);
2190 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN)
2191 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
2193 #if !defined (DEPRECATED_FRAME_CHAIN)
2194 #define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame))
2197 #if defined (DEPRECATED_FRAME_CHAIN_VALID)
2198 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */
2199 #if !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2200 #define DEPRECATED_FRAME_CHAIN_VALID_P() (1)
2204 /* Default predicate for non- multi-arch targets. */
2205 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2206 #define DEPRECATED_FRAME_CHAIN_VALID_P() (0)
2209 extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch);
2210 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2211 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
2213 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P)
2214 #define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch))
2217 /* Default (function) for non- multi-arch platforms. */
2218 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID)
2219 #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN_VALID"), 0)
2222 typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
2223 extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
2224 extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid);
2225 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID)
2226 #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
2228 #if !defined (DEPRECATED_FRAME_CHAIN_VALID)
2229 #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe))
2232 /* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please
2233 note, per UNWIND_PC's doco, that while the two have similar
2234 interfaces they have very different underlying implementations. */
2236 #if defined (DEPRECATED_FRAME_SAVED_PC)
2237 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */
2238 #if !defined (DEPRECATED_FRAME_SAVED_PC_P)
2239 #define DEPRECATED_FRAME_SAVED_PC_P() (1)
2243 /* Default predicate for non- multi-arch targets. */
2244 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC_P)
2245 #define DEPRECATED_FRAME_SAVED_PC_P() (0)
2248 extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch);
2249 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P)
2250 #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
2252 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P)
2253 #define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch))
2256 /* Default (function) for non- multi-arch platforms. */
2257 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC)
2258 #define DEPRECATED_FRAME_SAVED_PC(fi) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_SAVED_PC"), 0)
2261 typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi);
2262 extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
2263 extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc);
2264 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC)
2265 #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
2267 #if !defined (DEPRECATED_FRAME_SAVED_PC)
2268 #define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi))
2271 extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch);
2273 typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
2274 extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame);
2275 extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc);
2277 extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch);
2279 typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
2280 extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
2281 extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
2283 /* Default (function) for non- multi-arch platforms. */
2284 #if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS)
2285 #define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
2288 typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi);
2289 extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
2290 extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address);
2291 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
2292 #error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
2294 #if !defined (FRAME_ARGS_ADDRESS)
2295 #define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
2298 /* Default (function) for non- multi-arch platforms. */
2299 #if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS)
2300 #define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
2303 typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi);
2304 extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
2305 extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address);
2306 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
2307 #error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
2309 #if !defined (FRAME_LOCALS_ADDRESS)
2310 #define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
2313 #if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2314 /* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */
2315 #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2316 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (1)
2320 /* Default predicate for non- multi-arch targets. */
2321 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2322 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (0)
2325 extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch);
2326 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2327 #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
2329 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P)
2330 #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch))
2333 /* Default (function) for non- multi-arch platforms. */
2334 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2335 #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVED_PC_AFTER_CALL"), 0)
2338 typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame);
2339 extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
2340 extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call);
2341 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2342 #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
2344 #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
2345 #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame))
2348 #if defined (FRAME_NUM_ARGS)
2349 /* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */
2350 #if !defined (FRAME_NUM_ARGS_P)
2351 #define FRAME_NUM_ARGS_P() (1)
2355 /* Default predicate for non- multi-arch targets. */
2356 #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P)
2357 #define FRAME_NUM_ARGS_P() (0)
2360 extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch);
2361 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P)
2362 #error "Non multi-arch definition of FRAME_NUM_ARGS"
2364 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P)
2365 #define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch))
2368 /* Default (function) for non- multi-arch platforms. */
2369 #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS)
2370 #define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0)
2373 typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
2374 extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
2375 extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
2376 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
2377 #error "Non multi-arch definition of FRAME_NUM_ARGS"
2379 #if !defined (FRAME_NUM_ARGS)
2380 #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
2383 #if defined (STACK_ALIGN)
2384 /* Legacy for systems yet to multi-arch STACK_ALIGN */
2385 #if !defined (STACK_ALIGN_P)
2386 #define STACK_ALIGN_P() (1)
2390 /* Default predicate for non- multi-arch targets. */
2391 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P)
2392 #define STACK_ALIGN_P() (0)
2395 extern int gdbarch_stack_align_p (struct gdbarch *gdbarch);
2396 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P)
2397 #error "Non multi-arch definition of STACK_ALIGN"
2399 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P)
2400 #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch))
2403 /* Default (function) for non- multi-arch platforms. */
2404 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN)
2405 #define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0)
2408 typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp);
2409 extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp);
2410 extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align);
2411 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
2412 #error "Non multi-arch definition of STACK_ALIGN"
2414 #if !defined (STACK_ALIGN)
2415 #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
2418 extern int gdbarch_frame_align_p (struct gdbarch *gdbarch);
2420 typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address);
2421 extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address);
2422 extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align);
2424 /* NOTE: cagney/2003-03-24: This is better handled by PUSH_ARGUMENTS. */
2426 /* Default (value) for non- multi-arch platforms. */
2427 #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
2428 #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (0)
2431 extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch);
2432 extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed);
2433 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
2434 #error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED"
2436 #if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
2437 #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch))
2440 #if defined (REG_STRUCT_HAS_ADDR)
2441 /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
2442 #if !defined (REG_STRUCT_HAS_ADDR_P)
2443 #define REG_STRUCT_HAS_ADDR_P() (1)
2447 /* Default predicate for non- multi-arch targets. */
2448 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P)
2449 #define REG_STRUCT_HAS_ADDR_P() (0)
2452 extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch);
2453 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P)
2454 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2456 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P)
2457 #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch))
2460 /* Default (function) for non- multi-arch platforms. */
2461 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR)
2462 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0)
2465 typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
2466 extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
2467 extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr);
2468 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
2469 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2471 #if !defined (REG_STRUCT_HAS_ADDR)
2472 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
2475 /* FIXME: kettenis/2003-03-08: This should be replaced by a function
2476 parametrized with (at least) the regcache. */
2478 #if defined (SAVE_DUMMY_FRAME_TOS)
2479 /* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
2480 #if !defined (SAVE_DUMMY_FRAME_TOS_P)
2481 #define SAVE_DUMMY_FRAME_TOS_P() (1)
2485 /* Default predicate for non- multi-arch targets. */
2486 #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P)
2487 #define SAVE_DUMMY_FRAME_TOS_P() (0)
2490 extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
2491 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
2492 #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
2494 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
2495 #define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
2498 /* Default (function) for non- multi-arch platforms. */
2499 #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
2500 #define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
2503 typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
2504 extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
2505 extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
2506 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
2507 #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
2509 #if !defined (SAVE_DUMMY_FRAME_TOS)
2510 #define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
2513 extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
2515 typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info);
2516 extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info);
2517 extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
2519 extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
2520 extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
2521 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
2522 #error "Non multi-arch definition of PARM_BOUNDARY"
2524 #if !defined (PARM_BOUNDARY)
2525 #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
2528 /* Default (value) for non- multi-arch platforms. */
2529 #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
2530 #define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch))
2533 extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
2534 extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
2535 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
2536 #error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
2538 #if !defined (TARGET_FLOAT_FORMAT)
2539 #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
2542 /* Default (value) for non- multi-arch platforms. */
2543 #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
2544 #define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2547 extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
2548 extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
2549 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
2550 #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
2552 #if !defined (TARGET_DOUBLE_FORMAT)
2553 #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
2556 /* Default (value) for non- multi-arch platforms. */
2557 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
2558 #define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2561 extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
2562 extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
2563 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
2564 #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
2566 #if !defined (TARGET_LONG_DOUBLE_FORMAT)
2567 #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
2570 /* Default (function) for non- multi-arch platforms. */
2571 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2572 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr))
2575 typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr);
2576 extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr);
2577 extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr);
2578 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
2579 #error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
2581 #if !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2582 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
2585 /* On some machines there are bits in addresses which are not really
2586 part of the address, but are used by the kernel, the hardware, etc.
2587 for special purposes. ADDR_BITS_REMOVE takes out any such bits so
2588 we get a "real" address such as one would find in a symbol table.
2589 This is used only for addresses of instructions, and even then I'm
2590 not sure it's used in all contexts. It exists to deal with there
2591 being a few stray bits in the PC which would mislead us, not as some
2592 sort of generic thing to handle alignment or segmentation (it's
2593 possible it should be in TARGET_READ_PC instead). */
2595 /* Default (function) for non- multi-arch platforms. */
2596 #if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE)
2597 #define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr))
2600 typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
2601 extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
2602 extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
2603 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
2604 #error "Non multi-arch definition of ADDR_BITS_REMOVE"
2606 #if !defined (ADDR_BITS_REMOVE)
2607 #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
2610 /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
2611 ADDR_BITS_REMOVE. */
2613 /* Default (function) for non- multi-arch platforms. */
2614 #if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS)
2615 #define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr))
2618 typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
2619 extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
2620 extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
2621 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
2622 #error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
2624 #if !defined (SMASH_TEXT_ADDRESS)
2625 #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
2628 /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
2629 the target needs software single step. An ISA method to implement it.
2631 FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
2632 using the breakpoint system instead of blatting memory directly (as with rs6000).
2634 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
2635 single step. If not, then implement single step using breakpoints. */
2637 #if defined (SOFTWARE_SINGLE_STEP)
2638 /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
2639 #if !defined (SOFTWARE_SINGLE_STEP_P)
2640 #define SOFTWARE_SINGLE_STEP_P() (1)
2644 /* Default predicate for non- multi-arch targets. */
2645 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P)
2646 #define SOFTWARE_SINGLE_STEP_P() (0)
2649 extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
2650 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
2651 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2653 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
2654 #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
2657 /* Default (function) for non- multi-arch platforms. */
2658 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP)
2659 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
2662 typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
2663 extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
2664 extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
2665 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
2666 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2668 #if !defined (SOFTWARE_SINGLE_STEP)
2669 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
2672 /* Default (function) for non- multi-arch platforms. */
2673 #if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
2674 #define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info))
2677 typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info);
2678 extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info);
2679 extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
2680 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
2681 #error "Non multi-arch definition of TARGET_PRINT_INSN"
2683 #if !defined (TARGET_PRINT_INSN)
2684 #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
2687 /* Default (function) for non- multi-arch platforms. */
2688 #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
2689 #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc))
2692 typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc);
2693 extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc);
2694 extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
2695 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
2696 #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
2698 #if !defined (SKIP_TRAMPOLINE_CODE)
2699 #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
2702 /* For SVR4 shared libraries, each call goes through a small piece of
2703 trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
2704 to nonzero if we are currently stopped in one of these. */
2706 /* Default (function) for non- multi-arch platforms. */
2707 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
2708 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name))
2711 typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name);
2712 extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2713 extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline);
2714 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
2715 #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
2717 #if !defined (IN_SOLIB_CALL_TRAMPOLINE)
2718 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
2721 /* Some systems also have trampoline code for returning from shared libs. */
2723 /* Default (function) for non- multi-arch platforms. */
2724 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2725 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name))
2728 typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
2729 extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2730 extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
2731 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
2732 #error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
2734 #if !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2735 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
2738 /* Sigtramp is a routine that the kernel calls (which then calls the
2739 signal handler). On most machines it is a library routine that is
2740 linked into the executable.
2742 This macro, given a program counter value and the name of the
2743 function in which that PC resides (which can be null if the name is
2744 not known), returns nonzero if the PC and name show that we are in
2747 On most machines just see if the name is sigtramp (and if we have
2748 no name, assume we are not in sigtramp).
2750 FIXME: cagney/2002-04-21: The function find_pc_partial_function
2751 calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
2752 This means PC_IN_SIGTRAMP function can't be implemented by doing its
2753 own local NAME lookup.
2755 FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
2756 Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
2759 /* Default (function) for non- multi-arch platforms. */
2760 #if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP)
2761 #define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name))
2764 typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
2765 extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2766 extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
2767 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
2768 #error "Non multi-arch definition of PC_IN_SIGTRAMP"
2770 #if !defined (PC_IN_SIGTRAMP)
2771 #define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
2774 #if defined (SIGTRAMP_START)
2775 /* Legacy for systems yet to multi-arch SIGTRAMP_START */
2776 #if !defined (SIGTRAMP_START_P)
2777 #define SIGTRAMP_START_P() (1)
2781 /* Default predicate for non- multi-arch targets. */
2782 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START_P)
2783 #define SIGTRAMP_START_P() (0)
2786 extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch);
2787 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P)
2788 #error "Non multi-arch definition of SIGTRAMP_START"
2790 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P)
2791 #define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch))
2794 /* Default (function) for non- multi-arch platforms. */
2795 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START)
2796 #define SIGTRAMP_START(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_START"), 0)
2799 typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc);
2800 extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc);
2801 extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start);
2802 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START)
2803 #error "Non multi-arch definition of SIGTRAMP_START"
2805 #if !defined (SIGTRAMP_START)
2806 #define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc))
2809 #if defined (SIGTRAMP_END)
2810 /* Legacy for systems yet to multi-arch SIGTRAMP_END */
2811 #if !defined (SIGTRAMP_END_P)
2812 #define SIGTRAMP_END_P() (1)
2816 /* Default predicate for non- multi-arch targets. */
2817 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END_P)
2818 #define SIGTRAMP_END_P() (0)
2821 extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch);
2822 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P)
2823 #error "Non multi-arch definition of SIGTRAMP_END"
2825 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P)
2826 #define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch))
2829 /* Default (function) for non- multi-arch platforms. */
2830 #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END)
2831 #define SIGTRAMP_END(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_END"), 0)
2834 typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc);
2835 extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc);
2836 extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end);
2837 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END)
2838 #error "Non multi-arch definition of SIGTRAMP_END"
2840 #if !defined (SIGTRAMP_END)
2841 #define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc))
2844 /* A target might have problems with watchpoints as soon as the stack
2845 frame of the current function has been destroyed. This mostly happens
2846 as the first action in a funtion's epilogue. in_function_epilogue_p()
2847 is defined to return a non-zero value if either the given addr is one
2848 instruction after the stack destroying instruction up to the trailing
2849 return instruction or if we can figure out that the stack frame has
2850 already been invalidated regardless of the value of addr. Targets
2851 which don't suffer from that problem could just let this functionality
2854 typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
2855 extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
2856 extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
2858 /* Given a vector of command-line arguments, return a newly allocated
2859 string which, when passed to the create_inferior function, will be
2860 parsed (on Unix systems, by the shell) to yield the same vector.
2861 This function should call error() if the argument vector is not
2862 representable for this target or if this target does not support
2863 command-line arguments.
2864 ARGC is the number of elements in the vector.
2865 ARGV is an array of strings, one per argument. */
2867 typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv);
2868 extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv);
2869 extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments);
2871 #if defined (DWARF2_BUILD_FRAME_INFO)
2872 /* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */
2873 #if !defined (DWARF2_BUILD_FRAME_INFO_P)
2874 #define DWARF2_BUILD_FRAME_INFO_P() (1)
2878 /* Default predicate for non- multi-arch targets. */
2879 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P)
2880 #define DWARF2_BUILD_FRAME_INFO_P() (0)
2883 extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch);
2884 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P)
2885 #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
2887 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P)
2888 #define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch))
2891 /* Default (function) for non- multi-arch platforms. */
2892 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO)
2893 #define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0)
2896 typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile);
2897 extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile);
2898 extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info);
2899 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO)
2900 #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
2902 #if !defined (DWARF2_BUILD_FRAME_INFO)
2903 #define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile))
2906 /* Default (function) for non- multi-arch platforms. */
2907 #if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2908 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym))
2911 typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym);
2912 extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym);
2913 extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special);
2914 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
2915 #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
2917 #if !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2918 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
2921 /* Default (function) for non- multi-arch platforms. */
2922 #if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2923 #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym))
2926 typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym);
2927 extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
2928 extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
2929 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
2930 #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
2932 #if !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2933 #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
2936 /* Default (value) for non- multi-arch platforms. */
2937 #if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC)
2938 #define NAME_OF_MALLOC ("malloc")
2941 extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch);
2942 extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc);
2943 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
2944 #error "Non multi-arch definition of NAME_OF_MALLOC"
2946 #if !defined (NAME_OF_MALLOC)
2947 #define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch))
2950 /* Default (value) for non- multi-arch platforms. */
2951 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
2952 #define CANNOT_STEP_BREAKPOINT (0)
2955 extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
2956 extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
2957 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
2958 #error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
2960 #if !defined (CANNOT_STEP_BREAKPOINT)
2961 #define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
2964 /* Default (value) for non- multi-arch platforms. */
2965 #if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2966 #define HAVE_NONSTEPPABLE_WATCHPOINT (0)
2969 extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
2970 extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
2971 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2972 #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
2974 #if !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2975 #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
2978 #if defined (ADDRESS_CLASS_TYPE_FLAGS)
2979 /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
2980 #if !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2981 #define ADDRESS_CLASS_TYPE_FLAGS_P() (1)
2985 /* Default predicate for non- multi-arch targets. */
2986 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2987 #define ADDRESS_CLASS_TYPE_FLAGS_P() (0)
2990 extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch);
2991 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2992 #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
2994 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2995 #define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch))
2998 /* Default (function) for non- multi-arch platforms. */
2999 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS)
3000 #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0)
3003 typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class);
3004 extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class);
3005 extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags);
3006 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
3007 #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
3009 #if !defined (ADDRESS_CLASS_TYPE_FLAGS)
3010 #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
3013 extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
3015 typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
3016 extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
3017 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);
3019 extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);
3021 typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
3022 extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
3023 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);
3025 /* Is a register in a group */
3027 typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
3028 extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
3029 extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
3031 /* Fetch the pointer to the ith function argument. */
3033 #if defined (FETCH_POINTER_ARGUMENT)
3034 /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */
3035 #if !defined (FETCH_POINTER_ARGUMENT_P)
3036 #define FETCH_POINTER_ARGUMENT_P() (1)
3040 /* Default predicate for non- multi-arch targets. */
3041 #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P)
3042 #define FETCH_POINTER_ARGUMENT_P() (0)
3045 extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch);
3046 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P)
3047 #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
3049 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P)
3050 #define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch))
3053 /* Default (function) for non- multi-arch platforms. */
3054 #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT)
3055 #define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0)
3058 typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type);
3059 extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type);
3060 extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument);
3061 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT)
3062 #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
3064 #if !defined (FETCH_POINTER_ARGUMENT)
3065 #define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type))
3068 extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
3071 /* Mechanism for co-ordinating the selection of a specific
3074 GDB targets (*-tdep.c) can register an interest in a specific
3075 architecture. Other GDB components can register a need to maintain
3076 per-architecture data.
3078 The mechanisms below ensures that there is only a loose connection
3079 between the set-architecture command and the various GDB
3080 components. Each component can independently register their need
3081 to maintain architecture specific data with gdbarch.
3085 Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It
3088 The more traditional mega-struct containing architecture specific
3089 data for all the various GDB components was also considered. Since
3090 GDB is built from a variable number of (fairly independent)
3091 components it was determined that the global aproach was not
3095 /* Register a new architectural family with GDB.
3097 Register support for the specified ARCHITECTURE with GDB. When
3098 gdbarch determines that the specified architecture has been
3099 selected, the corresponding INIT function is called.
3103 The INIT function takes two parameters: INFO which contains the
3104 information available to gdbarch about the (possibly new)
3105 architecture; ARCHES which is a list of the previously created
3106 ``struct gdbarch'' for this architecture.
3108 The INFO parameter is, as far as possible, be pre-initialized with
3109 information obtained from INFO.ABFD or the previously selected
3112 The ARCHES parameter is a linked list (sorted most recently used)
3113 of all the previously created architures for this architecture
3114 family. The (possibly NULL) ARCHES->gdbarch can used to access
3115 values from the previously selected architecture for this
3116 architecture family. The global ``current_gdbarch'' shall not be
3119 The INIT function shall return any of: NULL - indicating that it
3120 doesn't recognize the selected architecture; an existing ``struct
3121 gdbarch'' from the ARCHES list - indicating that the new
3122 architecture is just a synonym for an earlier architecture (see
3123 gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch''
3124 - that describes the selected architecture (see gdbarch_alloc()).
3126 The DUMP_TDEP function shall print out all target specific values.
3127 Care should be taken to ensure that the function works in both the
3128 multi-arch and non- multi-arch cases. */
3132 struct gdbarch *gdbarch;
3133 struct gdbarch_list *next;
3138 /* Use default: NULL (ZERO). */
3139 const struct bfd_arch_info *bfd_arch_info;
3141 /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */
3144 /* Use default: NULL (ZERO). */
3147 /* Use default: NULL (ZERO). */
3148 struct gdbarch_tdep_info *tdep_info;
3150 /* Use default: GDB_OSABI_UNINITIALIZED (-1). */
3151 enum gdb_osabi osabi;
3154 typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
3155 typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file);
3157 /* DEPRECATED - use gdbarch_register() */
3158 extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *);
3160 extern void gdbarch_register (enum bfd_architecture architecture,
3161 gdbarch_init_ftype *,
3162 gdbarch_dump_tdep_ftype *);
3165 /* Return a freshly allocated, NULL terminated, array of the valid
3166 architecture names. Since architectures are registered during the
3167 _initialize phase this function only returns useful information
3168 once initialization has been completed. */
3170 extern const char **gdbarch_printable_names (void);
3173 /* Helper function. Search the list of ARCHES for a GDBARCH that
3174 matches the information provided by INFO. */
3176 extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info);
3179 /* Helper function. Create a preliminary ``struct gdbarch''. Perform
3180 basic initialization using values obtained from the INFO andTDEP
3181 parameters. set_gdbarch_*() functions are called to complete the
3182 initialization of the object. */
3184 extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
3187 /* Helper function. Free a partially-constructed ``struct gdbarch''.
3188 It is assumed that the caller freeds the ``struct
3191 extern void gdbarch_free (struct gdbarch *);
3194 /* Helper function. Force an update of the current architecture.
3196 The actual architecture selected is determined by INFO, ``(gdb) set
3197 architecture'' et.al., the existing architecture and BFD's default
3198 architecture. INFO should be initialized to zero and then selected
3199 fields should be updated.
3201 Returns non-zero if the update succeeds */
3203 extern int gdbarch_update_p (struct gdbarch_info info);
3207 /* Register per-architecture data-pointer.
3209 Reserve space for a per-architecture data-pointer. An identifier
3210 for the reserved data-pointer is returned. That identifer should
3211 be saved in a local static variable.
3213 The per-architecture data-pointer is either initialized explicitly
3214 (set_gdbarch_data()) or implicitly (by INIT() via a call to
3215 gdbarch_data()). FREE() is called to delete either an existing
3216 data-pointer overridden by set_gdbarch_data() or when the
3217 architecture object is being deleted.
3219 When a previously created architecture is re-selected, the
3220 per-architecture data-pointer for that previous architecture is
3221 restored. INIT() is not re-called.
3223 Multiple registrarants for any architecture are allowed (and
3224 strongly encouraged). */
3226 struct gdbarch_data;
3228 typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
3229 typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
3231 extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
3232 gdbarch_data_free_ftype *free);
3233 extern void set_gdbarch_data (struct gdbarch *gdbarch,
3234 struct gdbarch_data *data,
3237 extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
3240 /* Register per-architecture memory region.
3242 Provide a memory-region swap mechanism. Per-architecture memory
3243 region are created. These memory regions are swapped whenever the
3244 architecture is changed. For a new architecture, the memory region
3245 is initialized with zero (0) and the INIT function is called.
3247 Memory regions are swapped / initialized in the order that they are
3248 registered. NULL DATA and/or INIT values can be specified.
3250 New code should use register_gdbarch_data(). */
3252 typedef void (gdbarch_swap_ftype) (void);
3253 extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init);
3254 #define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
3258 /* The target-system-dependent byte order is dynamic */
3260 extern int target_byte_order;
3261 #ifndef TARGET_BYTE_ORDER
3262 #define TARGET_BYTE_ORDER (target_byte_order + 0)
3265 extern int target_byte_order_auto;
3266 #ifndef TARGET_BYTE_ORDER_AUTO
3267 #define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
3272 /* The target-system-dependent BFD architecture is dynamic */
3274 extern int target_architecture_auto;
3275 #ifndef TARGET_ARCHITECTURE_AUTO
3276 #define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
3279 extern const struct bfd_arch_info *target_architecture;
3280 #ifndef TARGET_ARCHITECTURE
3281 #define TARGET_ARCHITECTURE (target_architecture + 0)
3285 /* The target-system-dependent disassembler is semi-dynamic */
3287 /* Use gdb_disassemble, and gdbarch_print_insn instead. */
3288 extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*);
3290 /* Use set_gdbarch_print_insn instead. */
3291 extern disassemble_info deprecated_tm_print_insn_info;
3293 /* Set the dynamic target-system-dependent parameters (architecture,
3294 byte-order, ...) using information found in the BFD */
3296 extern void set_gdbarch_from_file (bfd *);
3299 /* Initialize the current architecture to the "first" one we find on
3302 extern void initialize_current_architecture (void);
3304 /* For non-multiarched targets, do any initialization of the default
3305 gdbarch object necessary after the _initialize_MODULE functions
3307 extern void initialize_non_multiarch (void);
3309 /* gdbarch trace variable */
3310 extern int gdbarch_debug;
3312 extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file);