1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001 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 #include "value.h" /* For default_coerce_float_to_double which is referenced by a macro. */
47 extern struct gdbarch
*current_gdbarch
;
50 /* If any of the following are defined, the target wasn't correctly
54 #if defined (EXTRA_FRAME_INFO)
55 #error "EXTRA_FRAME_INFO: replaced by struct frame_extra_info"
60 #if defined (FRAME_FIND_SAVED_REGS)
61 #error "FRAME_FIND_SAVED_REGS: replaced by FRAME_INIT_SAVED_REGS"
65 #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE)
66 #error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file."
70 /* The following are pre-initialized by GDBARCH. */
72 extern const struct bfd_arch_info
* gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
);
73 /* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */
74 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE)
75 #error "Non multi-arch definition of TARGET_ARCHITECTURE"
78 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ARCHITECTURE)
79 #define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch))
83 extern int gdbarch_byte_order (struct gdbarch
*gdbarch
);
84 /* set_gdbarch_byte_order() - not applicable - pre-initialized. */
85 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER)
86 #error "Non multi-arch definition of TARGET_BYTE_ORDER"
89 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BYTE_ORDER)
90 #define TARGET_BYTE_ORDER (gdbarch_byte_order (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::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"
114 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_SHORT_BIT)
115 #define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch))
119 /* Number of bits in an int or unsigned int for the target machine. */
121 /* Default (value) for non- multi-arch platforms. */
122 #if (!GDB_MULTI_ARCH) && !defined (TARGET_INT_BIT)
123 #define TARGET_INT_BIT (4*TARGET_CHAR_BIT)
126 extern int gdbarch_int_bit (struct gdbarch
*gdbarch
);
127 extern void set_gdbarch_int_bit (struct gdbarch
*gdbarch
, int int_bit
);
128 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT)
129 #error "Non multi-arch definition of TARGET_INT_BIT"
132 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_INT_BIT)
133 #define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch))
137 /* Number of bits in a long or unsigned long for the target machine. */
139 /* Default (value) for non- multi-arch platforms. */
140 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_BIT)
141 #define TARGET_LONG_BIT (4*TARGET_CHAR_BIT)
144 extern int gdbarch_long_bit (struct gdbarch
*gdbarch
);
145 extern void set_gdbarch_long_bit (struct gdbarch
*gdbarch
, int long_bit
);
146 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT)
147 #error "Non multi-arch definition of TARGET_LONG_BIT"
150 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_BIT)
151 #define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch))
155 /* Number of bits in a long long or unsigned long long for the target
158 /* Default (value) for non- multi-arch platforms. */
159 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_LONG_BIT)
160 #define TARGET_LONG_LONG_BIT (2*TARGET_LONG_BIT)
163 extern int gdbarch_long_long_bit (struct gdbarch
*gdbarch
);
164 extern void set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
, int long_long_bit
);
165 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT)
166 #error "Non multi-arch definition of TARGET_LONG_LONG_BIT"
169 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_LONG_BIT)
170 #define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch))
174 /* Number of bits in a float for the target machine. */
176 /* Default (value) for non- multi-arch platforms. */
177 #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_BIT)
178 #define TARGET_FLOAT_BIT (4*TARGET_CHAR_BIT)
181 extern int gdbarch_float_bit (struct gdbarch
*gdbarch
);
182 extern void set_gdbarch_float_bit (struct gdbarch
*gdbarch
, int float_bit
);
183 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT)
184 #error "Non multi-arch definition of TARGET_FLOAT_BIT"
187 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_BIT)
188 #define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
192 /* Number of bits in a double for the target machine. */
194 /* Default (value) for non- multi-arch platforms. */
195 #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_BIT)
196 #define TARGET_DOUBLE_BIT (8*TARGET_CHAR_BIT)
199 extern int gdbarch_double_bit (struct gdbarch
*gdbarch
);
200 extern void set_gdbarch_double_bit (struct gdbarch
*gdbarch
, int double_bit
);
201 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT)
202 #error "Non multi-arch definition of TARGET_DOUBLE_BIT"
205 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_BIT)
206 #define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
210 /* Number of bits in a long double for the target machine. */
212 /* Default (value) for non- multi-arch platforms. */
213 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_BIT)
214 #define TARGET_LONG_DOUBLE_BIT (2*TARGET_DOUBLE_BIT)
217 extern int gdbarch_long_double_bit (struct gdbarch
*gdbarch
);
218 extern void set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
, int long_double_bit
);
219 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT)
220 #error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT"
223 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_BIT)
224 #define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
228 /* For most targets, a pointer on the target and its representation as an
229 address in GDB have the same size and "look the same". For such a
230 target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT
231 / addr_bit will be set from it.
233 If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably
234 also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well.
236 ptr_bit is the size of a pointer on the target */
238 /* Default (value) for non- multi-arch platforms. */
239 #if (!GDB_MULTI_ARCH) && !defined (TARGET_PTR_BIT)
240 #define TARGET_PTR_BIT (TARGET_INT_BIT)
243 extern int gdbarch_ptr_bit (struct gdbarch
*gdbarch
);
244 extern void set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
, int ptr_bit
);
245 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT)
246 #error "Non multi-arch definition of TARGET_PTR_BIT"
249 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT)
250 #define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch))
254 /* addr_bit is the size of a target address as represented in gdb */
256 /* Default (value) for non- multi-arch platforms. */
257 #if (!GDB_MULTI_ARCH) && !defined (TARGET_ADDR_BIT)
258 #define TARGET_ADDR_BIT (TARGET_PTR_BIT)
261 extern int gdbarch_addr_bit (struct gdbarch
*gdbarch
);
262 extern void set_gdbarch_addr_bit (struct gdbarch
*gdbarch
, int addr_bit
);
263 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT)
264 #error "Non multi-arch definition of TARGET_ADDR_BIT"
267 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ADDR_BIT)
268 #define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch))
272 /* Number of bits in a BFD_VMA for the target object file format. */
274 /* Default (value) for non- multi-arch platforms. */
275 #if (!GDB_MULTI_ARCH) && !defined (TARGET_BFD_VMA_BIT)
276 #define TARGET_BFD_VMA_BIT (TARGET_ARCHITECTURE->bits_per_address)
279 extern int gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
);
280 extern void set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
, int bfd_vma_bit
);
281 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT)
282 #error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
285 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT)
286 #define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch))
290 /* Default (value) for non- multi-arch platforms. */
291 #if (!GDB_MULTI_ARCH) && !defined (IEEE_FLOAT)
292 #define IEEE_FLOAT (0)
295 extern int gdbarch_ieee_float (struct gdbarch
*gdbarch
);
296 extern void set_gdbarch_ieee_float (struct gdbarch
*gdbarch
, int ieee_float
);
297 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IEEE_FLOAT)
298 #error "Non multi-arch definition of IEEE_FLOAT"
301 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IEEE_FLOAT)
302 #define IEEE_FLOAT (gdbarch_ieee_float (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) (generic_target_read_pc (ptid))
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"
318 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC)
319 #define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid))
323 /* Default (function) for non- multi-arch platforms. */
324 #if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC)
325 #define TARGET_WRITE_PC(val, ptid) (generic_target_write_pc (val, ptid))
328 typedef void (gdbarch_write_pc_ftype
) (CORE_ADDR val
, ptid_t ptid
);
329 extern void gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
);
330 extern void set_gdbarch_write_pc (struct gdbarch
*gdbarch
, gdbarch_write_pc_ftype
*write_pc
);
331 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC)
332 #error "Non multi-arch definition of TARGET_WRITE_PC"
335 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_PC)
336 #define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
340 /* Default (function) for non- multi-arch platforms. */
341 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_FP)
342 #define TARGET_READ_FP() (generic_target_read_fp ())
345 typedef CORE_ADDR (gdbarch_read_fp_ftype
) (void);
346 extern CORE_ADDR
gdbarch_read_fp (struct gdbarch
*gdbarch
);
347 extern void set_gdbarch_read_fp (struct gdbarch
*gdbarch
, gdbarch_read_fp_ftype
*read_fp
);
348 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_FP)
349 #error "Non multi-arch definition of TARGET_READ_FP"
352 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_FP)
353 #define TARGET_READ_FP() (gdbarch_read_fp (current_gdbarch))
357 /* Default (function) for non- multi-arch platforms. */
358 #if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_FP)
359 #define TARGET_WRITE_FP(val) (generic_target_write_fp (val))
362 typedef void (gdbarch_write_fp_ftype
) (CORE_ADDR val
);
363 extern void gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
);
364 extern void set_gdbarch_write_fp (struct gdbarch
*gdbarch
, gdbarch_write_fp_ftype
*write_fp
);
365 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_FP)
366 #error "Non multi-arch definition of TARGET_WRITE_FP"
369 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_FP)
370 #define TARGET_WRITE_FP(val) (gdbarch_write_fp (current_gdbarch, val))
374 /* Default (function) for non- multi-arch platforms. */
375 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP)
376 #define TARGET_READ_SP() (generic_target_read_sp ())
379 typedef CORE_ADDR (gdbarch_read_sp_ftype
) (void);
380 extern CORE_ADDR
gdbarch_read_sp (struct gdbarch
*gdbarch
);
381 extern void set_gdbarch_read_sp (struct gdbarch
*gdbarch
, gdbarch_read_sp_ftype
*read_sp
);
382 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
383 #error "Non multi-arch definition of TARGET_READ_SP"
386 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP)
387 #define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
391 /* Default (function) for non- multi-arch platforms. */
392 #if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_SP)
393 #define TARGET_WRITE_SP(val) (generic_target_write_sp (val))
396 typedef void (gdbarch_write_sp_ftype
) (CORE_ADDR val
);
397 extern void gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
);
398 extern void set_gdbarch_write_sp (struct gdbarch
*gdbarch
, gdbarch_write_sp_ftype
*write_sp
);
399 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_SP)
400 #error "Non multi-arch definition of TARGET_WRITE_SP"
403 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_SP)
404 #define TARGET_WRITE_SP(val) (gdbarch_write_sp (current_gdbarch, val))
408 /* Function for getting target's idea of a frame pointer. FIXME: GDB's
409 whole scheme for dealing with "frames" and "frame pointers" needs a
410 serious shakedown. */
412 /* Default (function) for non- multi-arch platforms. */
413 #if (!GDB_MULTI_ARCH) && !defined (TARGET_VIRTUAL_FRAME_POINTER)
414 #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (legacy_virtual_frame_pointer (pc, frame_regnum, frame_offset))
417 typedef void (gdbarch_virtual_frame_pointer_ftype
) (CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
);
418 extern void gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
);
419 extern void set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
);
420 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER)
421 #error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
424 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_VIRTUAL_FRAME_POINTER)
425 #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset))
429 extern int gdbarch_register_read_p (struct gdbarch
*gdbarch
);
431 typedef void (gdbarch_register_read_ftype
) (struct gdbarch
*gdbarch
, int regnum
, char *buf
);
432 extern void gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
);
433 extern void set_gdbarch_register_read (struct gdbarch
*gdbarch
, gdbarch_register_read_ftype
*register_read
);
435 extern int gdbarch_register_write_p (struct gdbarch
*gdbarch
);
437 typedef void (gdbarch_register_write_ftype
) (struct gdbarch
*gdbarch
, int regnum
, char *buf
);
438 extern void gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
);
439 extern void set_gdbarch_register_write (struct gdbarch
*gdbarch
, gdbarch_register_write_ftype
*register_write
);
441 extern int gdbarch_num_regs (struct gdbarch
*gdbarch
);
442 extern void set_gdbarch_num_regs (struct gdbarch
*gdbarch
, int num_regs
);
443 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
444 #error "Non multi-arch definition of NUM_REGS"
447 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_REGS)
448 #define NUM_REGS (gdbarch_num_regs (current_gdbarch))
452 /* This macro gives the number of pseudo-registers that live in the
453 register namespace but do not get fetched or stored on the target.
454 These pseudo-registers may be aliases for other registers,
455 combinations of other registers, or they may be computed by GDB. */
457 /* Default (value) for non- multi-arch platforms. */
458 #if (!GDB_MULTI_ARCH) && !defined (NUM_PSEUDO_REGS)
459 #define NUM_PSEUDO_REGS (0)
462 extern int gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
);
463 extern void set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
, int num_pseudo_regs
);
464 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
465 #error "Non multi-arch definition of NUM_PSEUDO_REGS"
468 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_PSEUDO_REGS)
469 #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
473 extern int gdbarch_sp_regnum (struct gdbarch
*gdbarch
);
474 extern void set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
, int sp_regnum
);
475 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
476 #error "Non multi-arch definition of SP_REGNUM"
479 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SP_REGNUM)
480 #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
484 extern int gdbarch_fp_regnum (struct gdbarch
*gdbarch
);
485 extern void set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
, int fp_regnum
);
486 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP_REGNUM)
487 #error "Non multi-arch definition of FP_REGNUM"
490 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP_REGNUM)
491 #define FP_REGNUM (gdbarch_fp_regnum (current_gdbarch))
495 extern int gdbarch_pc_regnum (struct gdbarch
*gdbarch
);
496 extern void set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
, int pc_regnum
);
497 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
498 #error "Non multi-arch definition of PC_REGNUM"
501 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_REGNUM)
502 #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
506 /* Default (value) for non- multi-arch platforms. */
507 #if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM)
508 #define FP0_REGNUM (-1)
511 extern int gdbarch_fp0_regnum (struct gdbarch
*gdbarch
);
512 extern void set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
, int fp0_regnum
);
513 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
514 #error "Non multi-arch definition of FP0_REGNUM"
517 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP0_REGNUM)
518 #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
522 /* Default (value) for non- multi-arch platforms. */
523 #if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM)
524 #define NPC_REGNUM (-1)
527 extern int gdbarch_npc_regnum (struct gdbarch
*gdbarch
);
528 extern void set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
, int npc_regnum
);
529 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
530 #error "Non multi-arch definition of NPC_REGNUM"
533 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NPC_REGNUM)
534 #define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
538 /* Default (value) for non- multi-arch platforms. */
539 #if (!GDB_MULTI_ARCH) && !defined (NNPC_REGNUM)
540 #define NNPC_REGNUM (-1)
543 extern int gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
);
544 extern void set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
, int nnpc_regnum
);
545 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NNPC_REGNUM)
546 #error "Non multi-arch definition of NNPC_REGNUM"
549 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NNPC_REGNUM)
550 #define NNPC_REGNUM (gdbarch_nnpc_regnum (current_gdbarch))
554 /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
556 /* Default (function) for non- multi-arch platforms. */
557 #if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM)
558 #define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr))
561 typedef int (gdbarch_stab_reg_to_regnum_ftype
) (int stab_regnr
);
562 extern int gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
);
563 extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
);
564 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
565 #error "Non multi-arch definition of STAB_REG_TO_REGNUM"
568 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STAB_REG_TO_REGNUM)
569 #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
573 /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
575 /* Default (function) for non- multi-arch platforms. */
576 #if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM)
577 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr))
580 typedef int (gdbarch_ecoff_reg_to_regnum_ftype
) (int ecoff_regnr
);
581 extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
);
582 extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
);
583 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
584 #error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
587 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ECOFF_REG_TO_REGNUM)
588 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
592 /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
594 /* Default (function) for non- multi-arch platforms. */
595 #if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM)
596 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr))
599 typedef int (gdbarch_dwarf_reg_to_regnum_ftype
) (int dwarf_regnr
);
600 extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
);
601 extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
);
602 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
603 #error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
606 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF_REG_TO_REGNUM)
607 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
611 /* Convert from an sdb register number to an internal gdb register number.
612 This should be defined in tm.h, if REGISTER_NAMES is not set up
613 to map one to one onto the sdb register numbers. */
615 /* Default (function) for non- multi-arch platforms. */
616 #if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM)
617 #define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr))
620 typedef int (gdbarch_sdb_reg_to_regnum_ftype
) (int sdb_regnr
);
621 extern int gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
);
622 extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
);
623 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
624 #error "Non multi-arch definition of SDB_REG_TO_REGNUM"
627 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SDB_REG_TO_REGNUM)
628 #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
632 /* Default (function) for non- multi-arch platforms. */
633 #if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
634 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr))
637 typedef int (gdbarch_dwarf2_reg_to_regnum_ftype
) (int dwarf2_regnr
);
638 extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
);
639 extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
);
640 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
641 #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
644 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_REG_TO_REGNUM)
645 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
649 /* Default (function) for non- multi-arch platforms. */
650 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
651 #define REGISTER_NAME(regnr) (legacy_register_name (regnr))
654 typedef char * (gdbarch_register_name_ftype
) (int regnr
);
655 extern char * gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
);
656 extern void set_gdbarch_register_name (struct gdbarch
*gdbarch
, gdbarch_register_name_ftype
*register_name
);
657 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
658 #error "Non multi-arch definition of REGISTER_NAME"
661 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_NAME)
662 #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
666 extern int gdbarch_register_size (struct gdbarch
*gdbarch
);
667 extern void set_gdbarch_register_size (struct gdbarch
*gdbarch
, int register_size
);
668 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIZE)
669 #error "Non multi-arch definition of REGISTER_SIZE"
672 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIZE)
673 #define REGISTER_SIZE (gdbarch_register_size (current_gdbarch))
677 extern int gdbarch_register_bytes (struct gdbarch
*gdbarch
);
678 extern void set_gdbarch_register_bytes (struct gdbarch
*gdbarch
, int register_bytes
);
679 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES)
680 #error "Non multi-arch definition of REGISTER_BYTES"
683 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES)
684 #define REGISTER_BYTES (gdbarch_register_bytes (current_gdbarch))
688 typedef int (gdbarch_register_byte_ftype
) (int reg_nr
);
689 extern int gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
);
690 extern void set_gdbarch_register_byte (struct gdbarch
*gdbarch
, gdbarch_register_byte_ftype
*register_byte
);
691 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
692 #error "Non multi-arch definition of REGISTER_BYTE"
695 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE)
696 #define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr))
700 typedef int (gdbarch_register_raw_size_ftype
) (int reg_nr
);
701 extern int gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
);
702 extern void set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
, gdbarch_register_raw_size_ftype
*register_raw_size
);
703 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
704 #error "Non multi-arch definition of REGISTER_RAW_SIZE"
707 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE)
708 #define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr))
712 extern int gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
);
713 extern void set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
, int max_register_raw_size
);
714 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_RAW_SIZE)
715 #error "Non multi-arch definition of MAX_REGISTER_RAW_SIZE"
718 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_RAW_SIZE)
719 #define MAX_REGISTER_RAW_SIZE (gdbarch_max_register_raw_size (current_gdbarch))
723 typedef int (gdbarch_register_virtual_size_ftype
) (int reg_nr
);
724 extern int gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
);
725 extern void set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, gdbarch_register_virtual_size_ftype
*register_virtual_size
);
726 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
727 #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
730 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE)
731 #define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr))
735 extern int gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
);
736 extern void set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
, int max_register_virtual_size
);
737 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_VIRTUAL_SIZE)
738 #error "Non multi-arch definition of MAX_REGISTER_VIRTUAL_SIZE"
741 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_VIRTUAL_SIZE)
742 #define MAX_REGISTER_VIRTUAL_SIZE (gdbarch_max_register_virtual_size (current_gdbarch))
746 typedef struct type
* (gdbarch_register_virtual_type_ftype
) (int reg_nr
);
747 extern struct type
* gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
);
748 extern void set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, gdbarch_register_virtual_type_ftype
*register_virtual_type
);
749 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
750 #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
753 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE)
754 #define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr))
758 /* Default (function) for non- multi-arch platforms. */
759 #if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO)
760 #define DO_REGISTERS_INFO(reg_nr, fpregs) (do_registers_info (reg_nr, fpregs))
763 typedef void (gdbarch_do_registers_info_ftype
) (int reg_nr
, int fpregs
);
764 extern void gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
);
765 extern void set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
, gdbarch_do_registers_info_ftype
*do_registers_info
);
766 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO)
767 #error "Non multi-arch definition of DO_REGISTERS_INFO"
770 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO)
771 #define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs))
775 /* MAP a GDB RAW register number onto a simulator register number. See
776 also include/...-sim.h. */
778 /* Default (function) for non- multi-arch platforms. */
779 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
780 #define REGISTER_SIM_REGNO(reg_nr) (default_register_sim_regno (reg_nr))
783 typedef int (gdbarch_register_sim_regno_ftype
) (int reg_nr
);
784 extern int gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
);
785 extern void set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, gdbarch_register_sim_regno_ftype
*register_sim_regno
);
786 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
787 #error "Non multi-arch definition of REGISTER_SIM_REGNO"
790 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIM_REGNO)
791 #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
795 #if defined (REGISTER_BYTES_OK)
796 /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
797 #if !defined (REGISTER_BYTES_OK_P)
798 #define REGISTER_BYTES_OK_P() (1)
802 /* Default predicate for non- multi-arch targets. */
803 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
804 #define REGISTER_BYTES_OK_P() (0)
807 extern int gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
);
808 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
809 #error "Non multi-arch definition of REGISTER_BYTES_OK"
811 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
812 #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
815 /* Default (function) for non- multi-arch platforms. */
816 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
817 #define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
820 typedef int (gdbarch_register_bytes_ok_ftype
) (long nr_bytes
);
821 extern int gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
);
822 extern void set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, gdbarch_register_bytes_ok_ftype
*register_bytes_ok
);
823 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
824 #error "Non multi-arch definition of REGISTER_BYTES_OK"
827 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK)
828 #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
832 /* Default (function) for non- multi-arch platforms. */
833 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
834 #define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
837 typedef int (gdbarch_cannot_fetch_register_ftype
) (int regnum
);
838 extern int gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
);
839 extern void set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
);
840 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
841 #error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
844 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_FETCH_REGISTER)
845 #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
849 /* Default (function) for non- multi-arch platforms. */
850 #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
851 #define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
854 typedef int (gdbarch_cannot_store_register_ftype
) (int regnum
);
855 extern int gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
);
856 extern void set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, gdbarch_cannot_store_register_ftype
*cannot_store_register
);
857 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
858 #error "Non multi-arch definition of CANNOT_STORE_REGISTER"
861 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STORE_REGISTER)
862 #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
866 extern int gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
);
867 extern void set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
, int use_generic_dummy_frames
);
868 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_GENERIC_DUMMY_FRAMES)
869 #error "Non multi-arch definition of USE_GENERIC_DUMMY_FRAMES"
872 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_GENERIC_DUMMY_FRAMES)
873 #define USE_GENERIC_DUMMY_FRAMES (gdbarch_use_generic_dummy_frames (current_gdbarch))
877 extern int gdbarch_call_dummy_location (struct gdbarch
*gdbarch
);
878 extern void set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
, int call_dummy_location
);
879 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
880 #error "Non multi-arch definition of CALL_DUMMY_LOCATION"
883 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LOCATION)
884 #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
888 typedef CORE_ADDR (gdbarch_call_dummy_address_ftype
) (void);
889 extern CORE_ADDR
gdbarch_call_dummy_address (struct gdbarch
*gdbarch
);
890 extern void set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
, gdbarch_call_dummy_address_ftype
*call_dummy_address
);
891 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
892 #error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
895 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_ADDRESS)
896 #define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
900 extern CORE_ADDR
gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
);
901 extern void set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
, CORE_ADDR call_dummy_start_offset
);
902 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_START_OFFSET)
903 #error "Non multi-arch definition of CALL_DUMMY_START_OFFSET"
906 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_START_OFFSET)
907 #define CALL_DUMMY_START_OFFSET (gdbarch_call_dummy_start_offset (current_gdbarch))
911 extern CORE_ADDR
gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
);
912 extern void set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
, CORE_ADDR call_dummy_breakpoint_offset
);
913 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET)
914 #error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET"
917 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET)
918 #define CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_call_dummy_breakpoint_offset (current_gdbarch))
922 extern int gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
);
923 extern void set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
, int call_dummy_breakpoint_offset_p
);
924 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
925 #error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET_P"
928 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
929 #define CALL_DUMMY_BREAKPOINT_OFFSET_P (gdbarch_call_dummy_breakpoint_offset_p (current_gdbarch))
933 extern int gdbarch_call_dummy_length (struct gdbarch
*gdbarch
);
934 extern void set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
, int call_dummy_length
);
935 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LENGTH)
936 #error "Non multi-arch definition of CALL_DUMMY_LENGTH"
939 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LENGTH)
940 #define CALL_DUMMY_LENGTH (gdbarch_call_dummy_length (current_gdbarch))
944 typedef int (gdbarch_pc_in_call_dummy_ftype
) (CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
);
945 extern int gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
);
946 extern void set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
);
947 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_CALL_DUMMY)
948 #error "Non multi-arch definition of PC_IN_CALL_DUMMY"
951 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_CALL_DUMMY)
952 #define PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
956 extern int gdbarch_call_dummy_p (struct gdbarch
*gdbarch
);
957 extern void set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
, int call_dummy_p
);
958 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_P)
959 #error "Non multi-arch definition of CALL_DUMMY_P"
962 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_P)
963 #define CALL_DUMMY_P (gdbarch_call_dummy_p (current_gdbarch))
967 /* Default (value) for non- multi-arch platforms. */
968 #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_WORDS)
969 #define CALL_DUMMY_WORDS (legacy_call_dummy_words)
972 extern LONGEST
* gdbarch_call_dummy_words (struct gdbarch
*gdbarch
);
973 extern void set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
, LONGEST
* call_dummy_words
);
974 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_WORDS)
975 #error "Non multi-arch definition of CALL_DUMMY_WORDS"
978 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_WORDS)
979 #define CALL_DUMMY_WORDS (gdbarch_call_dummy_words (current_gdbarch))
983 /* Default (value) for non- multi-arch platforms. */
984 #if (!GDB_MULTI_ARCH) && !defined (SIZEOF_CALL_DUMMY_WORDS)
985 #define SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words)
988 extern int gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
);
989 extern void set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
, int sizeof_call_dummy_words
);
990 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIZEOF_CALL_DUMMY_WORDS)
991 #error "Non multi-arch definition of SIZEOF_CALL_DUMMY_WORDS"
994 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIZEOF_CALL_DUMMY_WORDS)
995 #define SIZEOF_CALL_DUMMY_WORDS (gdbarch_sizeof_call_dummy_words (current_gdbarch))
999 extern int gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
);
1000 extern void set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
, int call_dummy_stack_adjust_p
);
1001 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST_P)
1002 #error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST_P"
1005 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST_P)
1006 #define CALL_DUMMY_STACK_ADJUST_P (gdbarch_call_dummy_stack_adjust_p (current_gdbarch))
1010 extern int gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
);
1011 extern void set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
, int call_dummy_stack_adjust
);
1012 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST)
1013 #error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST"
1016 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST)
1017 #define CALL_DUMMY_STACK_ADJUST (gdbarch_call_dummy_stack_adjust (current_gdbarch))
1021 typedef void (gdbarch_fix_call_dummy_ftype
) (char *dummy
, CORE_ADDR pc
, CORE_ADDR fun
, int nargs
, struct value
**args
, struct type
*type
, int gcc_p
);
1022 extern void gdbarch_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
);
1023 extern void set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
, gdbarch_fix_call_dummy_ftype
*fix_call_dummy
);
1024 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY)
1025 #error "Non multi-arch definition of FIX_CALL_DUMMY"
1028 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY)
1029 #define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p))
1033 /* Default (function) for non- multi-arch platforms. */
1034 #if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC_FIRST)
1035 #define INIT_FRAME_PC_FIRST(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
1038 typedef void (gdbarch_init_frame_pc_first_ftype
) (int fromleaf
, struct frame_info
*prev
);
1039 extern void gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
);
1040 extern void set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
);
1041 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_FRAME_PC_FIRST)
1042 #error "Non multi-arch definition of INIT_FRAME_PC_FIRST"
1045 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_FRAME_PC_FIRST)
1046 #define INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_init_frame_pc_first (current_gdbarch, fromleaf, prev))
1050 /* Default (function) for non- multi-arch platforms. */
1051 #if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC)
1052 #define INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_default (fromleaf, prev))
1055 typedef void (gdbarch_init_frame_pc_ftype
) (int fromleaf
, struct frame_info
*prev
);
1056 extern void gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
);
1057 extern void set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, gdbarch_init_frame_pc_ftype
*init_frame_pc
);
1058 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_FRAME_PC)
1059 #error "Non multi-arch definition of INIT_FRAME_PC"
1062 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_FRAME_PC)
1063 #define INIT_FRAME_PC(fromleaf, prev) (gdbarch_init_frame_pc (current_gdbarch, fromleaf, prev))
1067 extern int gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
);
1068 extern void set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
, int believe_pcc_promotion
);
1069 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
1070 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
1073 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION)
1074 #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
1078 extern int gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
);
1079 extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
, int believe_pcc_promotion_type
);
1080 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
1081 #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
1084 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION_TYPE)
1085 #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
1089 /* Default (function) for non- multi-arch platforms. */
1090 #if (!GDB_MULTI_ARCH) && !defined (COERCE_FLOAT_TO_DOUBLE)
1091 #define COERCE_FLOAT_TO_DOUBLE(formal, actual) (default_coerce_float_to_double (formal, actual))
1094 typedef int (gdbarch_coerce_float_to_double_ftype
) (struct type
*formal
, struct type
*actual
);
1095 extern int gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
);
1096 extern void set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
);
1097 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COERCE_FLOAT_TO_DOUBLE)
1098 #error "Non multi-arch definition of COERCE_FLOAT_TO_DOUBLE"
1101 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COERCE_FLOAT_TO_DOUBLE)
1102 #define COERCE_FLOAT_TO_DOUBLE(formal, actual) (gdbarch_coerce_float_to_double (current_gdbarch, formal, actual))
1106 typedef void (gdbarch_get_saved_register_ftype
) (char *raw_buffer
, int *optimized
, CORE_ADDR
*addrp
, struct frame_info
*frame
, int regnum
, enum lval_type
*lval
);
1107 extern void gdbarch_get_saved_register (struct gdbarch
*gdbarch
, char *raw_buffer
, int *optimized
, CORE_ADDR
*addrp
, struct frame_info
*frame
, int regnum
, enum lval_type
*lval
);
1108 extern void set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
, gdbarch_get_saved_register_ftype
*get_saved_register
);
1109 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
1110 #error "Non multi-arch definition of GET_SAVED_REGISTER"
1113 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
1114 #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
1118 /* Default (function) for non- multi-arch platforms. */
1119 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE)
1120 #define REGISTER_CONVERTIBLE(nr) (generic_register_convertible_not (nr))
1123 typedef int (gdbarch_register_convertible_ftype
) (int nr
);
1124 extern int gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
);
1125 extern void set_gdbarch_register_convertible (struct gdbarch
*gdbarch
, gdbarch_register_convertible_ftype
*register_convertible
);
1126 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE)
1127 #error "Non multi-arch definition of REGISTER_CONVERTIBLE"
1130 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERTIBLE)
1131 #define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr))
1135 /* Default (function) for non- multi-arch platforms. */
1136 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL)
1137 #define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0)
1140 typedef void (gdbarch_register_convert_to_virtual_ftype
) (int regnum
, struct type
*type
, char *from
, char *to
);
1141 extern void gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
);
1142 extern void set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
);
1143 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL)
1144 #error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL"
1147 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_VIRTUAL)
1148 #define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
1152 /* Default (function) for non- multi-arch platforms. */
1153 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW)
1154 #define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0)
1157 typedef void (gdbarch_register_convert_to_raw_ftype
) (struct type
*type
, int regnum
, char *from
, char *to
);
1158 extern void gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
);
1159 extern void set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
);
1160 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW)
1161 #error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW"
1164 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_RAW)
1165 #define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
1169 /* This function is called when the value of a pseudo-register needs to
1170 be updated. Typically it will be defined on a per-architecture
1173 /* Default (function) for non- multi-arch platforms. */
1174 #if (!GDB_MULTI_ARCH) && !defined (FETCH_PSEUDO_REGISTER)
1175 #define FETCH_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "FETCH_PSEUDO_REGISTER"), 0)
1178 typedef void (gdbarch_fetch_pseudo_register_ftype
) (int regnum
);
1179 extern void gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
);
1180 extern void set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
);
1181 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_PSEUDO_REGISTER)
1182 #error "Non multi-arch definition of FETCH_PSEUDO_REGISTER"
1185 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_PSEUDO_REGISTER)
1186 #define FETCH_PSEUDO_REGISTER(regnum) (gdbarch_fetch_pseudo_register (current_gdbarch, regnum))
1190 /* This function is called when the value of a pseudo-register needs to
1191 be set or stored. Typically it will be defined on a
1192 per-architecture basis. */
1194 /* Default (function) for non- multi-arch platforms. */
1195 #if (!GDB_MULTI_ARCH) && !defined (STORE_PSEUDO_REGISTER)
1196 #define STORE_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "STORE_PSEUDO_REGISTER"), 0)
1199 typedef void (gdbarch_store_pseudo_register_ftype
) (int regnum
);
1200 extern void gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
);
1201 extern void set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, gdbarch_store_pseudo_register_ftype
*store_pseudo_register
);
1202 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_PSEUDO_REGISTER)
1203 #error "Non multi-arch definition of STORE_PSEUDO_REGISTER"
1206 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_PSEUDO_REGISTER)
1207 #define STORE_PSEUDO_REGISTER(regnum) (gdbarch_store_pseudo_register (current_gdbarch, regnum))
1211 /* Default (function) for non- multi-arch platforms. */
1212 #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
1213 #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
1216 typedef CORE_ADDR (gdbarch_pointer_to_address_ftype
) (struct type
*type
, void *buf
);
1217 extern CORE_ADDR
gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
);
1218 extern void set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, gdbarch_pointer_to_address_ftype
*pointer_to_address
);
1219 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
1220 #error "Non multi-arch definition of POINTER_TO_ADDRESS"
1223 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POINTER_TO_ADDRESS)
1224 #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
1228 /* Default (function) for non- multi-arch platforms. */
1229 #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
1230 #define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr))
1233 typedef void (gdbarch_address_to_pointer_ftype
) (struct type
*type
, void *buf
, CORE_ADDR addr
);
1234 extern void gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
);
1235 extern void set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, gdbarch_address_to_pointer_ftype
*address_to_pointer
);
1236 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
1237 #error "Non multi-arch definition of ADDRESS_TO_POINTER"
1240 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_TO_POINTER)
1241 #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
1245 #if defined (INTEGER_TO_ADDRESS)
1246 /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
1247 #if !defined (INTEGER_TO_ADDRESS_P)
1248 #define INTEGER_TO_ADDRESS_P() (1)
1252 /* Default predicate for non- multi-arch targets. */
1253 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P)
1254 #define INTEGER_TO_ADDRESS_P() (0)
1257 extern int gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
);
1258 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P)
1259 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1261 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P)
1262 #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch))
1265 /* Default (function) for non- multi-arch platforms. */
1266 #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
1267 #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0)
1270 typedef CORE_ADDR (gdbarch_integer_to_address_ftype
) (struct type
*type
, void *buf
);
1271 extern CORE_ADDR
gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
);
1272 extern void set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
, gdbarch_integer_to_address_ftype
*integer_to_address
);
1273 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
1274 #error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1277 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS)
1278 #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
1282 /* Default (function) for non- multi-arch platforms. */
1283 #if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
1284 #define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type))
1287 typedef int (gdbarch_return_value_on_stack_ftype
) (struct type
*type
);
1288 extern int gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
);
1289 extern void set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, gdbarch_return_value_on_stack_ftype
*return_value_on_stack
);
1290 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
1291 #error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
1294 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (RETURN_VALUE_ON_STACK)
1295 #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
1299 typedef void (gdbarch_extract_return_value_ftype
) (struct type
*type
, char *regbuf
, char *valbuf
);
1300 extern void gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
);
1301 extern void set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
, gdbarch_extract_return_value_ftype
*extract_return_value
);
1302 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
1303 #error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
1306 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
1307 #define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regbuf, valbuf))
1311 typedef CORE_ADDR (gdbarch_push_arguments_ftype
) (int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
);
1312 extern CORE_ADDR
gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
);
1313 extern void set_gdbarch_push_arguments (struct gdbarch
*gdbarch
, gdbarch_push_arguments_ftype
*push_arguments
);
1314 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_ARGUMENTS)
1315 #error "Non multi-arch definition of PUSH_ARGUMENTS"
1318 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_ARGUMENTS)
1319 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
1323 typedef void (gdbarch_push_dummy_frame_ftype
) (void);
1324 extern void gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
);
1325 extern void set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
, gdbarch_push_dummy_frame_ftype
*push_dummy_frame
);
1326 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_DUMMY_FRAME)
1327 #error "Non multi-arch definition of PUSH_DUMMY_FRAME"
1330 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_DUMMY_FRAME)
1331 #define PUSH_DUMMY_FRAME (gdbarch_push_dummy_frame (current_gdbarch))
1335 #if defined (PUSH_RETURN_ADDRESS)
1336 /* Legacy for systems yet to multi-arch PUSH_RETURN_ADDRESS */
1337 #if !defined (PUSH_RETURN_ADDRESS_P)
1338 #define PUSH_RETURN_ADDRESS_P() (1)
1342 /* Default predicate for non- multi-arch targets. */
1343 #if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS_P)
1344 #define PUSH_RETURN_ADDRESS_P() (0)
1347 extern int gdbarch_push_return_address_p (struct gdbarch
*gdbarch
);
1348 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS_P)
1349 #error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
1351 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS_P)
1352 #define PUSH_RETURN_ADDRESS_P() (gdbarch_push_return_address_p (current_gdbarch))
1355 /* Default (function) for non- multi-arch platforms. */
1356 #if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS)
1357 #define PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "PUSH_RETURN_ADDRESS"), 0)
1360 typedef CORE_ADDR (gdbarch_push_return_address_ftype
) (CORE_ADDR pc
, CORE_ADDR sp
);
1361 extern CORE_ADDR
gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
);
1362 extern void set_gdbarch_push_return_address (struct gdbarch
*gdbarch
, gdbarch_push_return_address_ftype
*push_return_address
);
1363 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS)
1364 #error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
1367 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS)
1368 #define PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_push_return_address (current_gdbarch, pc, sp))
1372 typedef void (gdbarch_pop_frame_ftype
) (void);
1373 extern void gdbarch_pop_frame (struct gdbarch
*gdbarch
);
1374 extern void set_gdbarch_pop_frame (struct gdbarch
*gdbarch
, gdbarch_pop_frame_ftype
*pop_frame
);
1375 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POP_FRAME)
1376 #error "Non multi-arch definition of POP_FRAME"
1379 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POP_FRAME)
1380 #define POP_FRAME (gdbarch_pop_frame (current_gdbarch))
1384 typedef void (gdbarch_store_struct_return_ftype
) (CORE_ADDR addr
, CORE_ADDR sp
);
1385 extern void gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
);
1386 extern void set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
, gdbarch_store_struct_return_ftype
*store_struct_return
);
1387 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_STRUCT_RETURN)
1388 #error "Non multi-arch definition of STORE_STRUCT_RETURN"
1391 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_STRUCT_RETURN)
1392 #define STORE_STRUCT_RETURN(addr, sp) (gdbarch_store_struct_return (current_gdbarch, addr, sp))
1396 typedef void (gdbarch_store_return_value_ftype
) (struct type
*type
, char *valbuf
);
1397 extern void gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
);
1398 extern void set_gdbarch_store_return_value (struct gdbarch
*gdbarch
, gdbarch_store_return_value_ftype
*store_return_value
);
1399 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
1400 #error "Non multi-arch definition of STORE_RETURN_VALUE"
1403 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_RETURN_VALUE)
1404 #define STORE_RETURN_VALUE(type, valbuf) (gdbarch_store_return_value (current_gdbarch, type, valbuf))
1408 #if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1409 /* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
1410 #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1411 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
1415 /* Default predicate for non- multi-arch targets. */
1416 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1417 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
1420 extern int gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
);
1421 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1422 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1424 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1425 #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
1428 /* Default (function) for non- multi-arch platforms. */
1429 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1430 #define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
1433 typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype
) (char *regbuf
);
1434 extern CORE_ADDR
gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
);
1435 extern void set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
);
1436 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1437 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1440 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1441 #define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_extract_struct_value_address (current_gdbarch, regbuf))
1445 /* Default (function) for non- multi-arch platforms. */
1446 #if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
1447 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type))
1450 typedef int (gdbarch_use_struct_convention_ftype
) (int gcc_p
, struct type
*value_type
);
1451 extern int gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
);
1452 extern void set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, gdbarch_use_struct_convention_ftype
*use_struct_convention
);
1453 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
1454 #error "Non multi-arch definition of USE_STRUCT_CONVENTION"
1457 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_STRUCT_CONVENTION)
1458 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
1462 typedef void (gdbarch_frame_init_saved_regs_ftype
) (struct frame_info
*frame
);
1463 extern void gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
);
1464 extern void set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
);
1465 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_INIT_SAVED_REGS)
1466 #error "Non multi-arch definition of FRAME_INIT_SAVED_REGS"
1469 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_INIT_SAVED_REGS)
1470 #define FRAME_INIT_SAVED_REGS(frame) (gdbarch_frame_init_saved_regs (current_gdbarch, frame))
1474 #if defined (INIT_EXTRA_FRAME_INFO)
1475 /* Legacy for systems yet to multi-arch INIT_EXTRA_FRAME_INFO */
1476 #if !defined (INIT_EXTRA_FRAME_INFO_P)
1477 #define INIT_EXTRA_FRAME_INFO_P() (1)
1481 /* Default predicate for non- multi-arch targets. */
1482 #if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO_P)
1483 #define INIT_EXTRA_FRAME_INFO_P() (0)
1486 extern int gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
);
1487 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO_P)
1488 #error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO"
1490 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO_P)
1491 #define INIT_EXTRA_FRAME_INFO_P() (gdbarch_init_extra_frame_info_p (current_gdbarch))
1494 /* Default (function) for non- multi-arch platforms. */
1495 #if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO)
1496 #define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "INIT_EXTRA_FRAME_INFO"), 0)
1499 typedef void (gdbarch_init_extra_frame_info_ftype
) (int fromleaf
, struct frame_info
*frame
);
1500 extern void gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
);
1501 extern void set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
);
1502 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO)
1503 #error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO"
1506 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO)
1507 #define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_init_extra_frame_info (current_gdbarch, fromleaf, frame))
1511 typedef CORE_ADDR (gdbarch_skip_prologue_ftype
) (CORE_ADDR ip
);
1512 extern CORE_ADDR
gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
);
1513 extern void set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
, gdbarch_skip_prologue_ftype
*skip_prologue
);
1514 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
1515 #error "Non multi-arch definition of SKIP_PROLOGUE"
1518 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_PROLOGUE)
1519 #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
1523 /* Default (function) for non- multi-arch platforms. */
1524 #if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
1525 #define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip))
1528 typedef int (gdbarch_prologue_frameless_p_ftype
) (CORE_ADDR ip
);
1529 extern int gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
);
1530 extern void set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
);
1531 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
1532 #error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
1535 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PROLOGUE_FRAMELESS_P)
1536 #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
1540 typedef int (gdbarch_inner_than_ftype
) (CORE_ADDR lhs
, CORE_ADDR rhs
);
1541 extern int gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
);
1542 extern void set_gdbarch_inner_than (struct gdbarch
*gdbarch
, gdbarch_inner_than_ftype
*inner_than
);
1543 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
1544 #error "Non multi-arch definition of INNER_THAN"
1547 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INNER_THAN)
1548 #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
1552 /* Default (function) for non- multi-arch platforms. */
1553 #if (!GDB_MULTI_ARCH) && !defined (BREAKPOINT_FROM_PC)
1554 #define BREAKPOINT_FROM_PC(pcptr, lenptr) (legacy_breakpoint_from_pc (pcptr, lenptr))
1557 typedef unsigned char * (gdbarch_breakpoint_from_pc_ftype
) (CORE_ADDR
*pcptr
, int *lenptr
);
1558 extern unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
);
1559 extern void set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
);
1560 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
1561 #error "Non multi-arch definition of BREAKPOINT_FROM_PC"
1564 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BREAKPOINT_FROM_PC)
1565 #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
1569 /* Default (function) for non- multi-arch platforms. */
1570 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
1571 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache))
1574 typedef int (gdbarch_memory_insert_breakpoint_ftype
) (CORE_ADDR addr
, char *contents_cache
);
1575 extern int gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
);
1576 extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
);
1577 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
1578 #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
1581 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_INSERT_BREAKPOINT)
1582 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
1586 /* Default (function) for non- multi-arch platforms. */
1587 #if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
1588 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache))
1591 typedef int (gdbarch_memory_remove_breakpoint_ftype
) (CORE_ADDR addr
, char *contents_cache
);
1592 extern int gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
);
1593 extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
);
1594 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
1595 #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
1598 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_REMOVE_BREAKPOINT)
1599 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
1603 extern CORE_ADDR
gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
);
1604 extern void set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
, CORE_ADDR decr_pc_after_break
);
1605 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
1606 #error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
1609 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DECR_PC_AFTER_BREAK)
1610 #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
1614 /* Default (function) for non- multi-arch platforms. */
1615 #if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED)
1616 #define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it))
1619 typedef int (gdbarch_prepare_to_proceed_ftype
) (int select_it
);
1620 extern int gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
);
1621 extern void set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
);
1622 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
1623 #error "Non multi-arch definition of PREPARE_TO_PROCEED"
1626 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PREPARE_TO_PROCEED)
1627 #define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
1631 extern CORE_ADDR
gdbarch_function_start_offset (struct gdbarch
*gdbarch
);
1632 extern void set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
, CORE_ADDR function_start_offset
);
1633 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
1634 #error "Non multi-arch definition of FUNCTION_START_OFFSET"
1637 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FUNCTION_START_OFFSET)
1638 #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
1642 /* Default (function) for non- multi-arch platforms. */
1643 #if (!GDB_MULTI_ARCH) && !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
1644 #define REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len) (generic_remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len))
1647 typedef void (gdbarch_remote_translate_xfer_address_ftype
) (CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
);
1648 extern void gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
);
1649 extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
);
1650 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REMOTE_TRANSLATE_XFER_ADDRESS)
1651 #error "Non multi-arch definition of REMOTE_TRANSLATE_XFER_ADDRESS"
1654 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
1655 #define REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len) (gdbarch_remote_translate_xfer_address (current_gdbarch, gdb_addr, gdb_len, rem_addr, rem_len))
1659 extern CORE_ADDR
gdbarch_frame_args_skip (struct gdbarch
*gdbarch
);
1660 extern void set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
, CORE_ADDR frame_args_skip
);
1661 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
1662 #error "Non multi-arch definition of FRAME_ARGS_SKIP"
1665 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_SKIP)
1666 #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
1670 /* Default (function) for non- multi-arch platforms. */
1671 #if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
1672 #define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi))
1675 typedef int (gdbarch_frameless_function_invocation_ftype
) (struct frame_info
*fi
);
1676 extern int gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
);
1677 extern void set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
);
1678 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
1679 #error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
1682 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAMELESS_FUNCTION_INVOCATION)
1683 #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
1687 typedef CORE_ADDR (gdbarch_frame_chain_ftype
) (struct frame_info
*frame
);
1688 extern CORE_ADDR
gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
);
1689 extern void set_gdbarch_frame_chain (struct gdbarch
*gdbarch
, gdbarch_frame_chain_ftype
*frame_chain
);
1690 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN)
1691 #error "Non multi-arch definition of FRAME_CHAIN"
1694 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN)
1695 #define FRAME_CHAIN(frame) (gdbarch_frame_chain (current_gdbarch, frame))
1699 typedef int (gdbarch_frame_chain_valid_ftype
) (CORE_ADDR chain
, struct frame_info
*thisframe
);
1700 extern int gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
);
1701 extern void set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, gdbarch_frame_chain_valid_ftype
*frame_chain_valid
);
1702 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID)
1703 #error "Non multi-arch definition of FRAME_CHAIN_VALID"
1706 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID)
1707 #define FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_frame_chain_valid (current_gdbarch, chain, thisframe))
1711 typedef CORE_ADDR (gdbarch_frame_saved_pc_ftype
) (struct frame_info
*fi
);
1712 extern CORE_ADDR
gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
);
1713 extern void set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, gdbarch_frame_saved_pc_ftype
*frame_saved_pc
);
1714 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_SAVED_PC)
1715 #error "Non multi-arch definition of FRAME_SAVED_PC"
1718 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_SAVED_PC)
1719 #define FRAME_SAVED_PC(fi) (gdbarch_frame_saved_pc (current_gdbarch, fi))
1723 typedef CORE_ADDR (gdbarch_frame_args_address_ftype
) (struct frame_info
*fi
);
1724 extern CORE_ADDR
gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
);
1725 extern void set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
, gdbarch_frame_args_address_ftype
*frame_args_address
);
1726 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
1727 #error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
1730 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_ADDRESS)
1731 #define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
1735 typedef CORE_ADDR (gdbarch_frame_locals_address_ftype
) (struct frame_info
*fi
);
1736 extern CORE_ADDR
gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
);
1737 extern void set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, gdbarch_frame_locals_address_ftype
*frame_locals_address
);
1738 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
1739 #error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
1742 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_LOCALS_ADDRESS)
1743 #define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
1747 typedef CORE_ADDR (gdbarch_saved_pc_after_call_ftype
) (struct frame_info
*frame
);
1748 extern CORE_ADDR
gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
);
1749 extern void set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
);
1750 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVED_PC_AFTER_CALL)
1751 #error "Non multi-arch definition of SAVED_PC_AFTER_CALL"
1754 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVED_PC_AFTER_CALL)
1755 #define SAVED_PC_AFTER_CALL(frame) (gdbarch_saved_pc_after_call (current_gdbarch, frame))
1759 typedef int (gdbarch_frame_num_args_ftype
) (struct frame_info
*frame
);
1760 extern int gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
);
1761 extern void set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
, gdbarch_frame_num_args_ftype
*frame_num_args
);
1762 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
1763 #error "Non multi-arch definition of FRAME_NUM_ARGS"
1766 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS)
1767 #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
1771 #if defined (STACK_ALIGN)
1772 /* Legacy for systems yet to multi-arch STACK_ALIGN */
1773 #if !defined (STACK_ALIGN_P)
1774 #define STACK_ALIGN_P() (1)
1778 /* Default predicate for non- multi-arch targets. */
1779 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P)
1780 #define STACK_ALIGN_P() (0)
1783 extern int gdbarch_stack_align_p (struct gdbarch
*gdbarch
);
1784 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P)
1785 #error "Non multi-arch definition of STACK_ALIGN"
1787 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P)
1788 #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch))
1791 /* Default (function) for non- multi-arch platforms. */
1792 #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN)
1793 #define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0)
1796 typedef CORE_ADDR (gdbarch_stack_align_ftype
) (CORE_ADDR sp
);
1797 extern CORE_ADDR
gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
);
1798 extern void set_gdbarch_stack_align (struct gdbarch
*gdbarch
, gdbarch_stack_align_ftype
*stack_align
);
1799 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
1800 #error "Non multi-arch definition of STACK_ALIGN"
1803 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN)
1804 #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
1808 /* Default (value) for non- multi-arch platforms. */
1809 #if (!GDB_MULTI_ARCH) && !defined (EXTRA_STACK_ALIGNMENT_NEEDED)
1810 #define EXTRA_STACK_ALIGNMENT_NEEDED (1)
1813 extern int gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
);
1814 extern void set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
, int extra_stack_alignment_needed
);
1815 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRA_STACK_ALIGNMENT_NEEDED)
1816 #error "Non multi-arch definition of EXTRA_STACK_ALIGNMENT_NEEDED"
1819 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRA_STACK_ALIGNMENT_NEEDED)
1820 #define EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_extra_stack_alignment_needed (current_gdbarch))
1824 #if defined (REG_STRUCT_HAS_ADDR)
1825 /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
1826 #if !defined (REG_STRUCT_HAS_ADDR_P)
1827 #define REG_STRUCT_HAS_ADDR_P() (1)
1831 /* Default predicate for non- multi-arch targets. */
1832 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P)
1833 #define REG_STRUCT_HAS_ADDR_P() (0)
1836 extern int gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
);
1837 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P)
1838 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
1840 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P)
1841 #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch))
1844 /* Default (function) for non- multi-arch platforms. */
1845 #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR)
1846 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0)
1849 typedef int (gdbarch_reg_struct_has_addr_ftype
) (int gcc_p
, struct type
*type
);
1850 extern int gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
);
1851 extern void set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
);
1852 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
1853 #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
1856 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR)
1857 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
1861 #if defined (SAVE_DUMMY_FRAME_TOS)
1862 /* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
1863 #if !defined (SAVE_DUMMY_FRAME_TOS_P)
1864 #define SAVE_DUMMY_FRAME_TOS_P() (1)
1868 /* Default predicate for non- multi-arch targets. */
1869 #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P)
1870 #define SAVE_DUMMY_FRAME_TOS_P() (0)
1873 extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
);
1874 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
1875 #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
1877 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
1878 #define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
1881 /* Default (function) for non- multi-arch platforms. */
1882 #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
1883 #define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
1886 typedef void (gdbarch_save_dummy_frame_tos_ftype
) (CORE_ADDR sp
);
1887 extern void gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
);
1888 extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
);
1889 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
1890 #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
1893 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS)
1894 #define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
1898 extern int gdbarch_parm_boundary (struct gdbarch
*gdbarch
);
1899 extern void set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
, int parm_boundary
);
1900 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
1901 #error "Non multi-arch definition of PARM_BOUNDARY"
1904 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PARM_BOUNDARY)
1905 #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
1909 /* Default (value) for non- multi-arch platforms. */
1910 #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
1911 #define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch))
1914 extern const struct floatformat
* gdbarch_float_format (struct gdbarch
*gdbarch
);
1915 extern void set_gdbarch_float_format (struct gdbarch
*gdbarch
, const struct floatformat
* float_format
);
1916 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
1917 #error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
1920 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_FORMAT)
1921 #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
1925 /* Default (value) for non- multi-arch platforms. */
1926 #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
1927 #define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch))
1930 extern const struct floatformat
* gdbarch_double_format (struct gdbarch
*gdbarch
);
1931 extern void set_gdbarch_double_format (struct gdbarch
*gdbarch
, const struct floatformat
* double_format
);
1932 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
1933 #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
1936 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_FORMAT)
1937 #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
1941 /* Default (value) for non- multi-arch platforms. */
1942 #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
1943 #define TARGET_LONG_DOUBLE_FORMAT (&floatformat_unknown)
1946 extern const struct floatformat
* gdbarch_long_double_format (struct gdbarch
*gdbarch
);
1947 extern void set_gdbarch_long_double_format (struct gdbarch
*gdbarch
, const struct floatformat
* long_double_format
);
1948 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
1949 #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
1952 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_FORMAT)
1953 #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
1957 /* Default (function) for non- multi-arch platforms. */
1958 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
1959 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr))
1962 typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype
) (CORE_ADDR addr
);
1963 extern CORE_ADDR
gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
);
1964 extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
);
1965 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
1966 #error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
1969 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_FROM_FUNC_PTR_ADDR)
1970 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
1974 /* On some machines there are bits in addresses which are not really
1975 part of the address, but are used by the kernel, the hardware, etc.
1976 for special purposes. ADDR_BITS_REMOVE takes out any such bits so
1977 we get a "real" address such as one would find in a symbol table.
1978 This is used only for addresses of instructions, and even then I'm
1979 not sure it's used in all contexts. It exists to deal with there
1980 being a few stray bits in the PC which would mislead us, not as some
1981 sort of generic thing to handle alignment or segmentation (it's
1982 possible it should be in TARGET_READ_PC instead). */
1984 /* Default (function) for non- multi-arch platforms. */
1985 #if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE)
1986 #define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr))
1989 typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype
) (CORE_ADDR addr
);
1990 extern CORE_ADDR
gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
);
1991 extern void set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, gdbarch_addr_bits_remove_ftype
*addr_bits_remove
);
1992 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
1993 #error "Non multi-arch definition of ADDR_BITS_REMOVE"
1996 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDR_BITS_REMOVE)
1997 #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
2001 /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
2002 the target needs software single step. An ISA method to implement it.
2004 FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
2005 using the breakpoint system instead of blatting memory directly (as with rs6000).
2007 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
2008 single step. If not, then implement single step using breakpoints. */
2010 #if defined (SOFTWARE_SINGLE_STEP)
2011 /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
2012 #if !defined (SOFTWARE_SINGLE_STEP_P)
2013 #define SOFTWARE_SINGLE_STEP_P() (1)
2017 /* Default predicate for non- multi-arch targets. */
2018 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P)
2019 #define SOFTWARE_SINGLE_STEP_P() (0)
2022 extern int gdbarch_software_single_step_p (struct gdbarch
*gdbarch
);
2023 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
2024 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2026 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
2027 #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
2030 /* Default (function) for non- multi-arch platforms. */
2031 #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP)
2032 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
2035 typedef void (gdbarch_software_single_step_ftype
) (enum target_signal sig
, int insert_breakpoints_p
);
2036 extern void gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
);
2037 extern void set_gdbarch_software_single_step (struct gdbarch
*gdbarch
, gdbarch_software_single_step_ftype
*software_single_step
);
2038 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
2039 #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2042 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP)
2043 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
2047 /* Default (function) for non- multi-arch platforms. */
2048 #if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
2049 #define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info))
2052 typedef int (gdbarch_print_insn_ftype
) (bfd_vma vma
, disassemble_info
*info
);
2053 extern int gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
);
2054 extern void set_gdbarch_print_insn (struct gdbarch
*gdbarch
, gdbarch_print_insn_ftype
*print_insn
);
2055 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
2056 #error "Non multi-arch definition of TARGET_PRINT_INSN"
2059 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PRINT_INSN)
2060 #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
2064 /* Default (function) for non- multi-arch platforms. */
2065 #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
2066 #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc))
2069 typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype
) (CORE_ADDR pc
);
2070 extern CORE_ADDR
gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
);
2071 extern void set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
);
2072 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
2073 #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
2076 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_TRAMPOLINE_CODE)
2077 #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
2081 /* For SVR4 shared libraries, each call goes through a small piece of
2082 trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
2083 to nonzero if we are current stopped in one of these. */
2085 /* Default (function) for non- multi-arch platforms. */
2086 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
2087 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name))
2090 typedef int (gdbarch_in_solib_call_trampoline_ftype
) (CORE_ADDR pc
, char *name
);
2091 extern int gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
);
2092 extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
);
2093 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
2094 #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
2097 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_CALL_TRAMPOLINE)
2098 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
2102 /* A target might have problems with watchpoints as soon as the stack
2103 frame of the current function has been destroyed. This mostly happens
2104 as the first action in a funtion's epilogue. in_function_epilogue_p()
2105 is defined to return a non-zero value if either the given addr is one
2106 instruction after the stack destroying instruction up to the trailing
2107 return instruction or if we can figure out that the stack frame has
2108 already been invalidated regardless of the value of addr. Targets
2109 which don't suffer from that problem could just let this functionality
2112 typedef int (gdbarch_in_function_epilogue_p_ftype
) (struct gdbarch
*gdbarch
, CORE_ADDR addr
);
2113 extern int gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
);
2114 extern void set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
);
2116 extern struct gdbarch_tdep
*gdbarch_tdep (struct gdbarch
*gdbarch
);
2119 /* Mechanism for co-ordinating the selection of a specific
2122 GDB targets (*-tdep.c) can register an interest in a specific
2123 architecture. Other GDB components can register a need to maintain
2124 per-architecture data.
2126 The mechanisms below ensures that there is only a loose connection
2127 between the set-architecture command and the various GDB
2128 components. Each component can independently register their need
2129 to maintain architecture specific data with gdbarch.
2133 Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It
2136 The more traditional mega-struct containing architecture specific
2137 data for all the various GDB components was also considered. Since
2138 GDB is built from a variable number of (fairly independent)
2139 components it was determined that the global aproach was not
2143 /* Register a new architectural family with GDB.
2145 Register support for the specified ARCHITECTURE with GDB. When
2146 gdbarch determines that the specified architecture has been
2147 selected, the corresponding INIT function is called.
2151 The INIT function takes two parameters: INFO which contains the
2152 information available to gdbarch about the (possibly new)
2153 architecture; ARCHES which is a list of the previously created
2154 ``struct gdbarch'' for this architecture.
2156 The INIT function parameter INFO shall, as far as possible, be
2157 pre-initialized with information obtained from INFO.ABFD or
2158 previously selected architecture (if similar). INIT shall ensure
2159 that the INFO.BYTE_ORDER is non-zero.
2161 The INIT function shall return any of: NULL - indicating that it
2162 doesn't recognize the selected architecture; an existing ``struct
2163 gdbarch'' from the ARCHES list - indicating that the new
2164 architecture is just a synonym for an earlier architecture (see
2165 gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch''
2166 - that describes the selected architecture (see gdbarch_alloc()).
2168 The DUMP_TDEP function shall print out all target specific values.
2169 Care should be taken to ensure that the function works in both the
2170 multi-arch and non- multi-arch cases. */
2174 struct gdbarch
*gdbarch
;
2175 struct gdbarch_list
*next
;
2180 /* Use default: NULL (ZERO). */
2181 const struct bfd_arch_info
*bfd_arch_info
;
2183 /* Use default: 0 (ZERO). */
2186 /* Use default: NULL (ZERO). */
2189 /* Use default: NULL (ZERO). */
2190 struct gdbarch_tdep_info
*tdep_info
;
2193 typedef struct gdbarch
*(gdbarch_init_ftype
) (struct gdbarch_info info
, struct gdbarch_list
*arches
);
2194 typedef void (gdbarch_dump_tdep_ftype
) (struct gdbarch
*gdbarch
, struct ui_file
*file
);
2196 /* DEPRECATED - use gdbarch_register() */
2197 extern void register_gdbarch_init (enum bfd_architecture architecture
, gdbarch_init_ftype
*);
2199 extern void gdbarch_register (enum bfd_architecture architecture
,
2200 gdbarch_init_ftype
*,
2201 gdbarch_dump_tdep_ftype
*);
2204 /* Return a freshly allocated, NULL terminated, array of the valid
2205 architecture names. Since architectures are registered during the
2206 _initialize phase this function only returns useful information
2207 once initialization has been completed. */
2209 extern const char **gdbarch_printable_names (void);
2212 /* Helper function. Search the list of ARCHES for a GDBARCH that
2213 matches the information provided by INFO. */
2215 extern struct gdbarch_list
*gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
, const struct gdbarch_info
*info
);
2218 /* Helper function. Create a preliminary ``struct gdbarch''. Perform
2219 basic initialization using values obtained from the INFO andTDEP
2220 parameters. set_gdbarch_*() functions are called to complete the
2221 initialization of the object. */
2223 extern struct gdbarch
*gdbarch_alloc (const struct gdbarch_info
*info
, struct gdbarch_tdep
*tdep
);
2226 /* Helper function. Free a partially-constructed ``struct gdbarch''.
2227 It is assumed that the caller freeds the ``struct
2230 extern void gdbarch_free (struct gdbarch
*);
2233 /* Helper function. Force an update of the current architecture.
2235 The actual architecture selected is determined by INFO, ``(gdb) set
2236 architecture'' et.al., the existing architecture and BFD's default
2237 architecture. INFO should be initialized to zero and then selected
2238 fields should be updated.
2240 Returns non-zero if the update succeeds */
2242 extern int gdbarch_update_p (struct gdbarch_info info
);
2246 /* Register per-architecture data-pointer.
2248 Reserve space for a per-architecture data-pointer. An identifier
2249 for the reserved data-pointer is returned. That identifer should
2250 be saved in a local static variable.
2252 The per-architecture data-pointer can be initialized in one of two
2253 ways: The value can be set explicitly using a call to
2254 set_gdbarch_data(); the value can be set implicitly using the value
2255 returned by a non-NULL INIT() callback. INIT(), when non-NULL is
2256 called after the basic architecture vector has been created.
2258 When a previously created architecture is re-selected, the
2259 per-architecture data-pointer for that previous architecture is
2260 restored. INIT() is not called.
2262 During initialization, multiple assignments of the data-pointer are
2263 allowed, non-NULL values are deleted by calling FREE(). If the
2264 architecture is deleted using gdbarch_free() all non-NULL data
2265 pointers are also deleted using FREE().
2267 Multiple registrarants for any architecture are allowed (and
2268 strongly encouraged). */
2270 struct gdbarch_data
;
2272 typedef void *(gdbarch_data_init_ftype
) (struct gdbarch
*gdbarch
);
2273 typedef void (gdbarch_data_free_ftype
) (struct gdbarch
*gdbarch
,
2275 extern struct gdbarch_data
*register_gdbarch_data (gdbarch_data_init_ftype
*init
,
2276 gdbarch_data_free_ftype
*free
);
2277 extern void set_gdbarch_data (struct gdbarch
*gdbarch
,
2278 struct gdbarch_data
*data
,
2281 extern void *gdbarch_data (struct gdbarch_data
*);
2284 /* Register per-architecture memory region.
2286 Provide a memory-region swap mechanism. Per-architecture memory
2287 region are created. These memory regions are swapped whenever the
2288 architecture is changed. For a new architecture, the memory region
2289 is initialized with zero (0) and the INIT function is called.
2291 Memory regions are swapped / initialized in the order that they are
2292 registered. NULL DATA and/or INIT values can be specified.
2294 New code should use register_gdbarch_data(). */
2296 typedef void (gdbarch_swap_ftype
) (void);
2297 extern void register_gdbarch_swap (void *data
, unsigned long size
, gdbarch_swap_ftype
*init
);
2298 #define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
2302 /* The target-system-dependent byte order is dynamic */
2304 /* TARGET_BYTE_ORDER_SELECTABLE_P determines if the target endianness
2305 is selectable at runtime. The user can use the ``set endian''
2306 command to change it. TARGET_BYTE_ORDER_AUTO is nonzero when
2307 target_byte_order should be auto-detected (from the program image
2311 /* Multi-arch GDB is always bi-endian. */
2312 #define TARGET_BYTE_ORDER_SELECTABLE_P 1
2315 #ifndef TARGET_BYTE_ORDER_SELECTABLE_P
2316 /* compat - Catch old targets that define TARGET_BYTE_ORDER_SLECTABLE
2317 when they should have defined TARGET_BYTE_ORDER_SELECTABLE_P 1 */
2318 #ifdef TARGET_BYTE_ORDER_SELECTABLE
2319 #define TARGET_BYTE_ORDER_SELECTABLE_P 1
2321 #define TARGET_BYTE_ORDER_SELECTABLE_P 0
2325 extern int target_byte_order
;
2326 #ifdef TARGET_BYTE_ORDER_SELECTABLE
2327 /* compat - Catch old targets that define TARGET_BYTE_ORDER_SELECTABLE
2328 and expect defs.h to re-define TARGET_BYTE_ORDER. */
2329 #undef TARGET_BYTE_ORDER
2331 #ifndef TARGET_BYTE_ORDER
2332 #define TARGET_BYTE_ORDER (target_byte_order + 0)
2335 extern int target_byte_order_auto
;
2336 #ifndef TARGET_BYTE_ORDER_AUTO
2337 #define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
2342 /* The target-system-dependent BFD architecture is dynamic */
2344 extern int target_architecture_auto
;
2345 #ifndef TARGET_ARCHITECTURE_AUTO
2346 #define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
2349 extern const struct bfd_arch_info
*target_architecture
;
2350 #ifndef TARGET_ARCHITECTURE
2351 #define TARGET_ARCHITECTURE (target_architecture + 0)
2355 /* The target-system-dependent disassembler is semi-dynamic */
2357 extern int dis_asm_read_memory (bfd_vma memaddr
, bfd_byte
*myaddr
,
2358 unsigned int len
, disassemble_info
*info
);
2360 extern void dis_asm_memory_error (int status
, bfd_vma memaddr
,
2361 disassemble_info
*info
);
2363 extern void dis_asm_print_address (bfd_vma addr
,
2364 disassemble_info
*info
);
2366 extern int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
2367 extern disassemble_info tm_print_insn_info
;
2368 #ifndef TARGET_PRINT_INSN_INFO
2369 #define TARGET_PRINT_INSN_INFO (&tm_print_insn_info)
2374 /* Set the dynamic target-system-dependent parameters (architecture,
2375 byte-order, ...) using information found in the BFD */
2377 extern void set_gdbarch_from_file (bfd
*);
2380 /* Initialize the current architecture to the "first" one we find on
2383 extern void initialize_current_architecture (void);
2385 /* For non-multiarched targets, do any initialization of the default
2386 gdbarch object necessary after the _initialize_MODULE functions
2388 extern void initialize_non_multiarch ();
2390 /* gdbarch trace variable */
2391 extern int gdbarch_debug
;
2393 extern void gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
);