]> Git Repo - binutils.git/blame - gdb/gdbarch.h
2003-01-29 Andrew Cagney <[email protected]>
[binutils.git] / gdb / gdbarch.h
CommitLineData
59233f88
AC
1/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
2
adf40b2e 3/* Dynamic architecture support for GDB, the GNU debugger.
1e698235 4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
c906108c 5
c5aa993b 6 This file is part of GDB.
c906108c 7
c5aa993b
JM
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.
c906108c 12
c5aa993b
JM
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.
c906108c 17
c5aa993b
JM
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. */
c906108c 22
104c1213
JM
23/* This file was created with the aid of ``gdbarch.sh''.
24
52204a0b 25 The Bourne shell script ``gdbarch.sh'' creates the files
104c1213
JM
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
28 being reported.
29
30 If editing this file, please also run gdbarch.sh and merge any
52204a0b 31 changes into that script. Conversely, when making sweeping changes
104c1213
JM
32 to this file, modifying gdbarch.sh and using its output may prove
33 easier. */
adf40b2e 34
c906108c
SS
35#ifndef GDBARCH_H
36#define GDBARCH_H
37
2bf0cb65 38#include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */
fd0407d6 39#if !GDB_MULTI_ARCH
67a2b77e 40/* Pull in function declarations refered to, indirectly, via macros. */
67a2b77e 41#include "inferior.h" /* For unsigned_address_to_pointer(). */
fd0407d6 42#endif
2bf0cb65 43
cce74817
JM
44struct frame_info;
45struct value;
b6af0555 46struct objfile;
a2cf933a 47struct minimal_symbol;
049ee0e4 48struct regcache;
b59ff9d5 49struct reggroup;
0f71a2f6 50
0f71a2f6
JM
51extern struct gdbarch *current_gdbarch;
52
53
0f71a2f6
JM
54/* If any of the following are defined, the target wasn't correctly
55 converted. */
56
0f71a2f6
JM
57#if GDB_MULTI_ARCH
58#if defined (EXTRA_FRAME_INFO)
59#error "EXTRA_FRAME_INFO: replaced by struct frame_extra_info"
60#endif
61#endif
62
63#if GDB_MULTI_ARCH
64#if defined (FRAME_FIND_SAVED_REGS)
65#error "FRAME_FIND_SAVED_REGS: replaced by FRAME_INIT_SAVED_REGS"
66#endif
67#endif
68
83905903
AC
69#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE)
70#error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file."
71#endif
72
0f71a2f6
JM
73
74/* The following are pre-initialized by GDBARCH. */
75
104c1213 76extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch);
0f71a2f6 77/* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */
83905903
AC
78#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE)
79#error "Non multi-arch definition of TARGET_ARCHITECTURE"
80#endif
0f71a2f6 81#if GDB_MULTI_ARCH
6166d547 82#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ARCHITECTURE)
0f71a2f6
JM
83#define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch))
84#endif
85#endif
86
104c1213 87extern int gdbarch_byte_order (struct gdbarch *gdbarch);
0f71a2f6 88/* set_gdbarch_byte_order() - not applicable - pre-initialized. */
83905903
AC
89#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER)
90#error "Non multi-arch definition of TARGET_BYTE_ORDER"
91#endif
0f71a2f6 92#if GDB_MULTI_ARCH
6166d547 93#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BYTE_ORDER)
0f71a2f6
JM
94#define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch))
95#endif
96#endif
97
4be87837
DJ
98extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
99/* set_gdbarch_osabi() - not applicable - pre-initialized. */
100#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI)
101#error "Non multi-arch definition of TARGET_OSABI"
102#endif
103#if GDB_MULTI_ARCH
104#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_OSABI)
105#define TARGET_OSABI (gdbarch_osabi (current_gdbarch))
106#endif
107#endif
108
0f71a2f6 109
99e7bb18 110/* The following are initialized by the target dependent code. */
0f71a2f6 111
66b43ecb
AC
112/* Number of bits in a char or unsigned char for the target machine.
113 Just like CHAR_BIT in <limits.h> but describes the target machine.
114 v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
115
116 Number of bits in a short or unsigned short for the target machine. */
c4093a6a 117
66b43ecb
AC
118/* Default (value) for non- multi-arch platforms. */
119#if (!GDB_MULTI_ARCH) && !defined (TARGET_SHORT_BIT)
120#define TARGET_SHORT_BIT (2*TARGET_CHAR_BIT)
0f71a2f6
JM
121#endif
122
104c1213
JM
123extern int gdbarch_short_bit (struct gdbarch *gdbarch);
124extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit);
83905903
AC
125#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT)
126#error "Non multi-arch definition of TARGET_SHORT_BIT"
127#endif
0f71a2f6 128#if GDB_MULTI_ARCH
6166d547 129#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_SHORT_BIT)
0f71a2f6
JM
130#define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch))
131#endif
132#endif
133
66b43ecb
AC
134/* Number of bits in an int or unsigned int for the target machine. */
135
136/* Default (value) for non- multi-arch platforms. */
137#if (!GDB_MULTI_ARCH) && !defined (TARGET_INT_BIT)
138#define TARGET_INT_BIT (4*TARGET_CHAR_BIT)
139#endif
140
104c1213
JM
141extern int gdbarch_int_bit (struct gdbarch *gdbarch);
142extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit);
83905903
AC
143#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT)
144#error "Non multi-arch definition of TARGET_INT_BIT"
145#endif
0f71a2f6 146#if GDB_MULTI_ARCH
6166d547 147#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_INT_BIT)
0f71a2f6
JM
148#define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch))
149#endif
150#endif
151
66b43ecb
AC
152/* Number of bits in a long or unsigned long for the target machine. */
153
154/* Default (value) for non- multi-arch platforms. */
155#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_BIT)
156#define TARGET_LONG_BIT (4*TARGET_CHAR_BIT)
157#endif
158
104c1213
JM
159extern int gdbarch_long_bit (struct gdbarch *gdbarch);
160extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit);
83905903
AC
161#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT)
162#error "Non multi-arch definition of TARGET_LONG_BIT"
163#endif
0f71a2f6 164#if GDB_MULTI_ARCH
6166d547 165#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_BIT)
0f71a2f6
JM
166#define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch))
167#endif
168#endif
169
66b43ecb
AC
170/* Number of bits in a long long or unsigned long long for the target
171 machine. */
172
173/* Default (value) for non- multi-arch platforms. */
174#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_LONG_BIT)
175#define TARGET_LONG_LONG_BIT (2*TARGET_LONG_BIT)
176#endif
177
104c1213
JM
178extern int gdbarch_long_long_bit (struct gdbarch *gdbarch);
179extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit);
83905903
AC
180#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT)
181#error "Non multi-arch definition of TARGET_LONG_LONG_BIT"
182#endif
0f71a2f6 183#if GDB_MULTI_ARCH
6166d547 184#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_LONG_BIT)
0f71a2f6
JM
185#define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch))
186#endif
187#endif
188
66b43ecb
AC
189/* Number of bits in a float for the target machine. */
190
191/* Default (value) for non- multi-arch platforms. */
192#if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_BIT)
193#define TARGET_FLOAT_BIT (4*TARGET_CHAR_BIT)
194#endif
195
104c1213
JM
196extern int gdbarch_float_bit (struct gdbarch *gdbarch);
197extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
83905903
AC
198#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT)
199#error "Non multi-arch definition of TARGET_FLOAT_BIT"
200#endif
0f71a2f6 201#if GDB_MULTI_ARCH
6166d547 202#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_BIT)
0f71a2f6
JM
203#define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
204#endif
205#endif
206
66b43ecb
AC
207/* Number of bits in a double for the target machine. */
208
209/* Default (value) for non- multi-arch platforms. */
210#if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_BIT)
211#define TARGET_DOUBLE_BIT (8*TARGET_CHAR_BIT)
212#endif
213
104c1213
JM
214extern int gdbarch_double_bit (struct gdbarch *gdbarch);
215extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit);
83905903
AC
216#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT)
217#error "Non multi-arch definition of TARGET_DOUBLE_BIT"
218#endif
0f71a2f6 219#if GDB_MULTI_ARCH
6166d547 220#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_BIT)
0f71a2f6
JM
221#define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
222#endif
223#endif
224
66b43ecb
AC
225/* Number of bits in a long double for the target machine. */
226
227/* Default (value) for non- multi-arch platforms. */
228#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_BIT)
17ef5d92 229#define TARGET_LONG_DOUBLE_BIT (8*TARGET_CHAR_BIT)
66b43ecb
AC
230#endif
231
104c1213
JM
232extern int gdbarch_long_double_bit (struct gdbarch *gdbarch);
233extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit);
83905903
AC
234#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT)
235#error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT"
236#endif
0f71a2f6 237#if GDB_MULTI_ARCH
6166d547 238#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_BIT)
0f71a2f6
JM
239#define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
240#endif
241#endif
242
52204a0b
DT
243/* For most targets, a pointer on the target and its representation as an
244 address in GDB have the same size and "look the same". For such a
245 target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT
246 / addr_bit will be set from it.
247
248 If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably
249 also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well.
250
251 ptr_bit is the size of a pointer on the target */
66b43ecb
AC
252
253/* Default (value) for non- multi-arch platforms. */
254#if (!GDB_MULTI_ARCH) && !defined (TARGET_PTR_BIT)
255#define TARGET_PTR_BIT (TARGET_INT_BIT)
256#endif
257
258extern int gdbarch_ptr_bit (struct gdbarch *gdbarch);
259extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
83905903
AC
260#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT)
261#error "Non multi-arch definition of TARGET_PTR_BIT"
262#endif
66b43ecb
AC
263#if GDB_MULTI_ARCH
264#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT)
265#define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch))
266#endif
267#endif
268
52204a0b
DT
269/* addr_bit is the size of a target address as represented in gdb */
270
271/* Default (value) for non- multi-arch platforms. */
272#if (!GDB_MULTI_ARCH) && !defined (TARGET_ADDR_BIT)
273#define TARGET_ADDR_BIT (TARGET_PTR_BIT)
274#endif
275
276extern int gdbarch_addr_bit (struct gdbarch *gdbarch);
277extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
83905903
AC
278#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT)
279#error "Non multi-arch definition of TARGET_ADDR_BIT"
280#endif
52204a0b
DT
281#if GDB_MULTI_ARCH
282#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ADDR_BIT)
283#define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch))
284#endif
285#endif
286
66b43ecb
AC
287/* Number of bits in a BFD_VMA for the target object file format. */
288
289/* Default (value) for non- multi-arch platforms. */
290#if (!GDB_MULTI_ARCH) && !defined (TARGET_BFD_VMA_BIT)
291#define TARGET_BFD_VMA_BIT (TARGET_ARCHITECTURE->bits_per_address)
292#endif
293
294extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch);
295extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit);
83905903
AC
296#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT)
297#error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
298#endif
66b43ecb
AC
299#if GDB_MULTI_ARCH
300#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT)
301#define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch))
302#endif
303#endif
304
4e409299
JB
305/* One if `char' acts like `signed char', zero if `unsigned char'. */
306
307/* Default (value) for non- multi-arch platforms. */
308#if (!GDB_MULTI_ARCH) && !defined (TARGET_CHAR_SIGNED)
309#define TARGET_CHAR_SIGNED (1)
310#endif
311
312extern int gdbarch_char_signed (struct gdbarch *gdbarch);
313extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed);
314#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED)
315#error "Non multi-arch definition of TARGET_CHAR_SIGNED"
316#endif
317#if GDB_MULTI_ARCH
318#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_CHAR_SIGNED)
319#define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch))
320#endif
321#endif
322
be8dfb87
AC
323/* Default (function) for non- multi-arch platforms. */
324#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC)
39f77062 325#define TARGET_READ_PC(ptid) (generic_target_read_pc (ptid))
be8dfb87
AC
326#endif
327
39f77062
KB
328typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid);
329extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid);
104c1213 330extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc);
83905903
AC
331#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC)
332#error "Non multi-arch definition of TARGET_READ_PC"
333#endif
0f71a2f6 334#if GDB_MULTI_ARCH
6166d547 335#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC)
39f77062 336#define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid))
0f71a2f6
JM
337#endif
338#endif
339
be8dfb87
AC
340/* Default (function) for non- multi-arch platforms. */
341#if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC)
39f77062 342#define TARGET_WRITE_PC(val, ptid) (generic_target_write_pc (val, ptid))
be8dfb87
AC
343#endif
344
39f77062
KB
345typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid);
346extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid);
104c1213 347extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc);
83905903
AC
348#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC)
349#error "Non multi-arch definition of TARGET_WRITE_PC"
350#endif
0f71a2f6 351#if GDB_MULTI_ARCH
6166d547 352#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_PC)
39f77062 353#define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
0f71a2f6
JM
354#endif
355#endif
356
be8dfb87
AC
357/* Default (function) for non- multi-arch platforms. */
358#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_FP)
359#define TARGET_READ_FP() (generic_target_read_fp ())
360#endif
361
104c1213
JM
362typedef CORE_ADDR (gdbarch_read_fp_ftype) (void);
363extern CORE_ADDR gdbarch_read_fp (struct gdbarch *gdbarch);
364extern void set_gdbarch_read_fp (struct gdbarch *gdbarch, gdbarch_read_fp_ftype *read_fp);
83905903
AC
365#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_FP)
366#error "Non multi-arch definition of TARGET_READ_FP"
367#endif
0f71a2f6 368#if GDB_MULTI_ARCH
6166d547 369#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_FP)
0f71a2f6
JM
370#define TARGET_READ_FP() (gdbarch_read_fp (current_gdbarch))
371#endif
372#endif
373
be8dfb87
AC
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 ())
377#endif
378
104c1213
JM
379typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
380extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch);
381extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp);
83905903
AC
382#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
383#error "Non multi-arch definition of TARGET_READ_SP"
384#endif
0f71a2f6 385#if GDB_MULTI_ARCH
6166d547 386#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP)
0f71a2f6
JM
387#define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
388#endif
389#endif
390
be8dfb87
AC
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))
394#endif
395
104c1213
JM
396typedef void (gdbarch_write_sp_ftype) (CORE_ADDR val);
397extern void gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
398extern void set_gdbarch_write_sp (struct gdbarch *gdbarch, gdbarch_write_sp_ftype *write_sp);
83905903
AC
399#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_SP)
400#error "Non multi-arch definition of TARGET_WRITE_SP"
401#endif
0f71a2f6 402#if GDB_MULTI_ARCH
6166d547 403#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_SP)
0f71a2f6
JM
404#define TARGET_WRITE_SP(val) (gdbarch_write_sp (current_gdbarch, val))
405#endif
406#endif
407
39d4ef09
AC
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. */
411
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))
415#endif
416
417typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
418extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
419extern 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"
422#endif
423#if GDB_MULTI_ARCH
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))
426#endif
427#endif
428
d8124050 429extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
61a0eb5b 430
d8124050
AC
431typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
432extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
433extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read);
61a0eb5b 434
d8124050 435extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
61a0eb5b 436
d8124050
AC
437typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
438extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
439extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
61a0eb5b 440
104c1213
JM
441extern int gdbarch_num_regs (struct gdbarch *gdbarch);
442extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
83905903
AC
443#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
444#error "Non multi-arch definition of NUM_REGS"
445#endif
0f71a2f6 446#if GDB_MULTI_ARCH
6166d547 447#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_REGS)
0f71a2f6
JM
448#define NUM_REGS (gdbarch_num_regs (current_gdbarch))
449#endif
450#endif
451
34620563
AC
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. */
456
0aba1244 457/* Default (value) for non- multi-arch platforms. */
6166d547 458#if (!GDB_MULTI_ARCH) && !defined (NUM_PSEUDO_REGS)
0aba1244
EZ
459#define NUM_PSEUDO_REGS (0)
460#endif
461
462extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch);
463extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs);
83905903
AC
464#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
465#error "Non multi-arch definition of NUM_PSEUDO_REGS"
466#endif
0aba1244 467#if GDB_MULTI_ARCH
6166d547 468#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_PSEUDO_REGS)
0aba1244
EZ
469#define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
470#endif
471#endif
472
c2169756
AC
473/* GDB's standard (or well known) register numbers. These can map onto
474 a real register or a pseudo (computed) register or not be defined at
1200cd6e
AC
475 all (-1). */
476
477/* Default (value) for non- multi-arch platforms. */
478#if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM)
479#define SP_REGNUM (-1)
480#endif
c2169756 481
104c1213
JM
482extern int gdbarch_sp_regnum (struct gdbarch *gdbarch);
483extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
83905903
AC
484#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
485#error "Non multi-arch definition of SP_REGNUM"
486#endif
0f71a2f6 487#if GDB_MULTI_ARCH
6166d547 488#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SP_REGNUM)
0f71a2f6
JM
489#define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
490#endif
491#endif
492
1200cd6e
AC
493/* Default (value) for non- multi-arch platforms. */
494#if (!GDB_MULTI_ARCH) && !defined (FP_REGNUM)
495#define FP_REGNUM (-1)
496#endif
497
104c1213
JM
498extern int gdbarch_fp_regnum (struct gdbarch *gdbarch);
499extern void set_gdbarch_fp_regnum (struct gdbarch *gdbarch, int fp_regnum);
83905903
AC
500#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP_REGNUM)
501#error "Non multi-arch definition of FP_REGNUM"
502#endif
0f71a2f6 503#if GDB_MULTI_ARCH
6166d547 504#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP_REGNUM)
0f71a2f6
JM
505#define FP_REGNUM (gdbarch_fp_regnum (current_gdbarch))
506#endif
507#endif
508
1200cd6e
AC
509/* Default (value) for non- multi-arch platforms. */
510#if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM)
511#define PC_REGNUM (-1)
512#endif
513
104c1213
JM
514extern int gdbarch_pc_regnum (struct gdbarch *gdbarch);
515extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
83905903
AC
516#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
517#error "Non multi-arch definition of PC_REGNUM"
518#endif
0f71a2f6 519#if GDB_MULTI_ARCH
6166d547 520#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_REGNUM)
0f71a2f6
JM
521#define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
522#endif
523#endif
524
c2169756
AC
525/* Default (value) for non- multi-arch platforms. */
526#if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM)
527#define PS_REGNUM (-1)
528#endif
529
530extern int gdbarch_ps_regnum (struct gdbarch *gdbarch);
531extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
532#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM)
533#error "Non multi-arch definition of PS_REGNUM"
534#endif
535#if GDB_MULTI_ARCH
536#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PS_REGNUM)
537#define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch))
538#endif
539#endif
540
60054393 541/* Default (value) for non- multi-arch platforms. */
6166d547 542#if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM)
60054393
MS
543#define FP0_REGNUM (-1)
544#endif
545
546extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch);
547extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
83905903
AC
548#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
549#error "Non multi-arch definition of FP0_REGNUM"
550#endif
60054393 551#if GDB_MULTI_ARCH
6166d547 552#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP0_REGNUM)
60054393
MS
553#define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
554#endif
555#endif
556
03863182 557/* Default (value) for non- multi-arch platforms. */
6166d547 558#if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM)
03863182
AC
559#define NPC_REGNUM (-1)
560#endif
561
562extern int gdbarch_npc_regnum (struct gdbarch *gdbarch);
563extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
83905903
AC
564#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
565#error "Non multi-arch definition of NPC_REGNUM"
566#endif
03863182 567#if GDB_MULTI_ARCH
6166d547 568#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NPC_REGNUM)
03863182
AC
569#define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
570#endif
571#endif
572
88c72b7d
AC
573/* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
574
575/* Default (function) for non- multi-arch platforms. */
576#if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM)
577#define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr))
578#endif
579
580typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
581extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr);
582extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum);
83905903
AC
583#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
584#error "Non multi-arch definition of STAB_REG_TO_REGNUM"
585#endif
88c72b7d
AC
586#if GDB_MULTI_ARCH
587#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STAB_REG_TO_REGNUM)
588#define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
589#endif
590#endif
591
592/* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
593
594/* Default (function) for non- multi-arch platforms. */
595#if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM)
596#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr))
597#endif
598
599typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr);
600extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr);
601extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum);
83905903
AC
602#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
603#error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
604#endif
88c72b7d
AC
605#if GDB_MULTI_ARCH
606#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ECOFF_REG_TO_REGNUM)
607#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
608#endif
609#endif
610
611/* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
612
613/* Default (function) for non- multi-arch platforms. */
614#if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM)
615#define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr))
616#endif
617
618typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr);
619extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr);
620extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum);
83905903
AC
621#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
622#error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
623#endif
88c72b7d
AC
624#if GDB_MULTI_ARCH
625#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF_REG_TO_REGNUM)
626#define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
627#endif
628#endif
629
630/* Convert from an sdb register number to an internal gdb register number.
631 This should be defined in tm.h, if REGISTER_NAMES is not set up
632 to map one to one onto the sdb register numbers. */
633
634/* Default (function) for non- multi-arch platforms. */
635#if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM)
636#define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr))
637#endif
638
639typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
640extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
641extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
83905903
AC
642#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
643#error "Non multi-arch definition of SDB_REG_TO_REGNUM"
644#endif
88c72b7d
AC
645#if GDB_MULTI_ARCH
646#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SDB_REG_TO_REGNUM)
647#define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
648#endif
649#endif
650
651/* Default (function) for non- multi-arch platforms. */
652#if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
653#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr))
654#endif
655
656typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr);
657extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
658extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum);
83905903
AC
659#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
660#error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
661#endif
88c72b7d
AC
662#if GDB_MULTI_ARCH
663#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_REG_TO_REGNUM)
664#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
665#endif
666#endif
667
33489c5b 668/* Default (function) for non- multi-arch platforms. */
6166d547 669#if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
33489c5b
AC
670#define REGISTER_NAME(regnr) (legacy_register_name (regnr))
671#endif
672
fa88f677
AC
673typedef const char * (gdbarch_register_name_ftype) (int regnr);
674extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
104c1213 675extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
83905903
AC
676#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
677#error "Non multi-arch definition of REGISTER_NAME"
678#endif
33489c5b 679#if GDB_MULTI_ARCH
6166d547 680#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_NAME)
0f71a2f6
JM
681#define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
682#endif
33489c5b 683#endif
0f71a2f6 684
104c1213
JM
685extern int gdbarch_register_size (struct gdbarch *gdbarch);
686extern void set_gdbarch_register_size (struct gdbarch *gdbarch, int register_size);
83905903
AC
687#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIZE)
688#error "Non multi-arch definition of REGISTER_SIZE"
689#endif
0f71a2f6 690#if GDB_MULTI_ARCH
6166d547 691#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIZE)
0f71a2f6
JM
692#define REGISTER_SIZE (gdbarch_register_size (current_gdbarch))
693#endif
694#endif
695
104c1213
JM
696extern int gdbarch_register_bytes (struct gdbarch *gdbarch);
697extern void set_gdbarch_register_bytes (struct gdbarch *gdbarch, int register_bytes);
83905903
AC
698#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES)
699#error "Non multi-arch definition of REGISTER_BYTES"
700#endif
0f71a2f6 701#if GDB_MULTI_ARCH
6166d547 702#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES)
0f71a2f6
JM
703#define REGISTER_BYTES (gdbarch_register_bytes (current_gdbarch))
704#endif
705#endif
706
a7e3c2ad
AC
707/* Default (function) for non- multi-arch platforms. */
708#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE)
709#define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
710#endif
711
104c1213
JM
712typedef int (gdbarch_register_byte_ftype) (int reg_nr);
713extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr);
714extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte);
83905903
AC
715#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
716#error "Non multi-arch definition of REGISTER_BYTE"
717#endif
0f71a2f6 718#if GDB_MULTI_ARCH
6166d547 719#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE)
0f71a2f6
JM
720#define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr))
721#endif
722#endif
723
b2e75d78
AC
724/* Default (function) for non- multi-arch platforms. */
725#if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
726#define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
727#endif
728
104c1213
JM
729typedef int (gdbarch_register_raw_size_ftype) (int reg_nr);
730extern int gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
731extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_register_raw_size_ftype *register_raw_size);
83905903
AC
732#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
733#error "Non multi-arch definition of REGISTER_RAW_SIZE"
734#endif
0f71a2f6 735#if GDB_MULTI_ARCH
6166d547 736#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE)
0f71a2f6
JM
737#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr))
738#endif
739#endif
740
104c1213
JM
741extern int gdbarch_max_register_raw_size (struct gdbarch *gdbarch);
742extern void set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, int max_register_raw_size);
83905903
AC
743#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_RAW_SIZE)
744#error "Non multi-arch definition of MAX_REGISTER_RAW_SIZE"
745#endif
0f71a2f6 746#if GDB_MULTI_ARCH
6166d547 747#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_RAW_SIZE)
0f71a2f6
JM
748#define MAX_REGISTER_RAW_SIZE (gdbarch_max_register_raw_size (current_gdbarch))
749#endif
750#endif
751
b2e75d78
AC
752/* Default (function) for non- multi-arch platforms. */
753#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
754#define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
755#endif
756
104c1213
JM
757typedef int (gdbarch_register_virtual_size_ftype) (int reg_nr);
758extern int gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
759extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_register_virtual_size_ftype *register_virtual_size);
83905903
AC
760#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
761#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
762#endif
0f71a2f6 763#if GDB_MULTI_ARCH
6166d547 764#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE)
0f71a2f6
JM
765#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr))
766#endif
767#endif
768
104c1213
JM
769extern int gdbarch_max_register_virtual_size (struct gdbarch *gdbarch);
770extern void set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, int max_register_virtual_size);
83905903
AC
771#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_VIRTUAL_SIZE)
772#error "Non multi-arch definition of MAX_REGISTER_VIRTUAL_SIZE"
773#endif
0f71a2f6 774#if GDB_MULTI_ARCH
6166d547 775#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_VIRTUAL_SIZE)
0f71a2f6
JM
776#define MAX_REGISTER_VIRTUAL_SIZE (gdbarch_max_register_virtual_size (current_gdbarch))
777#endif
778#endif
779
104c1213
JM
780typedef struct type * (gdbarch_register_virtual_type_ftype) (int reg_nr);
781extern struct type * gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
782extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_register_virtual_type_ftype *register_virtual_type);
83905903
AC
783#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
784#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
785#endif
0f71a2f6 786#if GDB_MULTI_ARCH
6166d547 787#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE)
0f71a2f6
JM
788#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr))
789#endif
790#endif
791
903ad3a6
AC
792#if defined (DEPRECATED_DO_REGISTERS_INFO)
793/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
794#if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
795#define DEPRECATED_DO_REGISTERS_INFO_P() (1)
0ab7a791
AC
796#endif
797#endif
798
799/* Default predicate for non- multi-arch targets. */
903ad3a6
AC
800#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
801#define DEPRECATED_DO_REGISTERS_INFO_P() (0)
0ab7a791
AC
802#endif
803
903ad3a6
AC
804extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
805#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
806#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
0ab7a791 807#endif
903ad3a6
AC
808#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
809#define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
0ab7a791
AC
810#endif
811
666e11c5 812/* Default (function) for non- multi-arch platforms. */
903ad3a6
AC
813#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO)
814#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0)
666e11c5
EZ
815#endif
816
903ad3a6
AC
817typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
818extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
819extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
820#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO)
821#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
83905903 822#endif
666e11c5 823#if GDB_MULTI_ARCH
903ad3a6
AC
824#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO)
825#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
666e11c5
EZ
826#endif
827#endif
828
0ab7a791
AC
829typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
830extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
831extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
832
23e3a7ac
AC
833extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
834
835typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
836extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
5e74b15c 837extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
5e74b15c 838
e76f1f2e
AC
839extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
840
841typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
842extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
843extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
844
7c7651b2
AC
845/* MAP a GDB RAW register number onto a simulator register number. See
846 also include/...-sim.h. */
847
848/* Default (function) for non- multi-arch platforms. */
849#if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
8238d0bf 850#define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
7c7651b2
AC
851#endif
852
853typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
854extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
855extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
83905903
AC
856#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
857#error "Non multi-arch definition of REGISTER_SIM_REGNO"
858#endif
7c7651b2
AC
859#if GDB_MULTI_ARCH
860#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIM_REGNO)
861#define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
862#endif
863#endif
864
2649061d
AC
865#if defined (REGISTER_BYTES_OK)
866/* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
eee30e78 867#if !defined (REGISTER_BYTES_OK_P)
2649061d
AC
868#define REGISTER_BYTES_OK_P() (1)
869#endif
eee30e78 870#endif
2649061d
AC
871
872/* Default predicate for non- multi-arch targets. */
873#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
874#define REGISTER_BYTES_OK_P() (0)
875#endif
876
877extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
83905903
AC
878#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
879#error "Non multi-arch definition of REGISTER_BYTES_OK"
880#endif
2649061d
AC
881#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
882#define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
883#endif
884
885/* Default (function) for non- multi-arch platforms. */
886#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
8e65ff28 887#define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
2649061d
AC
888#endif
889
890typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
891extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
892extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
83905903
AC
893#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
894#error "Non multi-arch definition of REGISTER_BYTES_OK"
895#endif
2649061d
AC
896#if GDB_MULTI_ARCH
897#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK)
898#define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
899#endif
900#endif
901
01fb7433
AC
902/* Default (function) for non- multi-arch platforms. */
903#if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
904#define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
905#endif
906
907typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
908extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
909extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
83905903
AC
910#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
911#error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
912#endif
01fb7433
AC
913#if GDB_MULTI_ARCH
914#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_FETCH_REGISTER)
915#define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
916#endif
917#endif
918
919/* Default (function) for non- multi-arch platforms. */
920#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
921#define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
922#endif
923
924typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
925extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
926extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
83905903
AC
927#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
928#error "Non multi-arch definition of CANNOT_STORE_REGISTER"
929#endif
01fb7433
AC
930#if GDB_MULTI_ARCH
931#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STORE_REGISTER)
932#define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
933#endif
934#endif
935
9df628e0
RE
936/* setjmp/longjmp support. */
937
938#if defined (GET_LONGJMP_TARGET)
939/* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */
940#if !defined (GET_LONGJMP_TARGET_P)
941#define GET_LONGJMP_TARGET_P() (1)
942#endif
943#endif
944
945/* Default predicate for non- multi-arch targets. */
946#if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P)
947#define GET_LONGJMP_TARGET_P() (0)
948#endif
949
950extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
951#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
952#error "Non multi-arch definition of GET_LONGJMP_TARGET"
953#endif
954#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
955#define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
956#endif
957
958/* Default (function) for non- multi-arch platforms. */
959#if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET)
960#define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0)
961#endif
962
963typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
964extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
965extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
966#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
967#error "Non multi-arch definition of GET_LONGJMP_TARGET"
968#endif
969#if GDB_MULTI_ARCH
970#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET)
971#define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
972#endif
973#endif
974
028c194b
AC
975/* Non multi-arch DUMMY_FRAMES are a mess (multi-arch ones are not that
976 much better but at least they are vaguely consistent). The headers
977 and body contain convoluted #if/#else sequences for determine how
978 things should be compiled. Instead of trying to mimic that
979 behaviour here (and hence entrench it further) gdbarch simply
980 reqires that these methods be set up from the word go. This also
981 avoids any potential problems with moving beyond multi-arch partial. */
982
b99fa2d2 983/* Default (value) for non- multi-arch platforms. */
07555a72
AC
984#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
985#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (1)
b99fa2d2
AC
986#endif
987
07555a72
AC
988extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch);
989extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames);
990#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
991#error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES"
83905903 992#endif
0f71a2f6 993#if GDB_MULTI_ARCH
07555a72
AC
994#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
995#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch))
0f71a2f6
JM
996#endif
997#endif
998
b99fa2d2
AC
999/* Default (value) for non- multi-arch platforms. */
1000#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_LOCATION)
1001#define CALL_DUMMY_LOCATION (AT_ENTRY_POINT)
1002#endif
1003
104c1213
JM
1004extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
1005extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
028c194b 1006#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
83905903
AC
1007#error "Non multi-arch definition of CALL_DUMMY_LOCATION"
1008#endif
0f71a2f6 1009#if GDB_MULTI_ARCH
028c194b 1010#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LOCATION)
0f71a2f6
JM
1011#define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
1012#endif
1013#endif
1014
104c1213
JM
1015typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
1016extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
1017extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
83905903
AC
1018#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
1019#error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
1020#endif
0f71a2f6 1021#if GDB_MULTI_ARCH
6166d547 1022#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_ADDRESS)
0f71a2f6
JM
1023#define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
1024#endif
1025#endif
1026
104c1213
JM
1027extern CORE_ADDR gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch);
1028extern void set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_start_offset);
83905903
AC
1029#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_START_OFFSET)
1030#error "Non multi-arch definition of CALL_DUMMY_START_OFFSET"
1031#endif
0f71a2f6 1032#if GDB_MULTI_ARCH
6166d547 1033#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_START_OFFSET)
0f71a2f6
JM
1034#define CALL_DUMMY_START_OFFSET (gdbarch_call_dummy_start_offset (current_gdbarch))
1035#endif
1036#endif
1037
104c1213
JM
1038extern CORE_ADDR gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
1039extern void set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_breakpoint_offset);
83905903
AC
1040#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET)
1041#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET"
1042#endif
0f71a2f6 1043#if GDB_MULTI_ARCH
6166d547 1044#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET)
0f71a2f6
JM
1045#define CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_call_dummy_breakpoint_offset (current_gdbarch))
1046#endif
1047#endif
1048
104c1213
JM
1049extern int gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch);
1050extern void set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, int call_dummy_breakpoint_offset_p);
028c194b 1051#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
83905903
AC
1052#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET_P"
1053#endif
0f71a2f6 1054#if GDB_MULTI_ARCH
028c194b 1055#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
0f71a2f6
JM
1056#define CALL_DUMMY_BREAKPOINT_OFFSET_P (gdbarch_call_dummy_breakpoint_offset_p (current_gdbarch))
1057#endif
1058#endif
1059
104c1213
JM
1060extern int gdbarch_call_dummy_length (struct gdbarch *gdbarch);
1061extern void set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, int call_dummy_length);
83905903
AC
1062#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LENGTH)
1063#error "Non multi-arch definition of CALL_DUMMY_LENGTH"
1064#endif
0f71a2f6 1065#if GDB_MULTI_ARCH
6166d547 1066#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LENGTH)
0f71a2f6
JM
1067#define CALL_DUMMY_LENGTH (gdbarch_call_dummy_length (current_gdbarch))
1068#endif
1069#endif
1070
ae45cd16
AC
1071/* NOTE: cagney/2002-11-24: This function with predicate has a valid
1072 (callable) initial value. As a consequence, even when the predicate
1073 is false, the corresponding function works. This simplifies the
1074 migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
1075 doesn't need to be modified. */
1076
1077#if defined (DEPRECATED_PC_IN_CALL_DUMMY)
1078/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
1079#if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1080#define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
1081#endif
1082#endif
1083
1084/* Default predicate for non- multi-arch targets. */
1085#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1086#define DEPRECATED_PC_IN_CALL_DUMMY_P() (0)
1087#endif
1088
1089extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
1090#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1091#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
1092#endif
1093#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
1094#define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
1095#endif
1096
b99fa2d2 1097/* Default (function) for non- multi-arch platforms. */
ae45cd16
AC
1098#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1099#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
b99fa2d2
AC
1100#endif
1101
ae45cd16
AC
1102typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1103extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
1104extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
1105#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY)
1106#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
83905903 1107#endif
0f71a2f6 1108#if GDB_MULTI_ARCH
ae45cd16
AC
1109#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY)
1110#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
0f71a2f6
JM
1111#endif
1112#endif
1113
104c1213
JM
1114extern int gdbarch_call_dummy_p (struct gdbarch *gdbarch);
1115extern void set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, int call_dummy_p);
028c194b 1116#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_P)
83905903
AC
1117#error "Non multi-arch definition of CALL_DUMMY_P"
1118#endif
0f71a2f6 1119#if GDB_MULTI_ARCH
028c194b 1120#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_P)
0f71a2f6
JM
1121#define CALL_DUMMY_P (gdbarch_call_dummy_p (current_gdbarch))
1122#endif
1123#endif
1124
33489c5b 1125/* Default (value) for non- multi-arch platforms. */
6166d547 1126#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_WORDS)
33489c5b
AC
1127#define CALL_DUMMY_WORDS (legacy_call_dummy_words)
1128#endif
1129
104c1213
JM
1130extern LONGEST * gdbarch_call_dummy_words (struct gdbarch *gdbarch);
1131extern void set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, LONGEST * call_dummy_words);
83905903
AC
1132#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_WORDS)
1133#error "Non multi-arch definition of CALL_DUMMY_WORDS"
1134#endif
33489c5b 1135#if GDB_MULTI_ARCH
6166d547 1136#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_WORDS)
0f71a2f6
JM
1137#define CALL_DUMMY_WORDS (gdbarch_call_dummy_words (current_gdbarch))
1138#endif
33489c5b
AC
1139#endif
1140
1141/* Default (value) for non- multi-arch platforms. */
6166d547 1142#if (!GDB_MULTI_ARCH) && !defined (SIZEOF_CALL_DUMMY_WORDS)
33489c5b
AC
1143#define SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words)
1144#endif
0f71a2f6 1145
104c1213
JM
1146extern int gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch);
1147extern void set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, int sizeof_call_dummy_words);
83905903
AC
1148#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIZEOF_CALL_DUMMY_WORDS)
1149#error "Non multi-arch definition of SIZEOF_CALL_DUMMY_WORDS"
1150#endif
33489c5b 1151#if GDB_MULTI_ARCH
6166d547 1152#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIZEOF_CALL_DUMMY_WORDS)
0f71a2f6
JM
1153#define SIZEOF_CALL_DUMMY_WORDS (gdbarch_sizeof_call_dummy_words (current_gdbarch))
1154#endif
33489c5b 1155#endif
0f71a2f6 1156
104c1213
JM
1157extern int gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch);
1158extern void set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, int call_dummy_stack_adjust_p);
028c194b 1159#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST_P)
83905903
AC
1160#error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST_P"
1161#endif
0f71a2f6 1162#if GDB_MULTI_ARCH
028c194b 1163#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST_P)
0f71a2f6
JM
1164#define CALL_DUMMY_STACK_ADJUST_P (gdbarch_call_dummy_stack_adjust_p (current_gdbarch))
1165#endif
1166#endif
1167
104c1213
JM
1168extern int gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch);
1169extern void set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, int call_dummy_stack_adjust);
83905903
AC
1170#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST)
1171#error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST"
1172#endif
0f71a2f6 1173#if GDB_MULTI_ARCH
6166d547 1174#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST)
0f71a2f6
JM
1175#define CALL_DUMMY_STACK_ADJUST (gdbarch_call_dummy_stack_adjust (current_gdbarch))
1176#endif
1177#endif
1178
104c1213
JM
1179typedef 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);
1180extern 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);
1181extern void set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_fix_call_dummy_ftype *fix_call_dummy);
83905903
AC
1182#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY)
1183#error "Non multi-arch definition of FIX_CALL_DUMMY"
1184#endif
0f71a2f6 1185#if GDB_MULTI_ARCH
6166d547 1186#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY)
0f71a2f6
JM
1187#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))
1188#endif
1189#endif
1190
2ca6c561
AC
1191#if defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1192/* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */
1193#if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1194#define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1)
1195#endif
1196#endif
1197
1198/* Default predicate for non- multi-arch targets. */
1199#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1200#define DEPRECATED_INIT_FRAME_PC_FIRST_P() (0)
1201#endif
1202
1203extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch);
1204#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1205#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
1206#endif
1207#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
1208#define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch))
1209#endif
1210
10312cc4 1211/* Default (function) for non- multi-arch platforms. */
2ca6c561
AC
1212#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1213#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC_FIRST"), 0)
10312cc4
AC
1214#endif
1215
97f46953
AC
1216typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
1217extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
2ca6c561
AC
1218extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first);
1219#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1220#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
83905903 1221#endif
10312cc4 1222#if GDB_MULTI_ARCH
2ca6c561
AC
1223#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
1224#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev))
10312cc4
AC
1225#endif
1226#endif
1227
a5afb99f
AC
1228#if defined (DEPRECATED_INIT_FRAME_PC)
1229/* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
1230#if !defined (DEPRECATED_INIT_FRAME_PC_P)
1231#define DEPRECATED_INIT_FRAME_PC_P() (1)
1232#endif
1233#endif
1234
1235/* Default predicate for non- multi-arch targets. */
1236#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_P)
1237#define DEPRECATED_INIT_FRAME_PC_P() (0)
1238#endif
1239
1240extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch);
1241#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P)
1242#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
1243#endif
1244#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P)
1245#define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch))
1246#endif
1247
10312cc4 1248/* Default (function) for non- multi-arch platforms. */
a5afb99f
AC
1249#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC)
1250#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC"), 0)
10312cc4
AC
1251#endif
1252
a5afb99f
AC
1253typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev);
1254extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
1255extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc);
1256#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC)
1257#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
83905903 1258#endif
10312cc4 1259#if GDB_MULTI_ARCH
a5afb99f
AC
1260#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC)
1261#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev))
10312cc4
AC
1262#endif
1263#endif
1264
104c1213
JM
1265extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
1266extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
83905903
AC
1267#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
1268#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
1269#endif
0f71a2f6 1270#if GDB_MULTI_ARCH
6166d547 1271#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION)
0f71a2f6
JM
1272#define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
1273#endif
1274#endif
1275
104c1213
JM
1276extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
1277extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
83905903
AC
1278#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
1279#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
1280#endif
0f71a2f6 1281#if GDB_MULTI_ARCH
6166d547 1282#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION_TYPE)
0f71a2f6
JM
1283#define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
1284#endif
1285#endif
1286
a216a322
AC
1287#if defined (GET_SAVED_REGISTER)
1288/* Legacy for systems yet to multi-arch GET_SAVED_REGISTER */
1289#if !defined (GET_SAVED_REGISTER_P)
1290#define GET_SAVED_REGISTER_P() (1)
1291#endif
1292#endif
1293
1294/* Default predicate for non- multi-arch targets. */
1295#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER_P)
1296#define GET_SAVED_REGISTER_P() (0)
1297#endif
1298
1299extern int gdbarch_get_saved_register_p (struct gdbarch *gdbarch);
1300#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER_P)
1301#error "Non multi-arch definition of GET_SAVED_REGISTER"
1302#endif
1303#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER_P)
1304#define GET_SAVED_REGISTER_P() (gdbarch_get_saved_register_p (current_gdbarch))
1305#endif
1306
e4b415d9
AC
1307/* Default (function) for non- multi-arch platforms. */
1308#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER)
a216a322 1309#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "GET_SAVED_REGISTER"), 0)
e4b415d9 1310#endif
028c194b 1311
104c1213
JM
1312typedef void (gdbarch_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
1313extern 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);
1314extern void set_gdbarch_get_saved_register (struct gdbarch *gdbarch, gdbarch_get_saved_register_ftype *get_saved_register);
e4b415d9 1315#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
83905903
AC
1316#error "Non multi-arch definition of GET_SAVED_REGISTER"
1317#endif
0f71a2f6 1318#if GDB_MULTI_ARCH
e4b415d9 1319#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
0f71a2f6
JM
1320#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
1321#endif
1322#endif
1323
33489c5b 1324/* Default (function) for non- multi-arch platforms. */
6166d547 1325#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE)
33489c5b
AC
1326#define REGISTER_CONVERTIBLE(nr) (generic_register_convertible_not (nr))
1327#endif
1328
104c1213
JM
1329typedef int (gdbarch_register_convertible_ftype) (int nr);
1330extern int gdbarch_register_convertible (struct gdbarch *gdbarch, int nr);
1331extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_register_convertible_ftype *register_convertible);
83905903
AC
1332#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE)
1333#error "Non multi-arch definition of REGISTER_CONVERTIBLE"
1334#endif
33489c5b 1335#if GDB_MULTI_ARCH
6166d547 1336#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERTIBLE)
0f71a2f6
JM
1337#define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr))
1338#endif
33489c5b
AC
1339#endif
1340
1341/* Default (function) for non- multi-arch platforms. */
6166d547 1342#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL)
8e65ff28 1343#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0)
33489c5b 1344#endif
0f71a2f6 1345
104c1213
JM
1346typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
1347extern void gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
1348extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual);
83905903
AC
1349#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL)
1350#error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL"
1351#endif
33489c5b 1352#if GDB_MULTI_ARCH
6166d547 1353#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_VIRTUAL)
0f71a2f6
JM
1354#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
1355#endif
33489c5b
AC
1356#endif
1357
1358/* Default (function) for non- multi-arch platforms. */
6166d547 1359#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW)
8e65ff28 1360#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0)
33489c5b 1361#endif
0f71a2f6 1362
104c1213
JM
1363typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to);
1364extern void gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
1365extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_register_convert_to_raw_ftype *register_convert_to_raw);
83905903
AC
1366#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW)
1367#error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW"
1368#endif
33489c5b 1369#if GDB_MULTI_ARCH
6166d547 1370#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_RAW)
0f71a2f6
JM
1371#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
1372#endif
33489c5b
AC
1373#endif
1374
13d01224
AC
1375/* Default (function) for non- multi-arch platforms. */
1376#if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P)
1377#define CONVERT_REGISTER_P(regnum) (legacy_convert_register_p (regnum))
1378#endif
1379
1380typedef int (gdbarch_convert_register_p_ftype) (int regnum);
1381extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum);
1382extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
1383#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
1384#error "Non multi-arch definition of CONVERT_REGISTER_P"
1385#endif
1386#if GDB_MULTI_ARCH
1387#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_REGISTER_P)
1388#define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum))
1389#endif
1390#endif
1391
1392/* Default (function) for non- multi-arch platforms. */
1393#if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
1394#define REGISTER_TO_VALUE(regnum, type, from, to) (legacy_register_to_value (regnum, type, from, to))
1395#endif
1396
1397typedef void (gdbarch_register_to_value_ftype) (int regnum, struct type *type, char *from, char *to);
1398extern void gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
1399extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
1400#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
1401#error "Non multi-arch definition of REGISTER_TO_VALUE"
1402#endif
1403#if GDB_MULTI_ARCH
1404#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_TO_VALUE)
1405#define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to))
1406#endif
1407#endif
1408
1409/* Default (function) for non- multi-arch platforms. */
1410#if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
1411#define VALUE_TO_REGISTER(type, regnum, from, to) (legacy_value_to_register (type, regnum, from, to))
1412#endif
1413
1414typedef void (gdbarch_value_to_register_ftype) (struct type *type, int regnum, char *from, char *to);
1415extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
1416extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
1417#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
1418#error "Non multi-arch definition of VALUE_TO_REGISTER"
1419#endif
1420#if GDB_MULTI_ARCH
1421#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (VALUE_TO_REGISTER)
1422#define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to))
1423#endif
1424#endif
1425
33489c5b 1426/* Default (function) for non- multi-arch platforms. */
6166d547 1427#if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
ac2e2ef7 1428#define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
33489c5b 1429#endif
4478b372 1430
66140c26
AC
1431typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf);
1432extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf);
4478b372 1433extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
83905903
AC
1434#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
1435#error "Non multi-arch definition of POINTER_TO_ADDRESS"
1436#endif
33489c5b 1437#if GDB_MULTI_ARCH
6166d547 1438#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POINTER_TO_ADDRESS)
4478b372
JB
1439#define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
1440#endif
33489c5b
AC
1441#endif
1442
1443/* Default (function) for non- multi-arch platforms. */
6166d547 1444#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
ac2e2ef7 1445#define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr))
33489c5b 1446#endif
4478b372 1447
ac2e2ef7
AC
1448typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr);
1449extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr);
4478b372 1450extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
83905903
AC
1451#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
1452#error "Non multi-arch definition of ADDRESS_TO_POINTER"
1453#endif
33489c5b 1454#if GDB_MULTI_ARCH
6166d547 1455#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_TO_POINTER)
4478b372
JB
1456#define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
1457#endif
33489c5b
AC
1458#endif
1459
fc0c74b1
AC
1460#if defined (INTEGER_TO_ADDRESS)
1461/* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
1462#if !defined (INTEGER_TO_ADDRESS_P)
1463#define INTEGER_TO_ADDRESS_P() (1)
1464#endif
1465#endif
1466
1467/* Default predicate for non- multi-arch targets. */
1468#if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P)
1469#define INTEGER_TO_ADDRESS_P() (0)
1470#endif
1471
1472extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch);
1473#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P)
1474#error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1475#endif
1476#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P)
1477#define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch))
1478#endif
1479
1480/* Default (function) for non- multi-arch platforms. */
1481#if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
73d3c16e 1482#define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0)
fc0c74b1
AC
1483#endif
1484
1485typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
1486extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
1487extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address);
1488#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
1489#error "Non multi-arch definition of INTEGER_TO_ADDRESS"
1490#endif
1491#if GDB_MULTI_ARCH
1492#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS)
1493#define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
1494#endif
1495#endif
1496
33489c5b 1497/* Default (function) for non- multi-arch platforms. */
6166d547 1498#if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
33489c5b
AC
1499#define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type))
1500#endif
0f71a2f6 1501
71a9f22e
JB
1502typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
1503extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
1504extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack);
83905903
AC
1505#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
1506#error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
1507#endif
33489c5b 1508#if GDB_MULTI_ARCH
6166d547 1509#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (RETURN_VALUE_ON_STACK)
71a9f22e
JB
1510#define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
1511#endif
33489c5b 1512#endif
71a9f22e 1513
c203844d
AC
1514/* Default (function) for non- multi-arch platforms. */
1515#if (!GDB_MULTI_ARCH) && !defined (PUSH_ARGUMENTS)
1516#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (default_push_arguments (nargs, args, sp, struct_return, struct_addr))
1517#endif
1518
104c1213
JM
1519typedef CORE_ADDR (gdbarch_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
1520extern CORE_ADDR gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
1521extern void set_gdbarch_push_arguments (struct gdbarch *gdbarch, gdbarch_push_arguments_ftype *push_arguments);
83905903
AC
1522#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_ARGUMENTS)
1523#error "Non multi-arch definition of PUSH_ARGUMENTS"
1524#endif
0f71a2f6 1525#if GDB_MULTI_ARCH
6166d547 1526#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_ARGUMENTS)
0f71a2f6
JM
1527#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
1528#endif
1529#endif
1530
104c1213
JM
1531typedef void (gdbarch_push_dummy_frame_ftype) (void);
1532extern void gdbarch_push_dummy_frame (struct gdbarch *gdbarch);
1533extern void set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_push_dummy_frame_ftype *push_dummy_frame);
83905903
AC
1534#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_DUMMY_FRAME)
1535#error "Non multi-arch definition of PUSH_DUMMY_FRAME"
1536#endif
0f71a2f6 1537#if GDB_MULTI_ARCH
6166d547 1538#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_DUMMY_FRAME)
0f71a2f6
JM
1539#define PUSH_DUMMY_FRAME (gdbarch_push_dummy_frame (current_gdbarch))
1540#endif
1541#endif
1542
69a0d5f4
AC
1543#if defined (PUSH_RETURN_ADDRESS)
1544/* Legacy for systems yet to multi-arch PUSH_RETURN_ADDRESS */
1545#if !defined (PUSH_RETURN_ADDRESS_P)
1546#define PUSH_RETURN_ADDRESS_P() (1)
1547#endif
1548#endif
1549
1550/* Default predicate for non- multi-arch targets. */
1551#if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS_P)
1552#define PUSH_RETURN_ADDRESS_P() (0)
1553#endif
1554
1555extern int gdbarch_push_return_address_p (struct gdbarch *gdbarch);
1556#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS_P)
1557#error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
1558#endif
1559#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS_P)
1560#define PUSH_RETURN_ADDRESS_P() (gdbarch_push_return_address_p (current_gdbarch))
1561#endif
1562
1563/* Default (function) for non- multi-arch platforms. */
1564#if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS)
1565#define PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "PUSH_RETURN_ADDRESS"), 0)
1566#endif
1567
104c1213
JM
1568typedef CORE_ADDR (gdbarch_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
1569extern CORE_ADDR gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
1570extern void set_gdbarch_push_return_address (struct gdbarch *gdbarch, gdbarch_push_return_address_ftype *push_return_address);
83905903
AC
1571#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS)
1572#error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
1573#endif
0f71a2f6 1574#if GDB_MULTI_ARCH
6166d547 1575#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS)
0f71a2f6
JM
1576#define PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_push_return_address (current_gdbarch, pc, sp))
1577#endif
1578#endif
1579
dedc2a2b
AC
1580#if defined (POP_FRAME)
1581/* Legacy for systems yet to multi-arch POP_FRAME */
1582#if !defined (POP_FRAME_P)
1583#define POP_FRAME_P() (1)
1584#endif
1585#endif
1586
1587/* Default predicate for non- multi-arch targets. */
1588#if (!GDB_MULTI_ARCH) && !defined (POP_FRAME_P)
1589#define POP_FRAME_P() (0)
1590#endif
1591
1592extern int gdbarch_pop_frame_p (struct gdbarch *gdbarch);
1593#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POP_FRAME_P)
1594#error "Non multi-arch definition of POP_FRAME"
1595#endif
1596#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POP_FRAME_P)
1597#define POP_FRAME_P() (gdbarch_pop_frame_p (current_gdbarch))
1598#endif
1599
1600/* Default (function) for non- multi-arch platforms. */
1601#if (!GDB_MULTI_ARCH) && !defined (POP_FRAME)
1602#define POP_FRAME (internal_error (__FILE__, __LINE__, "POP_FRAME"), 0)
1603#define POP_FRAME (gdbarch_pop_frame (current_gdbarch))
1604#endif
1605
104c1213
JM
1606typedef void (gdbarch_pop_frame_ftype) (void);
1607extern void gdbarch_pop_frame (struct gdbarch *gdbarch);
1608extern void set_gdbarch_pop_frame (struct gdbarch *gdbarch, gdbarch_pop_frame_ftype *pop_frame);
83905903
AC
1609#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POP_FRAME)
1610#error "Non multi-arch definition of POP_FRAME"
1611#endif
0f71a2f6 1612#if GDB_MULTI_ARCH
6166d547 1613#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POP_FRAME)
0f71a2f6
JM
1614#define POP_FRAME (gdbarch_pop_frame (current_gdbarch))
1615#endif
1616#endif
1617
104c1213
JM
1618typedef void (gdbarch_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
1619extern void gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
1620extern void set_gdbarch_store_struct_return (struct gdbarch *gdbarch, gdbarch_store_struct_return_ftype *store_struct_return);
83905903
AC
1621#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_STRUCT_RETURN)
1622#error "Non multi-arch definition of STORE_STRUCT_RETURN"
1623#endif
0f71a2f6 1624#if GDB_MULTI_ARCH
6166d547 1625#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_STRUCT_RETURN)
0f71a2f6
JM
1626#define STORE_STRUCT_RETURN(addr, sp) (gdbarch_store_struct_return (current_gdbarch, addr, sp))
1627#endif
1628#endif
1629
ebba8386
AC
1630/* Default (function) for non- multi-arch platforms. */
1631#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
1632#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf))
1633#endif
1634
1635typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf);
1636extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf);
1637extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
1638#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
1639#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
1640#endif
1641#if GDB_MULTI_ARCH
1642#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
1643#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
1644#endif
1645#endif
1646
1647/* Default (function) for non- multi-arch platforms. */
1648#if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
1649#define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf))
1650#endif
1651
1652typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf);
1653extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf);
104c1213 1654extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
83905903
AC
1655#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
1656#error "Non multi-arch definition of STORE_RETURN_VALUE"
1657#endif
0f71a2f6 1658#if GDB_MULTI_ARCH
6166d547 1659#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_RETURN_VALUE)
ebba8386
AC
1660#define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
1661#endif
1662#endif
1663
1664typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
1665extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
1666extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
1667#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1668#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
1669#endif
1670#if GDB_MULTI_ARCH
1671#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
1672#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
1673#endif
1674#endif
1675
1676typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
1677extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
1678extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
1679#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
1680#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
1681#endif
1682#if GDB_MULTI_ARCH
1683#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_RETURN_VALUE)
1684#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
0f71a2f6
JM
1685#endif
1686#endif
1687
049ee0e4
AC
1688#if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1689/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
1690#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1691#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
1692#endif
1693#endif
1694
1695/* Default predicate for non- multi-arch targets. */
1696#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1697#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
1698#endif
1699
1700extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
1701#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1702#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1703#endif
1704#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
1705#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
1706#endif
1707
1708/* Default (function) for non- multi-arch platforms. */
1709#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1710#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
1711#endif
1712
1713typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache);
1714extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
1715extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
1716#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1717#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
1718#endif
1719#if GDB_MULTI_ARCH
1720#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
1721#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
1722#endif
1723#endif
1724
26e9b323
AC
1725#if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1726/* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
1727#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1728#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
d6dd581e
AC
1729#endif
1730#endif
1731
1732/* Default predicate for non- multi-arch targets. */
26e9b323
AC
1733#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1734#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
d6dd581e
AC
1735#endif
1736
26e9b323
AC
1737extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
1738#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1739#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
83905903 1740#endif
26e9b323
AC
1741#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
1742#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
d6dd581e
AC
1743#endif
1744
1745/* Default (function) for non- multi-arch platforms. */
26e9b323
AC
1746#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1747#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
d6dd581e
AC
1748#endif
1749
26e9b323
AC
1750typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
1751extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
1752extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
1753#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1754#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
83905903 1755#endif
0f71a2f6 1756#if GDB_MULTI_ARCH
26e9b323
AC
1757#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
1758#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
0f71a2f6
JM
1759#endif
1760#endif
1761
56f12751
AC
1762/* Default (function) for non- multi-arch platforms. */
1763#if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
1764#define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type))
1765#endif
1766
104c1213
JM
1767typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
1768extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
1769extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
83905903
AC
1770#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
1771#error "Non multi-arch definition of USE_STRUCT_CONVENTION"
1772#endif
0f71a2f6 1773#if GDB_MULTI_ARCH
6166d547 1774#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_STRUCT_CONVENTION)
0f71a2f6
JM
1775#define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
1776#endif
1777#endif
1778
8f871025
AC
1779#if defined (FRAME_INIT_SAVED_REGS)
1780/* Legacy for systems yet to multi-arch FRAME_INIT_SAVED_REGS */
1781#if !defined (FRAME_INIT_SAVED_REGS_P)
1782#define FRAME_INIT_SAVED_REGS_P() (1)
1783#endif
1784#endif
1785
1786/* Default predicate for non- multi-arch targets. */
1787#if (!GDB_MULTI_ARCH) && !defined (FRAME_INIT_SAVED_REGS_P)
1788#define FRAME_INIT_SAVED_REGS_P() (0)
1789#endif
1790
1791extern int gdbarch_frame_init_saved_regs_p (struct gdbarch *gdbarch);
1792#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_INIT_SAVED_REGS_P)
1793#error "Non multi-arch definition of FRAME_INIT_SAVED_REGS"
1794#endif
1795#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_INIT_SAVED_REGS_P)
1796#define FRAME_INIT_SAVED_REGS_P() (gdbarch_frame_init_saved_regs_p (current_gdbarch))
1797#endif
1798
1799/* Default (function) for non- multi-arch platforms. */
1800#if (!GDB_MULTI_ARCH) && !defined (FRAME_INIT_SAVED_REGS)
1801#define FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_INIT_SAVED_REGS"), 0)
1802#endif
1803
104c1213
JM
1804typedef void (gdbarch_frame_init_saved_regs_ftype) (struct frame_info *frame);
1805extern void gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
1806extern void set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs);
83905903
AC
1807#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_INIT_SAVED_REGS)
1808#error "Non multi-arch definition of FRAME_INIT_SAVED_REGS"
1809#endif
0f71a2f6 1810#if GDB_MULTI_ARCH
6166d547 1811#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_INIT_SAVED_REGS)
0f71a2f6
JM
1812#define FRAME_INIT_SAVED_REGS(frame) (gdbarch_frame_init_saved_regs (current_gdbarch, frame))
1813#endif
1814#endif
1815
5fdff426
AC
1816#if defined (INIT_EXTRA_FRAME_INFO)
1817/* Legacy for systems yet to multi-arch INIT_EXTRA_FRAME_INFO */
1818#if !defined (INIT_EXTRA_FRAME_INFO_P)
1819#define INIT_EXTRA_FRAME_INFO_P() (1)
1820#endif
1821#endif
1822
1823/* Default predicate for non- multi-arch targets. */
1824#if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO_P)
1825#define INIT_EXTRA_FRAME_INFO_P() (0)
1826#endif
1827
1828extern int gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch);
1829#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO_P)
1830#error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO"
1831#endif
1832#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO_P)
1833#define INIT_EXTRA_FRAME_INFO_P() (gdbarch_init_extra_frame_info_p (current_gdbarch))
1834#endif
1835
1836/* Default (function) for non- multi-arch platforms. */
1837#if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO)
1838#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "INIT_EXTRA_FRAME_INFO"), 0)
1839#endif
1840
104c1213
JM
1841typedef void (gdbarch_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
1842extern void gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
1843extern void set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_init_extra_frame_info_ftype *init_extra_frame_info);
83905903
AC
1844#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO)
1845#error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO"
1846#endif
0f71a2f6 1847#if GDB_MULTI_ARCH
6166d547 1848#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO)
0f71a2f6
JM
1849#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_init_extra_frame_info (current_gdbarch, fromleaf, frame))
1850#endif
1851#endif
1852
104c1213
JM
1853typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
1854extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
1855extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
83905903
AC
1856#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
1857#error "Non multi-arch definition of SKIP_PROLOGUE"
1858#endif
0f71a2f6 1859#if GDB_MULTI_ARCH
6166d547 1860#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_PROLOGUE)
0f71a2f6
JM
1861#define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
1862#endif
1863#endif
1864
33489c5b 1865/* Default (function) for non- multi-arch platforms. */
6166d547 1866#if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
33489c5b
AC
1867#define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip))
1868#endif
1869
dad41f9a
AC
1870typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
1871extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
1872extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
83905903
AC
1873#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
1874#error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
1875#endif
33489c5b 1876#if GDB_MULTI_ARCH
6166d547 1877#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PROLOGUE_FRAMELESS_P)
dad41f9a
AC
1878#define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
1879#endif
33489c5b 1880#endif
dad41f9a 1881
104c1213
JM
1882typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
1883extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
1884extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
83905903
AC
1885#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
1886#error "Non multi-arch definition of INNER_THAN"
1887#endif
0f71a2f6 1888#if GDB_MULTI_ARCH
6166d547 1889#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INNER_THAN)
0f71a2f6
JM
1890#define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
1891#endif
1892#endif
1893
33489c5b 1894/* Default (function) for non- multi-arch platforms. */
6166d547 1895#if (!GDB_MULTI_ARCH) && !defined (BREAKPOINT_FROM_PC)
33489c5b
AC
1896#define BREAKPOINT_FROM_PC(pcptr, lenptr) (legacy_breakpoint_from_pc (pcptr, lenptr))
1897#endif
1898
f4f9705a
AC
1899typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
1900extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
104c1213 1901extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
83905903
AC
1902#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
1903#error "Non multi-arch definition of BREAKPOINT_FROM_PC"
1904#endif
33489c5b 1905#if GDB_MULTI_ARCH
6166d547 1906#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BREAKPOINT_FROM_PC)
0f71a2f6
JM
1907#define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
1908#endif
33489c5b
AC
1909#endif
1910
1911/* Default (function) for non- multi-arch platforms. */
6166d547 1912#if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
33489c5b
AC
1913#define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache))
1914#endif
0f71a2f6 1915
917317f4
JM
1916typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
1917extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
1918extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
83905903
AC
1919#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
1920#error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
1921#endif
33489c5b 1922#if GDB_MULTI_ARCH
6166d547 1923#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_INSERT_BREAKPOINT)
917317f4
JM
1924#define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
1925#endif
33489c5b
AC
1926#endif
1927
1928/* Default (function) for non- multi-arch platforms. */
6166d547 1929#if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
33489c5b
AC
1930#define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache))
1931#endif
917317f4
JM
1932
1933typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
1934extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
1935extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
83905903
AC
1936#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
1937#error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
1938#endif
33489c5b 1939#if GDB_MULTI_ARCH
6166d547 1940#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_REMOVE_BREAKPOINT)
917317f4
JM
1941#define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
1942#endif
33489c5b 1943#endif
917317f4 1944
104c1213
JM
1945extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
1946extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
83905903
AC
1947#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
1948#error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
1949#endif
0f71a2f6 1950#if GDB_MULTI_ARCH
6166d547 1951#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DECR_PC_AFTER_BREAK)
0f71a2f6
JM
1952#define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
1953#endif
1954#endif
1955
e02bc4cc
DS
1956/* Default (function) for non- multi-arch platforms. */
1957#if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED)
1958#define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it))
1959#endif
1960
1961typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it);
1962extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it);
1963extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed);
83905903
AC
1964#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
1965#error "Non multi-arch definition of PREPARE_TO_PROCEED"
1966#endif
e02bc4cc
DS
1967#if GDB_MULTI_ARCH
1968#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PREPARE_TO_PROCEED)
1969#define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
1970#endif
1971#endif
1972
104c1213
JM
1973extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
1974extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
83905903
AC
1975#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
1976#error "Non multi-arch definition of FUNCTION_START_OFFSET"
1977#endif
0f71a2f6 1978#if GDB_MULTI_ARCH
6166d547 1979#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FUNCTION_START_OFFSET)
0f71a2f6
JM
1980#define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
1981#endif
1982#endif
1983
33489c5b 1984/* Default (function) for non- multi-arch platforms. */
6166d547 1985#if (!GDB_MULTI_ARCH) && !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
33489c5b
AC
1986#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))
1987#endif
1988
104c1213
JM
1989typedef void (gdbarch_remote_translate_xfer_address_ftype) (CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
1990extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
1991extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
83905903
AC
1992#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REMOTE_TRANSLATE_XFER_ADDRESS)
1993#error "Non multi-arch definition of REMOTE_TRANSLATE_XFER_ADDRESS"
1994#endif
33489c5b 1995#if GDB_MULTI_ARCH
6166d547 1996#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
0f71a2f6
JM
1997#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))
1998#endif
33489c5b 1999#endif
0f71a2f6 2000
104c1213
JM
2001extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
2002extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
83905903
AC
2003#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
2004#error "Non multi-arch definition of FRAME_ARGS_SKIP"
2005#endif
0f71a2f6 2006#if GDB_MULTI_ARCH
6166d547 2007#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_SKIP)
0f71a2f6
JM
2008#define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
2009#endif
2010#endif
2011
33489c5b 2012/* Default (function) for non- multi-arch platforms. */
6166d547 2013#if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
33489c5b
AC
2014#define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi))
2015#endif
2016
104c1213
JM
2017typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi);
2018extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
2019extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation);
83905903
AC
2020#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
2021#error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
2022#endif
33489c5b 2023#if GDB_MULTI_ARCH
6166d547 2024#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAMELESS_FUNCTION_INVOCATION)
0f71a2f6
JM
2025#define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
2026#endif
33489c5b 2027#endif
0f71a2f6 2028
104c1213
JM
2029typedef CORE_ADDR (gdbarch_frame_chain_ftype) (struct frame_info *frame);
2030extern CORE_ADDR gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
2031extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chain_ftype *frame_chain);
83905903
AC
2032#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN)
2033#error "Non multi-arch definition of FRAME_CHAIN"
2034#endif
0f71a2f6 2035#if GDB_MULTI_ARCH
6166d547 2036#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN)
0f71a2f6
JM
2037#define FRAME_CHAIN(frame) (gdbarch_frame_chain (current_gdbarch, frame))
2038#endif
2039#endif
2040
51603483
DJ
2041#if defined (FRAME_CHAIN_VALID)
2042/* Legacy for systems yet to multi-arch FRAME_CHAIN_VALID */
2043#if !defined (FRAME_CHAIN_VALID_P)
2044#define FRAME_CHAIN_VALID_P() (1)
2045#endif
2046#endif
2047
2048/* Default predicate for non- multi-arch targets. */
2049#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID_P)
2050#define FRAME_CHAIN_VALID_P() (0)
2051#endif
2052
2053extern int gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch);
2054#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID_P)
2055#error "Non multi-arch definition of FRAME_CHAIN_VALID"
2056#endif
2057#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID_P)
2058#define FRAME_CHAIN_VALID_P() (gdbarch_frame_chain_valid_p (current_gdbarch))
2059#endif
7f55af32
AC
2060
2061/* Default (function) for non- multi-arch platforms. */
2062#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
51603483 2063#define FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "FRAME_CHAIN_VALID"), 0)
7f55af32 2064#endif
028c194b 2065
104c1213
JM
2066typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
2067extern int gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
2068extern void set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_frame_chain_valid_ftype *frame_chain_valid);
7f55af32 2069#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID)
83905903
AC
2070#error "Non multi-arch definition of FRAME_CHAIN_VALID"
2071#endif
0f71a2f6 2072#if GDB_MULTI_ARCH
7f55af32 2073#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID)
0f71a2f6
JM
2074#define FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_frame_chain_valid (current_gdbarch, chain, thisframe))
2075#endif
2076#endif
2077
104c1213
JM
2078typedef CORE_ADDR (gdbarch_frame_saved_pc_ftype) (struct frame_info *fi);
2079extern CORE_ADDR gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
2080extern void set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_frame_saved_pc_ftype *frame_saved_pc);
83905903
AC
2081#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_SAVED_PC)
2082#error "Non multi-arch definition of FRAME_SAVED_PC"
2083#endif
0f71a2f6 2084#if GDB_MULTI_ARCH
6166d547 2085#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_SAVED_PC)
0f71a2f6
JM
2086#define FRAME_SAVED_PC(fi) (gdbarch_frame_saved_pc (current_gdbarch, fi))
2087#endif
2088#endif
2089
f4ded5b1
AC
2090/* Default (function) for non- multi-arch platforms. */
2091#if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS)
7d6a26a7 2092#define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
f4ded5b1
AC
2093#endif
2094
104c1213
JM
2095typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi);
2096extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
2097extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address);
83905903
AC
2098#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
2099#error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
2100#endif
0f71a2f6 2101#if GDB_MULTI_ARCH
6166d547 2102#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_ADDRESS)
0f71a2f6
JM
2103#define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
2104#endif
2105#endif
2106
f4ded5b1
AC
2107/* Default (function) for non- multi-arch platforms. */
2108#if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS)
7d6a26a7 2109#define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
f4ded5b1
AC
2110#endif
2111
104c1213
JM
2112typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi);
2113extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
2114extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address);
83905903
AC
2115#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
2116#error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
2117#endif
0f71a2f6 2118#if GDB_MULTI_ARCH
6166d547 2119#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_LOCALS_ADDRESS)
0f71a2f6
JM
2120#define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
2121#endif
2122#endif
2123
104c1213
JM
2124typedef CORE_ADDR (gdbarch_saved_pc_after_call_ftype) (struct frame_info *frame);
2125extern CORE_ADDR gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
2126extern void set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_saved_pc_after_call_ftype *saved_pc_after_call);
83905903
AC
2127#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVED_PC_AFTER_CALL)
2128#error "Non multi-arch definition of SAVED_PC_AFTER_CALL"
2129#endif
0f71a2f6 2130#if GDB_MULTI_ARCH
6166d547 2131#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVED_PC_AFTER_CALL)
0f71a2f6
JM
2132#define SAVED_PC_AFTER_CALL(frame) (gdbarch_saved_pc_after_call (current_gdbarch, frame))
2133#endif
2134#endif
2135
104c1213
JM
2136typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
2137extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
2138extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
83905903
AC
2139#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
2140#error "Non multi-arch definition of FRAME_NUM_ARGS"
2141#endif
0f71a2f6 2142#if GDB_MULTI_ARCH
6166d547 2143#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS)
0f71a2f6
JM
2144#define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
2145#endif
2146#endif
2147
2ada493a
AC
2148#if defined (STACK_ALIGN)
2149/* Legacy for systems yet to multi-arch STACK_ALIGN */
eee30e78 2150#if !defined (STACK_ALIGN_P)
2ada493a
AC
2151#define STACK_ALIGN_P() (1)
2152#endif
eee30e78 2153#endif
2ada493a 2154
33489c5b 2155/* Default predicate for non- multi-arch targets. */
6166d547 2156#if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P)
33489c5b
AC
2157#define STACK_ALIGN_P() (0)
2158#endif
2159
2ada493a 2160extern int gdbarch_stack_align_p (struct gdbarch *gdbarch);
83905903
AC
2161#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P)
2162#error "Non multi-arch definition of STACK_ALIGN"
2163#endif
6166d547 2164#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P)
2ada493a
AC
2165#define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch))
2166#endif
2167
33489c5b 2168/* Default (function) for non- multi-arch platforms. */
6166d547 2169#if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN)
8e65ff28 2170#define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0)
33489c5b
AC
2171#endif
2172
2ada493a
AC
2173typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp);
2174extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp);
2175extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align);
83905903
AC
2176#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
2177#error "Non multi-arch definition of STACK_ALIGN"
2178#endif
33489c5b 2179#if GDB_MULTI_ARCH
6166d547 2180#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN)
2ada493a
AC
2181#define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
2182#endif
33489c5b 2183#endif
2ada493a 2184
dc604539
AC
2185extern int gdbarch_frame_align_p (struct gdbarch *gdbarch);
2186
2187typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address);
2188extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address);
2189extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align);
2190
0a49d05e
AC
2191/* Default (value) for non- multi-arch platforms. */
2192#if (!GDB_MULTI_ARCH) && !defined (EXTRA_STACK_ALIGNMENT_NEEDED)
2193#define EXTRA_STACK_ALIGNMENT_NEEDED (1)
2194#endif
2195
2196extern int gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch);
2197extern void set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch, int extra_stack_alignment_needed);
83905903
AC
2198#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRA_STACK_ALIGNMENT_NEEDED)
2199#error "Non multi-arch definition of EXTRA_STACK_ALIGNMENT_NEEDED"
2200#endif
0a49d05e
AC
2201#if GDB_MULTI_ARCH
2202#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRA_STACK_ALIGNMENT_NEEDED)
2203#define EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_extra_stack_alignment_needed (current_gdbarch))
2204#endif
2205#endif
2206
d03e67c9
AC
2207#if defined (REG_STRUCT_HAS_ADDR)
2208/* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
eee30e78 2209#if !defined (REG_STRUCT_HAS_ADDR_P)
d03e67c9
AC
2210#define REG_STRUCT_HAS_ADDR_P() (1)
2211#endif
eee30e78 2212#endif
d03e67c9 2213
33489c5b 2214/* Default predicate for non- multi-arch targets. */
6166d547 2215#if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P)
33489c5b
AC
2216#define REG_STRUCT_HAS_ADDR_P() (0)
2217#endif
2218
d03e67c9 2219extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch);
83905903
AC
2220#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P)
2221#error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2222#endif
6166d547 2223#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P)
d03e67c9
AC
2224#define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch))
2225#endif
2226
33489c5b 2227/* Default (function) for non- multi-arch platforms. */
6166d547 2228#if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR)
8e65ff28 2229#define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0)
33489c5b
AC
2230#endif
2231
d03e67c9
AC
2232typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
2233extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
2234extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr);
83905903
AC
2235#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
2236#error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
2237#endif
33489c5b 2238#if GDB_MULTI_ARCH
6166d547 2239#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR)
d03e67c9
AC
2240#define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
2241#endif
33489c5b 2242#endif
d03e67c9 2243
d1e3cf49
AC
2244#if defined (SAVE_DUMMY_FRAME_TOS)
2245/* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
eee30e78 2246#if !defined (SAVE_DUMMY_FRAME_TOS_P)
d1e3cf49
AC
2247#define SAVE_DUMMY_FRAME_TOS_P() (1)
2248#endif
eee30e78 2249#endif
d1e3cf49
AC
2250
2251/* Default predicate for non- multi-arch targets. */
6166d547 2252#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P)
d1e3cf49
AC
2253#define SAVE_DUMMY_FRAME_TOS_P() (0)
2254#endif
2255
2256extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
83905903
AC
2257#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
2258#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
2259#endif
6166d547 2260#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
d1e3cf49
AC
2261#define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
2262#endif
2263
2264/* Default (function) for non- multi-arch platforms. */
6166d547 2265#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
8e65ff28 2266#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
d1e3cf49
AC
2267#endif
2268
2269typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
2270extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
2271extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
83905903
AC
2272#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
2273#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
2274#endif
d1e3cf49 2275#if GDB_MULTI_ARCH
6166d547 2276#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS)
d1e3cf49
AC
2277#define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
2278#endif
2279#endif
2280
58d5518e
ND
2281extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
2282extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
83905903
AC
2283#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
2284#error "Non multi-arch definition of PARM_BOUNDARY"
2285#endif
58d5518e
ND
2286#if GDB_MULTI_ARCH
2287#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PARM_BOUNDARY)
2288#define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
2289#endif
2290#endif
2291
f0d4cc9e 2292/* Default (value) for non- multi-arch platforms. */
6166d547 2293#if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
f0d4cc9e
AC
2294#define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch))
2295#endif
2296
2297extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
2298extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
83905903
AC
2299#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
2300#error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
2301#endif
f0d4cc9e 2302#if GDB_MULTI_ARCH
6166d547 2303#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_FORMAT)
f0d4cc9e
AC
2304#define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
2305#endif
2306#endif
2307
2308/* Default (value) for non- multi-arch platforms. */
6166d547 2309#if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
f0d4cc9e
AC
2310#define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch))
2311#endif
2312
2313extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
2314extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
83905903
AC
2315#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
2316#error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
2317#endif
f0d4cc9e 2318#if GDB_MULTI_ARCH
6166d547 2319#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_FORMAT)
f0d4cc9e
AC
2320#define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
2321#endif
2322#endif
2323
2324/* Default (value) for non- multi-arch platforms. */
6166d547 2325#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
2fa5c1e0 2326#define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch))
f0d4cc9e
AC
2327#endif
2328
2329extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
2330extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
83905903
AC
2331#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
2332#error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
2333#endif
f0d4cc9e 2334#if GDB_MULTI_ARCH
6166d547 2335#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_FORMAT)
f0d4cc9e
AC
2336#define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
2337#endif
2338#endif
2339
f517ea4e
PS
2340/* Default (function) for non- multi-arch platforms. */
2341#if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
875e1767 2342#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr))
f517ea4e
PS
2343#endif
2344
2345typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr);
2346extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr);
2347extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr);
83905903
AC
2348#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
2349#error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
2350#endif
f517ea4e
PS
2351#if GDB_MULTI_ARCH
2352#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_FROM_FUNC_PTR_ADDR)
2353#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
2354#endif
2355#endif
2356
875e1767
AC
2357/* On some machines there are bits in addresses which are not really
2358 part of the address, but are used by the kernel, the hardware, etc.
2359 for special purposes. ADDR_BITS_REMOVE takes out any such bits so
2360 we get a "real" address such as one would find in a symbol table.
2361 This is used only for addresses of instructions, and even then I'm
2362 not sure it's used in all contexts. It exists to deal with there
2363 being a few stray bits in the PC which would mislead us, not as some
2364 sort of generic thing to handle alignment or segmentation (it's
2365 possible it should be in TARGET_READ_PC instead). */
2366
2367/* Default (function) for non- multi-arch platforms. */
2368#if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE)
2369#define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr))
2370#endif
2371
2372typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
2373extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
2374extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
83905903
AC
2375#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
2376#error "Non multi-arch definition of ADDR_BITS_REMOVE"
2377#endif
875e1767
AC
2378#if GDB_MULTI_ARCH
2379#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDR_BITS_REMOVE)
2380#define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
2381#endif
2382#endif
2383
5720643c 2384/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
181c1381
RE
2385 ADDR_BITS_REMOVE. */
2386
2387/* Default (function) for non- multi-arch platforms. */
2388#if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS)
2389#define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr))
2390#endif
2391
2392typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
2393extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
2394extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
2395#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
2396#error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
2397#endif
2398#if GDB_MULTI_ARCH
2399#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SMASH_TEXT_ADDRESS)
2400#define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
2401#endif
2402#endif
2403
64c4637f
AC
2404/* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
2405 the target needs software single step. An ISA method to implement it.
2406
2407 FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
2408 using the breakpoint system instead of blatting memory directly (as with rs6000).
2409
2410 FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
2411 single step. If not, then implement single step using breakpoints. */
2412
2413#if defined (SOFTWARE_SINGLE_STEP)
2414/* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
2415#if !defined (SOFTWARE_SINGLE_STEP_P)
2416#define SOFTWARE_SINGLE_STEP_P() (1)
2417#endif
2418#endif
2419
2420/* Default predicate for non- multi-arch targets. */
2421#if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P)
2422#define SOFTWARE_SINGLE_STEP_P() (0)
2423#endif
2424
2425extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
83905903
AC
2426#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
2427#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2428#endif
64c4637f
AC
2429#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
2430#define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
2431#endif
2432
2433/* Default (function) for non- multi-arch platforms. */
2434#if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP)
2435#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
2436#endif
2437
2438typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
2439extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
2440extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
83905903
AC
2441#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
2442#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
2443#endif
64c4637f
AC
2444#if GDB_MULTI_ARCH
2445#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP)
2446#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
2447#endif
2448#endif
2449
2bf0cb65
EZ
2450/* Default (function) for non- multi-arch platforms. */
2451#if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
2452#define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info))
2453#endif
2454
2455typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info);
2456extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info);
2457extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
2458#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
2459#error "Non multi-arch definition of TARGET_PRINT_INSN"
2460#endif
2461#if GDB_MULTI_ARCH
2462#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PRINT_INSN)
2463#define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
2464#endif
2465#endif
2466
bdcd319a
CV
2467/* Default (function) for non- multi-arch platforms. */
2468#if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
2469#define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc))
2470#endif
2471
2472typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc);
2473extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc);
2474extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
2475#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
2476#error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
2477#endif
2478#if GDB_MULTI_ARCH
2479#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_TRAMPOLINE_CODE)
2480#define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
2481#endif
2482#endif
2483
68e9cc94
CV
2484/* For SVR4 shared libraries, each call goes through a small piece of
2485 trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
d50355b6 2486 to nonzero if we are currently stopped in one of these. */
68e9cc94
CV
2487
2488/* Default (function) for non- multi-arch platforms. */
2489#if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
2490#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name))
2491#endif
2492
2493typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name);
2494extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2495extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline);
2496#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
2497#error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
2498#endif
2499#if GDB_MULTI_ARCH
2500#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_CALL_TRAMPOLINE)
2501#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
2502#endif
2503#endif
2504
d50355b6
MS
2505/* Some systems also have trampoline code for returning from shared libs. */
2506
2507/* Default (function) for non- multi-arch platforms. */
2508#if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2509#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name))
2510#endif
2511
2512typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
2513extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2514extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
2515#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
2516#error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
2517#endif
2518#if GDB_MULTI_ARCH
2519#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_RETURN_TRAMPOLINE)
2520#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
2521#endif
2522#endif
2523
d7bd68ca
AC
2524/* Sigtramp is a routine that the kernel calls (which then calls the
2525 signal handler). On most machines it is a library routine that is
2526 linked into the executable.
2527
2528 This macro, given a program counter value and the name of the
2529 function in which that PC resides (which can be null if the name is
2530 not known), returns nonzero if the PC and name show that we are in
2531 sigtramp.
2532
2533 On most machines just see if the name is sigtramp (and if we have
2534 no name, assume we are not in sigtramp).
2535
2536 FIXME: cagney/2002-04-21: The function find_pc_partial_function
2537 calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
2538 This means PC_IN_SIGTRAMP function can't be implemented by doing its
2539 own local NAME lookup.
2540
2541 FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
2542 Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
2543 does not. */
2544
2545/* Default (function) for non- multi-arch platforms. */
2546#if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP)
2547#define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name))
2548#endif
2549
2550typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
2551extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
2552extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
2553#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
2554#error "Non multi-arch definition of PC_IN_SIGTRAMP"
2555#endif
2556#if GDB_MULTI_ARCH
2557#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_SIGTRAMP)
2558#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
2559#endif
2560#endif
2561
43156d82
MK
2562#if defined (SIGTRAMP_START)
2563/* Legacy for systems yet to multi-arch SIGTRAMP_START */
2564#if !defined (SIGTRAMP_START_P)
2565#define SIGTRAMP_START_P() (1)
2566#endif
2567#endif
2568
2569/* Default predicate for non- multi-arch targets. */
2570#if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START_P)
2571#define SIGTRAMP_START_P() (0)
2572#endif
2573
2574extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch);
2575#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P)
2576#error "Non multi-arch definition of SIGTRAMP_START"
2577#endif
2578#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P)
2579#define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch))
2580#endif
2581
2582/* Default (function) for non- multi-arch platforms. */
2583#if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START)
2584#define SIGTRAMP_START(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_START"), 0)
2585#endif
2586
2587typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc);
2588extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc);
2589extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start);
2590#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START)
2591#error "Non multi-arch definition of SIGTRAMP_START"
2592#endif
2593#if GDB_MULTI_ARCH
2594#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START)
2595#define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc))
2596#endif
2597#endif
2598
e76cff22
AC
2599#if defined (SIGTRAMP_END)
2600/* Legacy for systems yet to multi-arch SIGTRAMP_END */
2601#if !defined (SIGTRAMP_END_P)
2602#define SIGTRAMP_END_P() (1)
2603#endif
2604#endif
2605
2606/* Default predicate for non- multi-arch targets. */
2607#if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END_P)
2608#define SIGTRAMP_END_P() (0)
2609#endif
2610
2611extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch);
2612#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P)
2613#error "Non multi-arch definition of SIGTRAMP_END"
2614#endif
2615#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P)
2616#define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch))
2617#endif
2618
2619/* Default (function) for non- multi-arch platforms. */
2620#if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END)
2621#define SIGTRAMP_END(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_END"), 0)
2622#endif
2623
43156d82
MK
2624typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc);
2625extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc);
2626extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end);
2627#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END)
2628#error "Non multi-arch definition of SIGTRAMP_END"
2629#endif
2630#if GDB_MULTI_ARCH
2631#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END)
2632#define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc))
2633#endif
2634#endif
2635
c12260ac
CV
2636/* A target might have problems with watchpoints as soon as the stack
2637 frame of the current function has been destroyed. This mostly happens
2638 as the first action in a funtion's epilogue. in_function_epilogue_p()
2639 is defined to return a non-zero value if either the given addr is one
2640 instruction after the stack destroying instruction up to the trailing
2641 return instruction or if we can figure out that the stack frame has
2642 already been invalidated regardless of the value of addr. Targets
2643 which don't suffer from that problem could just let this functionality
2644 untouched. */
2645
2646typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
2647extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
2648extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
2649
552c04a7
TT
2650/* Given a vector of command-line arguments, return a newly allocated
2651 string which, when passed to the create_inferior function, will be
2652 parsed (on Unix systems, by the shell) to yield the same vector.
2653 This function should call error() if the argument vector is not
2654 representable for this target or if this target does not support
2655 command-line arguments.
2656 ARGC is the number of elements in the vector.
2657 ARGV is an array of strings, one per argument. */
2658
2659typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv);
2660extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv);
2661extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments);
2662
b6af0555
JS
2663#if defined (DWARF2_BUILD_FRAME_INFO)
2664/* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */
2665#if !defined (DWARF2_BUILD_FRAME_INFO_P)
2666#define DWARF2_BUILD_FRAME_INFO_P() (1)
2667#endif
2668#endif
2669
2670/* Default predicate for non- multi-arch targets. */
2671#if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P)
2672#define DWARF2_BUILD_FRAME_INFO_P() (0)
2673#endif
2674
2675extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch);
2676#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P)
2677#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
2678#endif
2679#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P)
2680#define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch))
2681#endif
2682
2683/* Default (function) for non- multi-arch platforms. */
2684#if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO)
2685#define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0)
2686#endif
2687
2688typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile);
2689extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile);
2690extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info);
2691#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO)
2692#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
2693#endif
2694#if GDB_MULTI_ARCH
2695#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO)
2696#define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile))
2697#endif
2698#endif
2699
a2cf933a
EZ
2700/* Default (function) for non- multi-arch platforms. */
2701#if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2702#define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym))
2703#endif
2704
2705typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym);
2706extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym);
2707extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special);
2708#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
2709#error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
2710#endif
2711#if GDB_MULTI_ARCH
2712#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ELF_MAKE_MSYMBOL_SPECIAL)
2713#define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
2714#endif
2715#endif
2716
2717/* Default (function) for non- multi-arch platforms. */
2718#if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2719#define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym))
2720#endif
2721
2722typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym);
2723extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
2724extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
2725#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
2726#error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
2727#endif
2728#if GDB_MULTI_ARCH
2729#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COFF_MAKE_MSYMBOL_SPECIAL)
2730#define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
2731#endif
2732#endif
2733
5720643c
JB
2734/* Default (value) for non- multi-arch platforms. */
2735#if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC)
2736#define NAME_OF_MALLOC ("malloc")
2737#endif
2738
2739extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch);
2740extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc);
2741#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
2742#error "Non multi-arch definition of NAME_OF_MALLOC"
2743#endif
2744#if GDB_MULTI_ARCH
2745#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NAME_OF_MALLOC)
2746#define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch))
2747#endif
2748#endif
2749
c4ed33b9
AC
2750/* Default (value) for non- multi-arch platforms. */
2751#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
2752#define CANNOT_STEP_BREAKPOINT (0)
2753#endif
2754
2755extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
2756extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
2757#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
2758#error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
2759#endif
2760#if GDB_MULTI_ARCH
2761#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STEP_BREAKPOINT)
2762#define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
2763#endif
2764#endif
2765
f74fa174
MM
2766/* Default (value) for non- multi-arch platforms. */
2767#if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2768#define HAVE_NONSTEPPABLE_WATCHPOINT (0)
2769#endif
2770
2771extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
2772extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
2773#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2774#error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
2775#endif
2776#if GDB_MULTI_ARCH
2777#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
2778#define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
2779#endif
2780#endif
2781
8b2dbe47
KB
2782#if defined (ADDRESS_CLASS_TYPE_FLAGS)
2783/* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
2784#if !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2785#define ADDRESS_CLASS_TYPE_FLAGS_P() (1)
2786#endif
2787#endif
2788
2789/* Default predicate for non- multi-arch targets. */
2790#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2791#define ADDRESS_CLASS_TYPE_FLAGS_P() (0)
2792#endif
2793
2794extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch);
2795#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2796#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
2797#endif
2798#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P)
2799#define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch))
2800#endif
2801
2802/* Default (function) for non- multi-arch platforms. */
2803#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS)
2804#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0)
2805#endif
2806
2807typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class);
2808extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class);
2809extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags);
2810#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
2811#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
2812#endif
2813#if GDB_MULTI_ARCH
2814#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS)
2815#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
2816#endif
2817#endif
2818
8b2dbe47 2819extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
8b2dbe47 2820
321432c0
KB
2821typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags);
2822extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
8b2dbe47 2823extern void set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name);
8b2dbe47
KB
2824
2825extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);
8b2dbe47 2826
321432c0
KB
2827typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
2828extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
8b2dbe47 2829extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags);
8b2dbe47 2830
b59ff9d5
AC
2831/* Is a register in a group */
2832
2833typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
2834extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
2835extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
2836
104c1213 2837extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
0f71a2f6
JM
2838
2839
2840/* Mechanism for co-ordinating the selection of a specific
2841 architecture.
2842
2843 GDB targets (*-tdep.c) can register an interest in a specific
2844 architecture. Other GDB components can register a need to maintain
2845 per-architecture data.
2846
2847 The mechanisms below ensures that there is only a loose connection
2848 between the set-architecture command and the various GDB
99e7bb18 2849 components. Each component can independently register their need
0f71a2f6
JM
2850 to maintain architecture specific data with gdbarch.
2851
2852 Pragmatics:
2853
2854 Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It
2855 didn't scale.
2856
2857 The more traditional mega-struct containing architecture specific
2858 data for all the various GDB components was also considered. Since
99e7bb18 2859 GDB is built from a variable number of (fairly independent)
0f71a2f6
JM
2860 components it was determined that the global aproach was not
2861 applicable. */
2862
2863
2864/* Register a new architectural family with GDB.
2865
2866 Register support for the specified ARCHITECTURE with GDB. When
2867 gdbarch determines that the specified architecture has been
2868 selected, the corresponding INIT function is called.
2869
2870 --
2871
2872 The INIT function takes two parameters: INFO which contains the
2873 information available to gdbarch about the (possibly new)
2874 architecture; ARCHES which is a list of the previously created
2875 ``struct gdbarch'' for this architecture.
2876
0f79675b
AC
2877 The INFO parameter is, as far as possible, be pre-initialized with
2878 information obtained from INFO.ABFD or the previously selected
2879 architecture.
2880
2881 The ARCHES parameter is a linked list (sorted most recently used)
2882 of all the previously created architures for this architecture
2883 family. The (possibly NULL) ARCHES->gdbarch can used to access
2884 values from the previously selected architecture for this
2885 architecture family. The global ``current_gdbarch'' shall not be
2886 used.
0f71a2f6
JM
2887
2888 The INIT function shall return any of: NULL - indicating that it
ec3d358c 2889 doesn't recognize the selected architecture; an existing ``struct
0f71a2f6
JM
2890 gdbarch'' from the ARCHES list - indicating that the new
2891 architecture is just a synonym for an earlier architecture (see
2892 gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch''
4b9b3959
AC
2893 - that describes the selected architecture (see gdbarch_alloc()).
2894
2895 The DUMP_TDEP function shall print out all target specific values.
2896 Care should be taken to ensure that the function works in both the
2897 multi-arch and non- multi-arch cases. */
0f71a2f6 2898
adf40b2e
JM
2899struct gdbarch_list
2900{
2901 struct gdbarch *gdbarch;
2902 struct gdbarch_list *next;
2903};
0f71a2f6 2904
adf40b2e
JM
2905struct gdbarch_info
2906{
adf40b2e
JM
2907 /* Use default: NULL (ZERO). */
2908 const struct bfd_arch_info *bfd_arch_info;
0f71a2f6 2909
428721aa 2910 /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */
adf40b2e 2911 int byte_order;
0f71a2f6 2912
adf40b2e
JM
2913 /* Use default: NULL (ZERO). */
2914 bfd *abfd;
0f71a2f6 2915
adf40b2e
JM
2916 /* Use default: NULL (ZERO). */
2917 struct gdbarch_tdep_info *tdep_info;
4be87837
DJ
2918
2919 /* Use default: GDB_OSABI_UNINITIALIZED (-1). */
2920 enum gdb_osabi osabi;
adf40b2e 2921};
0f71a2f6 2922
104c1213 2923typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
4b9b3959 2924typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file);
0f71a2f6 2925
4b9b3959 2926/* DEPRECATED - use gdbarch_register() */
104c1213 2927extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *);
0f71a2f6 2928
4b9b3959
AC
2929extern void gdbarch_register (enum bfd_architecture architecture,
2930 gdbarch_init_ftype *,
2931 gdbarch_dump_tdep_ftype *);
2932
0f71a2f6 2933
b4a20239
AC
2934/* Return a freshly allocated, NULL terminated, array of the valid
2935 architecture names. Since architectures are registered during the
2936 _initialize phase this function only returns useful information
2937 once initialization has been completed. */
2938
2939extern const char **gdbarch_printable_names (void);
2940
2941
0f71a2f6
JM
2942/* Helper function. Search the list of ARCHES for a GDBARCH that
2943 matches the information provided by INFO. */
2944
104c1213 2945extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info);
0f71a2f6
JM
2946
2947
2948/* Helper function. Create a preliminary ``struct gdbarch''. Perform
2949 basic initialization using values obtained from the INFO andTDEP
2950 parameters. set_gdbarch_*() functions are called to complete the
2951 initialization of the object. */
2952
104c1213 2953extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
0f71a2f6
JM
2954
2955
4b9b3959
AC
2956/* Helper function. Free a partially-constructed ``struct gdbarch''.
2957 It is assumed that the caller freeds the ``struct
2958 gdbarch_tdep''. */
2959
058f20d5
JB
2960extern void gdbarch_free (struct gdbarch *);
2961
2962
b732d07d 2963/* Helper function. Force an update of the current architecture.
0f71a2f6 2964
b732d07d
AC
2965 The actual architecture selected is determined by INFO, ``(gdb) set
2966 architecture'' et.al., the existing architecture and BFD's default
2967 architecture. INFO should be initialized to zero and then selected
2968 fields should be updated.
0f71a2f6 2969
16f33e29
AC
2970 Returns non-zero if the update succeeds */
2971
2972extern int gdbarch_update_p (struct gdbarch_info info);
0f71a2f6
JM
2973
2974
2975
2976/* Register per-architecture data-pointer.
2977
2978 Reserve space for a per-architecture data-pointer. An identifier
2979 for the reserved data-pointer is returned. That identifer should
95160752 2980 be saved in a local static variable.
0f71a2f6 2981
76860b5f
AC
2982 The per-architecture data-pointer is either initialized explicitly
2983 (set_gdbarch_data()) or implicitly (by INIT() via a call to
2984 gdbarch_data()). FREE() is called to delete either an existing
2af496cb 2985 data-pointer overridden by set_gdbarch_data() or when the
76860b5f 2986 architecture object is being deleted.
0f71a2f6 2987
95160752
AC
2988 When a previously created architecture is re-selected, the
2989 per-architecture data-pointer for that previous architecture is
76860b5f 2990 restored. INIT() is not re-called.
0f71a2f6
JM
2991
2992 Multiple registrarants for any architecture are allowed (and
2993 strongly encouraged). */
2994
95160752 2995struct gdbarch_data;
0f71a2f6 2996
95160752
AC
2997typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
2998typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
2999 void *pointer);
3000extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
3001 gdbarch_data_free_ftype *free);
3002extern void set_gdbarch_data (struct gdbarch *gdbarch,
3003 struct gdbarch_data *data,
3004 void *pointer);
0f71a2f6 3005
451fbdda 3006extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
0f71a2f6
JM
3007
3008
0f71a2f6
JM
3009/* Register per-architecture memory region.
3010
3011 Provide a memory-region swap mechanism. Per-architecture memory
3012 region are created. These memory regions are swapped whenever the
3013 architecture is changed. For a new architecture, the memory region
3014 is initialized with zero (0) and the INIT function is called.
3015
3016 Memory regions are swapped / initialized in the order that they are
3017 registered. NULL DATA and/or INIT values can be specified.
3018
3019 New code should use register_gdbarch_data(). */
3020
104c1213
JM
3021typedef void (gdbarch_swap_ftype) (void);
3022extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init);
e514a9d6 3023#define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL)
0f71a2f6
JM
3024
3025
3026
99e7bb18 3027/* The target-system-dependent byte order is dynamic */
c906108c 3028
adf40b2e 3029extern int target_byte_order;
c906108c
SS
3030#ifndef TARGET_BYTE_ORDER
3031#define TARGET_BYTE_ORDER (target_byte_order + 0)
3032#endif
3033
adf40b2e 3034extern int target_byte_order_auto;
c906108c
SS
3035#ifndef TARGET_BYTE_ORDER_AUTO
3036#define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0)
3037#endif
3038
3039
3040
99e7bb18 3041/* The target-system-dependent BFD architecture is dynamic */
c906108c 3042
adf40b2e 3043extern int target_architecture_auto;
c906108c
SS
3044#ifndef TARGET_ARCHITECTURE_AUTO
3045#define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0)
3046#endif
3047
adf40b2e 3048extern const struct bfd_arch_info *target_architecture;
c906108c
SS
3049#ifndef TARGET_ARCHITECTURE
3050#define TARGET_ARCHITECTURE (target_architecture + 0)
3051#endif
3052
c906108c 3053
99e7bb18 3054/* The target-system-dependent disassembler is semi-dynamic */
c906108c 3055
104c1213 3056extern int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
ff844c8d 3057 unsigned int len, disassemble_info *info);
c906108c 3058
104c1213
JM
3059extern void dis_asm_memory_error (int status, bfd_vma memaddr,
3060 disassemble_info *info);
c906108c 3061
104c1213
JM
3062extern void dis_asm_print_address (bfd_vma addr,
3063 disassemble_info *info);
c906108c 3064
104c1213 3065extern int (*tm_print_insn) (bfd_vma, disassemble_info*);
adf40b2e 3066extern disassemble_info tm_print_insn_info;
c906108c
SS
3067#ifndef TARGET_PRINT_INSN_INFO
3068#define TARGET_PRINT_INSN_INFO (&tm_print_insn_info)
3069#endif
3070
3071
3072
99e7bb18 3073/* Set the dynamic target-system-dependent parameters (architecture,
c906108c
SS
3074 byte-order, ...) using information found in the BFD */
3075
104c1213 3076extern void set_gdbarch_from_file (bfd *);
c906108c
SS
3077
3078
e514a9d6
JM
3079/* Initialize the current architecture to the "first" one we find on
3080 our list. */
3081
3082extern void initialize_current_architecture (void);
3083
ceaa8edf
JB
3084/* For non-multiarched targets, do any initialization of the default
3085 gdbarch object necessary after the _initialize_MODULE functions
3086 have run. */
5ae5f592 3087extern void initialize_non_multiarch (void);
cce74817 3088
c906108c 3089/* gdbarch trace variable */
adf40b2e 3090extern int gdbarch_debug;
c906108c 3091
4b9b3959 3092extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file);
0f71a2f6 3093
c906108c 3094#endif
This page took 0.984994 seconds and 4 git commands to generate.