* configure.tgt (hppa*-*-bsd*, hppa*-*-osf*, m68*-*-sunos4*,
[deliverable/binutils-gdb.git] / gdb / gdbarch.c
CommitLineData
59233f88
AC
1/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
2
adf40b2e 3/* Dynamic architecture support for GDB, the GNU debugger.
b83266a0 4 Copyright 1998-1999, Free Software Foundation, Inc.
c906108c 5
96baa820
JM
6 This file is part of GDB.
7
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
96baa820
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
96baa820
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. */
adf40b2e 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. */
c906108c 34
c906108c
SS
35
36#include "defs.h"
1ad03bde 37#include "arch-utils.h"
c906108c 38
0f71a2f6
JM
39#if GDB_MULTI_ARCH
40#include "gdbcmd.h"
adf40b2e 41#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
0f71a2f6 42#else
7a292a7a
SS
43/* Just include everything in sight so that the every old definition
44 of macro is visible. */
45#include "gdb_string.h"
46#include <ctype.h>
47#include "symtab.h"
48#include "frame.h"
49#include "inferior.h"
50#include "breakpoint.h"
03f2053f 51#include "gdb_wait.h"
7a292a7a
SS
52#include "gdbcore.h"
53#include "gdbcmd.h"
54#include "target.h"
55#include "gdbthread.h"
56#include "annotate.h"
57#include "symfile.h" /* for overlay functions */
0f71a2f6 58#endif
7a292a7a 59#include "symcat.h"
c906108c 60
f0d4cc9e 61#include "floatformat.h"
c906108c 62
104c1213
JM
63/* Static function declarations */
64
65static void verify_gdbarch (struct gdbarch *gdbarch);
66static void init_gdbarch_data (struct gdbarch *);
67static void init_gdbarch_swap (struct gdbarch *);
68static void swapout_gdbarch_swap (struct gdbarch *);
69static void swapin_gdbarch_swap (struct gdbarch *);
70
0f71a2f6
JM
71/* Convenience macro for allocting typesafe memory. */
72
73#ifndef XMALLOC
74#define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
75#endif
76
77
78/* Non-zero if we want to trace architecture code. */
79
80#ifndef GDBARCH_DEBUG
81#define GDBARCH_DEBUG 0
82#endif
83int gdbarch_debug = GDBARCH_DEBUG;
84
85
86/* Maintain the struct gdbarch object */
87
88struct gdbarch
adf40b2e
JM
89{
90 /* basic architectural information */
91 const struct bfd_arch_info * bfd_arch_info;
92 int byte_order;
0f71a2f6 93
adf40b2e
JM
94 /* target specific vector. */
95 struct gdbarch_tdep *tdep;
4b9b3959 96 gdbarch_dump_tdep_ftype *dump_tdep;
0f71a2f6 97
adf40b2e
JM
98 /* per-architecture data-pointers */
99 int nr_data;
100 void **data;
0f71a2f6 101
adf40b2e
JM
102 /* per-architecture swap-regions */
103 struct gdbarch_swap *swap;
0f71a2f6 104
adf40b2e 105 /* Multi-arch values.
0f71a2f6 106
adf40b2e 107 When extending this structure you must:
0f71a2f6 108
adf40b2e 109 Add the field below.
0f71a2f6 110
adf40b2e
JM
111 Declare set/get functions and define the corresponding
112 macro in gdbarch.h.
0f71a2f6 113
adf40b2e
JM
114 gdbarch_alloc(): If zero/NULL is not a suitable default,
115 initialize the new field.
0f71a2f6 116
adf40b2e
JM
117 verify_gdbarch(): Confirm that the target updated the field
118 correctly.
0f71a2f6 119
7e73cedf 120 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
adf40b2e 121 field is dumped out
0f71a2f6 122
c0e8c252 123 ``startup_gdbarch()'': Append an initial value to the static
adf40b2e 124 variable (base values on the host's c-type system).
0f71a2f6 125
adf40b2e
JM
126 get_gdbarch(): Implement the set/get functions (probably using
127 the macro's as shortcuts).
0f71a2f6
JM
128
129 */
130
adf40b2e
JM
131 int short_bit;
132 int int_bit;
133 int long_bit;
134 int long_long_bit;
135 int float_bit;
136 int double_bit;
137 int long_double_bit;
66b43ecb 138 int ptr_bit;
52204a0b 139 int addr_bit;
66b43ecb 140 int bfd_vma_bit;
7355ddba 141 int ieee_float;
adf40b2e
JM
142 gdbarch_read_pc_ftype *read_pc;
143 gdbarch_write_pc_ftype *write_pc;
144 gdbarch_read_fp_ftype *read_fp;
145 gdbarch_write_fp_ftype *write_fp;
146 gdbarch_read_sp_ftype *read_sp;
147 gdbarch_write_sp_ftype *write_sp;
148 int num_regs;
0aba1244 149 int num_pseudo_regs;
adf40b2e
JM
150 int sp_regnum;
151 int fp_regnum;
152 int pc_regnum;
60054393 153 int fp0_regnum;
03863182
AC
154 int npc_regnum;
155 int nnpc_regnum;
88c72b7d
AC
156 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
157 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
158 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
159 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
160 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
adf40b2e
JM
161 gdbarch_register_name_ftype *register_name;
162 int register_size;
163 int register_bytes;
164 gdbarch_register_byte_ftype *register_byte;
165 gdbarch_register_raw_size_ftype *register_raw_size;
166 int max_register_raw_size;
167 gdbarch_register_virtual_size_ftype *register_virtual_size;
168 int max_register_virtual_size;
169 gdbarch_register_virtual_type_ftype *register_virtual_type;
666e11c5 170 gdbarch_do_registers_info_ftype *do_registers_info;
7c7651b2 171 gdbarch_register_sim_regno_ftype *register_sim_regno;
adf40b2e
JM
172 int use_generic_dummy_frames;
173 int call_dummy_location;
174 gdbarch_call_dummy_address_ftype *call_dummy_address;
175 CORE_ADDR call_dummy_start_offset;
176 CORE_ADDR call_dummy_breakpoint_offset;
177 int call_dummy_breakpoint_offset_p;
178 int call_dummy_length;
179 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
180 int call_dummy_p;
181 LONGEST * call_dummy_words;
182 int sizeof_call_dummy_words;
183 int call_dummy_stack_adjust_p;
184 int call_dummy_stack_adjust;
185 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
186 int believe_pcc_promotion;
187 int believe_pcc_promotion_type;
b9a8e3bf 188 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
adf40b2e
JM
189 gdbarch_get_saved_register_ftype *get_saved_register;
190 gdbarch_register_convertible_ftype *register_convertible;
191 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
192 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
7f1b2585
EZ
193 gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
194 gdbarch_store_pseudo_register_ftype *store_pseudo_register;
4478b372
JB
195 gdbarch_pointer_to_address_ftype *pointer_to_address;
196 gdbarch_address_to_pointer_ftype *address_to_pointer;
71a9f22e 197 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
adf40b2e
JM
198 gdbarch_extract_return_value_ftype *extract_return_value;
199 gdbarch_push_arguments_ftype *push_arguments;
200 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
201 gdbarch_push_return_address_ftype *push_return_address;
202 gdbarch_pop_frame_ftype *pop_frame;
203 gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
204 gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
205 gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
206 gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
207 gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
208 gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
209 gdbarch_store_struct_return_ftype *store_struct_return;
210 gdbarch_store_return_value_ftype *store_return_value;
211 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
212 gdbarch_use_struct_convention_ftype *use_struct_convention;
213 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
214 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
215 gdbarch_skip_prologue_ftype *skip_prologue;
dad41f9a 216 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
adf40b2e
JM
217 gdbarch_inner_than_ftype *inner_than;
218 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
917317f4
JM
219 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
220 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
adf40b2e
JM
221 CORE_ADDR decr_pc_after_break;
222 CORE_ADDR function_start_offset;
223 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
224 CORE_ADDR frame_args_skip;
225 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
226 gdbarch_frame_chain_ftype *frame_chain;
227 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
228 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
229 gdbarch_frame_args_address_ftype *frame_args_address;
230 gdbarch_frame_locals_address_ftype *frame_locals_address;
231 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
232 gdbarch_frame_num_args_ftype *frame_num_args;
2ada493a 233 gdbarch_stack_align_ftype *stack_align;
1dd4193b 234 int extra_stack_alignment_needed;
d03e67c9 235 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
d1e3cf49 236 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
f0d4cc9e
AC
237 const struct floatformat * float_format;
238 const struct floatformat * double_format;
239 const struct floatformat * long_double_format;
f517ea4e 240 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
adf40b2e 241};
0f71a2f6
JM
242
243
244/* The default architecture uses host values (for want of a better
245 choice). */
246
247extern const struct bfd_arch_info bfd_default_arch_struct;
248
4b9b3959
AC
249struct gdbarch startup_gdbarch =
250{
0f71a2f6
JM
251 /* basic architecture information */
252 &bfd_default_arch_struct,
253 BIG_ENDIAN,
4b9b3959
AC
254 /* target specific vector and its dump routine */
255 NULL, NULL,
0f71a2f6
JM
256 /*per-architecture data-pointers and swap regions */
257 0, NULL, NULL,
258 /* Multi-arch values */
0f71a2f6
JM
259 8 * sizeof (short),
260 8 * sizeof (int),
261 8 * sizeof (long),
262 8 * sizeof (LONGEST),
263 8 * sizeof (float),
264 8 * sizeof (double),
265 8 * sizeof (long double),
66b43ecb
AC
266 8 * sizeof (void*),
267 8 * sizeof (void*),
52204a0b 268 8 * sizeof (void*),
0f71a2f6
JM
269 0,
270 0,
271 0,
272 0,
273 0,
274 0,
275 0,
276 0,
277 0,
278 0,
279 0,
280 0,
281 0,
282 0,
283 0,
284 0,
285 0,
286 0,
287 0,
288 0,
289 0,
290 0,
291 0,
292 0,
293 0,
294 0,
295 0,
296 0,
297 0,
298 0,
299 0,
300 0,
301 0,
302 0,
303 0,
b9a8e3bf 304 0,
7355ddba 305 0,
03863182
AC
306 0,
307 0,
60054393 308 0,
0aba1244 309 0,
666e11c5 310 0,
7c7651b2 311 0,
88c72b7d
AC
312 0,
313 0,
314 0,
315 0,
316 0,
0f71a2f6
JM
317 generic_get_saved_register,
318 0,
319 0,
320 0,
321 0,
322 0,
323 0,
324 0,
325 0,
326 0,
327 0,
328 0,
329 0,
330 0,
331 0,
332 0,
333 0,
334 0,
335 0,
336 0,
337 0,
338 0,
339 0,
340 0,
341 0,
342 0,
343 0,
344 0,
345 0,
346 0,
347 0,
348 0,
349 0,
350 0,
351 0,
352 0,
917317f4
JM
353 0,
354 0,
4478b372
JB
355 0,
356 0,
71a9f22e 357 0,
2ada493a 358 0,
d03e67c9 359 0,
dad41f9a 360 0,
d1e3cf49 361 0,
f0d4cc9e
AC
362 0,
363 0,
364 0,
7f1b2585
EZ
365 0,
366 0,
1dd4193b 367 0,
f517ea4e 368 0,
c0e8c252 369 /* startup_gdbarch() */
0f71a2f6 370};
4b9b3959 371
c0e8c252 372struct gdbarch *current_gdbarch = &startup_gdbarch;
0f71a2f6
JM
373
374
66b43ecb 375/* Create a new ``struct gdbarch'' based on information provided by
0f71a2f6
JM
376 ``struct gdbarch_info''. */
377
378struct gdbarch *
104c1213
JM
379gdbarch_alloc (const struct gdbarch_info *info,
380 struct gdbarch_tdep *tdep)
0f71a2f6
JM
381{
382 struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
383 memset (gdbarch, 0, sizeof (*gdbarch));
384
385 gdbarch->tdep = tdep;
386
387 gdbarch->bfd_arch_info = info->bfd_arch_info;
388 gdbarch->byte_order = info->byte_order;
389
390 /* Force the explicit initialization of these. */
66b43ecb
AC
391 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
392 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
393 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
394 gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
395 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
396 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
397 gdbarch->long_double_bit = 2*TARGET_DOUBLE_BIT;
398 gdbarch->ptr_bit = TARGET_INT_BIT;
c4093a6a 399 gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
be8dfb87
AC
400 gdbarch->read_pc = generic_target_read_pc;
401 gdbarch->write_pc = generic_target_write_pc;
402 gdbarch->read_fp = generic_target_read_fp;
403 gdbarch->write_fp = generic_target_write_fp;
404 gdbarch->read_sp = generic_target_read_sp;
405 gdbarch->write_sp = generic_target_write_sp;
0f71a2f6
JM
406 gdbarch->num_regs = -1;
407 gdbarch->sp_regnum = -1;
408 gdbarch->fp_regnum = -1;
409 gdbarch->pc_regnum = -1;
60054393 410 gdbarch->fp0_regnum = -1;
03863182
AC
411 gdbarch->npc_regnum = -1;
412 gdbarch->nnpc_regnum = -1;
88c72b7d
AC
413 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
414 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
415 gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
416 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
417 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
c0e8c252 418 gdbarch->register_name = legacy_register_name;
0f71a2f6
JM
419 gdbarch->register_size = -1;
420 gdbarch->register_bytes = -1;
421 gdbarch->max_register_raw_size = -1;
422 gdbarch->max_register_virtual_size = -1;
666e11c5 423 gdbarch->do_registers_info = do_registers_info;
7c7651b2 424 gdbarch->register_sim_regno = default_register_sim_regno;
0f71a2f6
JM
425 gdbarch->use_generic_dummy_frames = -1;
426 gdbarch->call_dummy_start_offset = -1;
427 gdbarch->call_dummy_breakpoint_offset = -1;
428 gdbarch->call_dummy_breakpoint_offset_p = -1;
429 gdbarch->call_dummy_length = -1;
430 gdbarch->call_dummy_p = -1;
c0e8c252
AC
431 gdbarch->call_dummy_words = legacy_call_dummy_words;
432 gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
0f71a2f6 433 gdbarch->call_dummy_stack_adjust_p = -1;
b9a8e3bf 434 gdbarch->coerce_float_to_double = default_coerce_float_to_double;
c0e8c252 435 gdbarch->register_convertible = generic_register_convertible_not;
ac2e2ef7
AC
436 gdbarch->pointer_to_address = unsigned_pointer_to_address;
437 gdbarch->address_to_pointer = unsigned_address_to_pointer;
71a9f22e 438 gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
dad41f9a 439 gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
c0e8c252 440 gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
917317f4
JM
441 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
442 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
0f71a2f6
JM
443 gdbarch->decr_pc_after_break = -1;
444 gdbarch->function_start_offset = -1;
c0e8c252 445 gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
0f71a2f6 446 gdbarch->frame_args_skip = -1;
c0e8c252 447 gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
1dd4193b 448 gdbarch->extra_stack_alignment_needed = 1;
f517ea4e 449 gdbarch->convert_from_func_ptr_addr = default_convert_from_func_ptr_addr;
0f71a2f6
JM
450 /* gdbarch_alloc() */
451
452 return gdbarch;
453}
454
455
058f20d5
JB
456/* Free a gdbarch struct. This should never happen in normal
457 operation --- once you've created a gdbarch, you keep it around.
458 However, if an architecture's init function encounters an error
459 building the structure, it may need to clean up a partially
460 constructed gdbarch. */
4b9b3959 461
058f20d5
JB
462void
463gdbarch_free (struct gdbarch *arch)
464{
465 /* At the moment, this is trivial. */
466 free (arch);
467}
468
469
0f71a2f6
JM
470/* Ensure that all values in a GDBARCH are reasonable. */
471
0f71a2f6 472static void
104c1213 473verify_gdbarch (struct gdbarch *gdbarch)
0f71a2f6
JM
474{
475 /* Only perform sanity checks on a multi-arch target. */
6166d547 476 if (!GDB_MULTI_ARCH)
0f71a2f6
JM
477 return;
478 /* fundamental */
479 if (gdbarch->byte_order == 0)
96baa820 480 internal_error ("verify_gdbarch: byte-order unset");
0f71a2f6 481 if (gdbarch->bfd_arch_info == NULL)
96baa820 482 internal_error ("verify_gdbarch: bfd_arch_info unset");
0f71a2f6 483 /* Check those that need to be defined for the given multi-arch level. */
66b43ecb
AC
484 /* Skip verify of short_bit, invalid_p == 0 */
485 /* Skip verify of int_bit, invalid_p == 0 */
486 /* Skip verify of long_bit, invalid_p == 0 */
487 /* Skip verify of long_long_bit, invalid_p == 0 */
488 /* Skip verify of float_bit, invalid_p == 0 */
489 /* Skip verify of double_bit, invalid_p == 0 */
490 /* Skip verify of long_double_bit, invalid_p == 0 */
491 /* Skip verify of ptr_bit, invalid_p == 0 */
52204a0b
DT
492 if (gdbarch->addr_bit == 0)
493 gdbarch->addr_bit = TARGET_PTR_BIT;
c0e8c252 494 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
7355ddba 495 /* Skip verify of ieee_float, invalid_p == 0 */
be8dfb87
AC
496 /* Skip verify of read_pc, invalid_p == 0 */
497 /* Skip verify of write_pc, invalid_p == 0 */
498 /* Skip verify of read_fp, invalid_p == 0 */
499 /* Skip verify of write_fp, invalid_p == 0 */
500 /* Skip verify of read_sp, invalid_p == 0 */
501 /* Skip verify of write_sp, invalid_p == 0 */
0f71a2f6
JM
502 if ((GDB_MULTI_ARCH >= 2)
503 && (gdbarch->num_regs == -1))
96baa820 504 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
0aba1244 505 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
0f71a2f6
JM
506 if ((GDB_MULTI_ARCH >= 2)
507 && (gdbarch->sp_regnum == -1))
96baa820 508 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
0f71a2f6
JM
509 if ((GDB_MULTI_ARCH >= 2)
510 && (gdbarch->fp_regnum == -1))
96baa820 511 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
0f71a2f6
JM
512 if ((GDB_MULTI_ARCH >= 2)
513 && (gdbarch->pc_regnum == -1))
96baa820 514 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
60054393 515 /* Skip verify of fp0_regnum, invalid_p == 0 */
03863182
AC
516 /* Skip verify of npc_regnum, invalid_p == 0 */
517 /* Skip verify of nnpc_regnum, invalid_p == 0 */
88c72b7d
AC
518 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
519 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
520 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
521 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
522 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
c0e8c252 523 /* Skip verify of register_name, invalid_p == 0 */
0f71a2f6
JM
524 if ((GDB_MULTI_ARCH >= 2)
525 && (gdbarch->register_size == -1))
96baa820 526 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
0f71a2f6
JM
527 if ((GDB_MULTI_ARCH >= 2)
528 && (gdbarch->register_bytes == -1))
96baa820 529 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
0f71a2f6
JM
530 if ((GDB_MULTI_ARCH >= 2)
531 && (gdbarch->register_byte == 0))
96baa820 532 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
0f71a2f6
JM
533 if ((GDB_MULTI_ARCH >= 2)
534 && (gdbarch->register_raw_size == 0))
96baa820 535 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
0f71a2f6
JM
536 if ((GDB_MULTI_ARCH >= 2)
537 && (gdbarch->max_register_raw_size == -1))
96baa820 538 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
0f71a2f6
JM
539 if ((GDB_MULTI_ARCH >= 2)
540 && (gdbarch->register_virtual_size == 0))
96baa820 541 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
0f71a2f6
JM
542 if ((GDB_MULTI_ARCH >= 2)
543 && (gdbarch->max_register_virtual_size == -1))
96baa820 544 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
0f71a2f6
JM
545 if ((GDB_MULTI_ARCH >= 2)
546 && (gdbarch->register_virtual_type == 0))
96baa820 547 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
666e11c5 548 /* Skip verify of do_registers_info, invalid_p == 0 */
7c7651b2 549 /* Skip verify of register_sim_regno, invalid_p == 0 */
0f71a2f6
JM
550 if ((GDB_MULTI_ARCH >= 1)
551 && (gdbarch->use_generic_dummy_frames == -1))
96baa820 552 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
0f71a2f6
JM
553 if ((GDB_MULTI_ARCH >= 2)
554 && (gdbarch->call_dummy_location == 0))
96baa820 555 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
0f71a2f6
JM
556 if ((GDB_MULTI_ARCH >= 2)
557 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
96baa820 558 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
0f71a2f6
JM
559 if ((GDB_MULTI_ARCH >= 2)
560 && (gdbarch->call_dummy_start_offset == -1))
96baa820 561 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
0f71a2f6
JM
562 if ((GDB_MULTI_ARCH >= 2)
563 && (gdbarch->call_dummy_breakpoint_offset == -1))
96baa820 564 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
0f71a2f6
JM
565 if ((GDB_MULTI_ARCH >= 1)
566 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
96baa820 567 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
0f71a2f6
JM
568 if ((GDB_MULTI_ARCH >= 2)
569 && (gdbarch->call_dummy_length == -1))
96baa820 570 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
0f71a2f6
JM
571 if ((GDB_MULTI_ARCH >= 2)
572 && (gdbarch->pc_in_call_dummy == 0))
96baa820 573 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
0f71a2f6
JM
574 if ((GDB_MULTI_ARCH >= 1)
575 && (gdbarch->call_dummy_p == -1))
96baa820 576 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
c0e8c252
AC
577 /* Skip verify of call_dummy_words, invalid_p == 0 */
578 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
0f71a2f6
JM
579 if ((GDB_MULTI_ARCH >= 1)
580 && (gdbarch->call_dummy_stack_adjust_p == -1))
96baa820 581 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
0f71a2f6
JM
582 if ((GDB_MULTI_ARCH >= 2)
583 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
96baa820 584 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
0f71a2f6
JM
585 if ((GDB_MULTI_ARCH >= 2)
586 && (gdbarch->fix_call_dummy == 0))
96baa820 587 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
c0e8c252 588 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
0f71a2f6
JM
589 if ((GDB_MULTI_ARCH >= 1)
590 && (gdbarch->get_saved_register == 0))
96baa820 591 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
c0e8c252
AC
592 /* Skip verify of register_convertible, invalid_p == 0 */
593 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
594 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
7f1b2585
EZ
595 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
596 /* Skip verify of store_pseudo_register, invalid_p == 0 */
4478b372
JB
597 /* Skip verify of pointer_to_address, invalid_p == 0 */
598 /* Skip verify of address_to_pointer, invalid_p == 0 */
71a9f22e 599 /* Skip verify of return_value_on_stack, invalid_p == 0 */
0f71a2f6
JM
600 if ((GDB_MULTI_ARCH >= 2)
601 && (gdbarch->extract_return_value == 0))
96baa820 602 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
0f71a2f6
JM
603 if ((GDB_MULTI_ARCH >= 1)
604 && (gdbarch->push_arguments == 0))
96baa820 605 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
0f71a2f6
JM
606 if ((GDB_MULTI_ARCH >= 2)
607 && (gdbarch->push_dummy_frame == 0))
96baa820 608 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
0f71a2f6
JM
609 if ((GDB_MULTI_ARCH >= 1)
610 && (gdbarch->push_return_address == 0))
96baa820 611 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
0f71a2f6
JM
612 if ((GDB_MULTI_ARCH >= 2)
613 && (gdbarch->pop_frame == 0))
96baa820 614 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
c0e8c252
AC
615 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
616 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
06b8da7d
MS
617 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
618 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
619 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
620 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
0f71a2f6
JM
621 if ((GDB_MULTI_ARCH >= 2)
622 && (gdbarch->store_struct_return == 0))
96baa820 623 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
0f71a2f6
JM
624 if ((GDB_MULTI_ARCH >= 2)
625 && (gdbarch->store_return_value == 0))
96baa820 626 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
0f71a2f6
JM
627 if ((GDB_MULTI_ARCH >= 2)
628 && (gdbarch->extract_struct_value_address == 0))
96baa820 629 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
0f71a2f6
JM
630 if ((GDB_MULTI_ARCH >= 2)
631 && (gdbarch->use_struct_convention == 0))
96baa820 632 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
0f71a2f6
JM
633 if ((GDB_MULTI_ARCH >= 2)
634 && (gdbarch->frame_init_saved_regs == 0))
96baa820 635 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
0f71a2f6
JM
636 if ((GDB_MULTI_ARCH >= 2)
637 && (gdbarch->init_extra_frame_info == 0))
96baa820 638 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
0f71a2f6
JM
639 if ((GDB_MULTI_ARCH >= 2)
640 && (gdbarch->skip_prologue == 0))
96baa820 641 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
dad41f9a 642 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
0f71a2f6
JM
643 if ((GDB_MULTI_ARCH >= 2)
644 && (gdbarch->inner_than == 0))
96baa820 645 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
c0e8c252
AC
646 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
647 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
648 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
0f71a2f6
JM
649 if ((GDB_MULTI_ARCH >= 2)
650 && (gdbarch->decr_pc_after_break == -1))
96baa820 651 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
0f71a2f6
JM
652 if ((GDB_MULTI_ARCH >= 2)
653 && (gdbarch->function_start_offset == -1))
96baa820 654 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
c0e8c252 655 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
0f71a2f6
JM
656 if ((GDB_MULTI_ARCH >= 2)
657 && (gdbarch->frame_args_skip == -1))
96baa820 658 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
c0e8c252 659 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
0f71a2f6
JM
660 if ((GDB_MULTI_ARCH >= 2)
661 && (gdbarch->frame_chain == 0))
96baa820 662 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
0f71a2f6
JM
663 if ((GDB_MULTI_ARCH >= 1)
664 && (gdbarch->frame_chain_valid == 0))
96baa820 665 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
0f71a2f6
JM
666 if ((GDB_MULTI_ARCH >= 2)
667 && (gdbarch->frame_saved_pc == 0))
96baa820 668 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
0f71a2f6
JM
669 if ((GDB_MULTI_ARCH >= 2)
670 && (gdbarch->frame_args_address == 0))
96baa820 671 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
0f71a2f6
JM
672 if ((GDB_MULTI_ARCH >= 2)
673 && (gdbarch->frame_locals_address == 0))
96baa820 674 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
0f71a2f6
JM
675 if ((GDB_MULTI_ARCH >= 2)
676 && (gdbarch->saved_pc_after_call == 0))
96baa820 677 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
0f71a2f6
JM
678 if ((GDB_MULTI_ARCH >= 2)
679 && (gdbarch->frame_num_args == 0))
96baa820 680 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
2ada493a 681 /* Skip verify of stack_align, has predicate */
1dd4193b 682 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
d03e67c9 683 /* Skip verify of reg_struct_has_addr, has predicate */
d1e3cf49 684 /* Skip verify of save_dummy_frame_tos, has predicate */
f0d4cc9e
AC
685 if (gdbarch->float_format == 0)
686 gdbarch->float_format = default_float_format (gdbarch);
687 if (gdbarch->double_format == 0)
688 gdbarch->double_format = default_double_format (gdbarch);
689 if (gdbarch->long_double_format == 0)
690 gdbarch->long_double_format = &floatformat_unknown;
f517ea4e 691 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
0f71a2f6
JM
692}
693
694
695/* Print out the details of the current architecture. */
696
4b9b3959
AC
697/* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
698 just happens to match the global variable ``current_gdbarch''. That
699 way macros refering to that variable get the local and not the global
700 version - ulgh. Once everything is parameterised with gdbarch, this
701 will go away. */
702
0f71a2f6 703void
4b9b3959 704gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
0f71a2f6 705{
4b9b3959
AC
706 fprintf_unfiltered (file,
707 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
708 GDB_MULTI_ARCH);
709#ifdef TARGET_ARCHITECTURE
710 fprintf_unfiltered (file,
711 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
712 XSTRING (TARGET_ARCHITECTURE));
713#endif
714#ifdef TARGET_BYTE_ORDER
715 fprintf_unfiltered (file,
716 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
717 XSTRING (TARGET_BYTE_ORDER));
718#endif
4b9b3959
AC
719#ifdef TARGET_SHORT_BIT
720 fprintf_unfiltered (file,
721 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
722 XSTRING (TARGET_SHORT_BIT));
723#endif
724#ifdef TARGET_INT_BIT
725 fprintf_unfiltered (file,
726 "gdbarch_dump: TARGET_INT_BIT # %s\n",
727 XSTRING (TARGET_INT_BIT));
728#endif
729#ifdef TARGET_LONG_BIT
730 fprintf_unfiltered (file,
731 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
732 XSTRING (TARGET_LONG_BIT));
733#endif
734#ifdef TARGET_LONG_LONG_BIT
735 fprintf_unfiltered (file,
736 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
737 XSTRING (TARGET_LONG_LONG_BIT));
738#endif
739#ifdef TARGET_FLOAT_BIT
740 fprintf_unfiltered (file,
741 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
742 XSTRING (TARGET_FLOAT_BIT));
743#endif
744#ifdef TARGET_DOUBLE_BIT
745 fprintf_unfiltered (file,
746 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
747 XSTRING (TARGET_DOUBLE_BIT));
748#endif
749#ifdef TARGET_LONG_DOUBLE_BIT
750 fprintf_unfiltered (file,
751 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
752 XSTRING (TARGET_LONG_DOUBLE_BIT));
753#endif
66b43ecb
AC
754#ifdef TARGET_PTR_BIT
755 fprintf_unfiltered (file,
756 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
757 XSTRING (TARGET_PTR_BIT));
758#endif
52204a0b
DT
759#ifdef TARGET_ADDR_BIT
760 fprintf_unfiltered (file,
761 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
762 XSTRING (TARGET_ADDR_BIT));
763#endif
66b43ecb
AC
764#ifdef TARGET_BFD_VMA_BIT
765 fprintf_unfiltered (file,
766 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
767 XSTRING (TARGET_BFD_VMA_BIT));
768#endif
4b9b3959
AC
769#ifdef IEEE_FLOAT
770 fprintf_unfiltered (file,
771 "gdbarch_dump: IEEE_FLOAT # %s\n",
772 XSTRING (IEEE_FLOAT));
773#endif
774#ifdef TARGET_READ_PC
775 fprintf_unfiltered (file,
776 "gdbarch_dump: %s # %s\n",
777 "TARGET_READ_PC(pid)",
778 XSTRING (TARGET_READ_PC (pid)));
779#endif
63e69063
AC
780#if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
781 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
782 fprintf_unfiltered (file,
783 "gdbarch_dump: %s # %s\n",
784 "TARGET_WRITE_PC(val, pid)",
785 XSTRING (TARGET_WRITE_PC (val, pid)));
786#endif
787#ifdef TARGET_READ_FP
788 fprintf_unfiltered (file,
789 "gdbarch_dump: %s # %s\n",
790 "TARGET_READ_FP()",
791 XSTRING (TARGET_READ_FP ()));
792#endif
63e69063
AC
793#if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
794 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
795 fprintf_unfiltered (file,
796 "gdbarch_dump: %s # %s\n",
797 "TARGET_WRITE_FP(val)",
798 XSTRING (TARGET_WRITE_FP (val)));
799#endif
800#ifdef TARGET_READ_SP
801 fprintf_unfiltered (file,
802 "gdbarch_dump: %s # %s\n",
803 "TARGET_READ_SP()",
804 XSTRING (TARGET_READ_SP ()));
805#endif
63e69063
AC
806#if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
807 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
808 fprintf_unfiltered (file,
809 "gdbarch_dump: %s # %s\n",
810 "TARGET_WRITE_SP(val)",
811 XSTRING (TARGET_WRITE_SP (val)));
812#endif
813#ifdef NUM_REGS
814 fprintf_unfiltered (file,
815 "gdbarch_dump: NUM_REGS # %s\n",
816 XSTRING (NUM_REGS));
817#endif
0aba1244
EZ
818#ifdef NUM_PSEUDO_REGS
819 fprintf_unfiltered (file,
820 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
821 XSTRING (NUM_PSEUDO_REGS));
822#endif
4b9b3959
AC
823#ifdef SP_REGNUM
824 fprintf_unfiltered (file,
825 "gdbarch_dump: SP_REGNUM # %s\n",
826 XSTRING (SP_REGNUM));
827#endif
828#ifdef FP_REGNUM
829 fprintf_unfiltered (file,
830 "gdbarch_dump: FP_REGNUM # %s\n",
831 XSTRING (FP_REGNUM));
832#endif
833#ifdef PC_REGNUM
834 fprintf_unfiltered (file,
835 "gdbarch_dump: PC_REGNUM # %s\n",
836 XSTRING (PC_REGNUM));
837#endif
838#ifdef FP0_REGNUM
839 fprintf_unfiltered (file,
840 "gdbarch_dump: FP0_REGNUM # %s\n",
841 XSTRING (FP0_REGNUM));
842#endif
843#ifdef NPC_REGNUM
844 fprintf_unfiltered (file,
845 "gdbarch_dump: NPC_REGNUM # %s\n",
846 XSTRING (NPC_REGNUM));
847#endif
848#ifdef NNPC_REGNUM
849 fprintf_unfiltered (file,
850 "gdbarch_dump: NNPC_REGNUM # %s\n",
851 XSTRING (NNPC_REGNUM));
852#endif
88c72b7d
AC
853#ifdef STAB_REG_TO_REGNUM
854 fprintf_unfiltered (file,
855 "gdbarch_dump: %s # %s\n",
856 "STAB_REG_TO_REGNUM(stab_regnr)",
857 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
858#endif
859#ifdef ECOFF_REG_TO_REGNUM
860 fprintf_unfiltered (file,
861 "gdbarch_dump: %s # %s\n",
862 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
863 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
864#endif
865#ifdef DWARF_REG_TO_REGNUM
866 fprintf_unfiltered (file,
867 "gdbarch_dump: %s # %s\n",
868 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
869 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
870#endif
871#ifdef SDB_REG_TO_REGNUM
872 fprintf_unfiltered (file,
873 "gdbarch_dump: %s # %s\n",
874 "SDB_REG_TO_REGNUM(sdb_regnr)",
875 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
876#endif
877#ifdef DWARF2_REG_TO_REGNUM
878 fprintf_unfiltered (file,
879 "gdbarch_dump: %s # %s\n",
880 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
881 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
882#endif
4b9b3959
AC
883#ifdef REGISTER_NAME
884 fprintf_unfiltered (file,
885 "gdbarch_dump: %s # %s\n",
886 "REGISTER_NAME(regnr)",
887 XSTRING (REGISTER_NAME (regnr)));
888#endif
889#ifdef REGISTER_SIZE
890 fprintf_unfiltered (file,
891 "gdbarch_dump: REGISTER_SIZE # %s\n",
892 XSTRING (REGISTER_SIZE));
893#endif
894#ifdef REGISTER_BYTES
895 fprintf_unfiltered (file,
896 "gdbarch_dump: REGISTER_BYTES # %s\n",
897 XSTRING (REGISTER_BYTES));
898#endif
899#ifdef REGISTER_BYTE
900 fprintf_unfiltered (file,
901 "gdbarch_dump: %s # %s\n",
902 "REGISTER_BYTE(reg_nr)",
903 XSTRING (REGISTER_BYTE (reg_nr)));
904#endif
905#ifdef REGISTER_RAW_SIZE
906 fprintf_unfiltered (file,
907 "gdbarch_dump: %s # %s\n",
908 "REGISTER_RAW_SIZE(reg_nr)",
909 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
910#endif
911#ifdef MAX_REGISTER_RAW_SIZE
912 fprintf_unfiltered (file,
913 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
914 XSTRING (MAX_REGISTER_RAW_SIZE));
915#endif
916#ifdef REGISTER_VIRTUAL_SIZE
917 fprintf_unfiltered (file,
918 "gdbarch_dump: %s # %s\n",
919 "REGISTER_VIRTUAL_SIZE(reg_nr)",
920 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
921#endif
922#ifdef MAX_REGISTER_VIRTUAL_SIZE
923 fprintf_unfiltered (file,
924 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
925 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
926#endif
927#ifdef REGISTER_VIRTUAL_TYPE
928 fprintf_unfiltered (file,
929 "gdbarch_dump: %s # %s\n",
930 "REGISTER_VIRTUAL_TYPE(reg_nr)",
931 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
932#endif
666e11c5
EZ
933#if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
934 /* Macro might contain `[{}]' when not multi-arch */
935 fprintf_unfiltered (file,
936 "gdbarch_dump: %s # %s\n",
937 "DO_REGISTERS_INFO(reg_nr, fpregs)",
938 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
939#endif
7c7651b2
AC
940#ifdef REGISTER_SIM_REGNO
941 fprintf_unfiltered (file,
942 "gdbarch_dump: %s # %s\n",
943 "REGISTER_SIM_REGNO(reg_nr)",
944 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
945#endif
4b9b3959
AC
946#ifdef USE_GENERIC_DUMMY_FRAMES
947 fprintf_unfiltered (file,
948 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
949 XSTRING (USE_GENERIC_DUMMY_FRAMES));
950#endif
951#ifdef CALL_DUMMY_LOCATION
952 fprintf_unfiltered (file,
953 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
954 XSTRING (CALL_DUMMY_LOCATION));
955#endif
956#ifdef CALL_DUMMY_ADDRESS
957 fprintf_unfiltered (file,
958 "gdbarch_dump: %s # %s\n",
959 "CALL_DUMMY_ADDRESS()",
960 XSTRING (CALL_DUMMY_ADDRESS ()));
961#endif
962#ifdef CALL_DUMMY_START_OFFSET
963 fprintf_unfiltered (file,
964 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
965 XSTRING (CALL_DUMMY_START_OFFSET));
966#endif
967#ifdef CALL_DUMMY_BREAKPOINT_OFFSET
968 fprintf_unfiltered (file,
969 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
970 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
971#endif
972#ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
973 fprintf_unfiltered (file,
974 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
975 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
976#endif
977#ifdef CALL_DUMMY_LENGTH
978 fprintf_unfiltered (file,
979 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
980 XSTRING (CALL_DUMMY_LENGTH));
981#endif
982#ifdef PC_IN_CALL_DUMMY
983 fprintf_unfiltered (file,
984 "gdbarch_dump: %s # %s\n",
985 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
986 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
987#endif
988#ifdef CALL_DUMMY_P
989 fprintf_unfiltered (file,
990 "gdbarch_dump: CALL_DUMMY_P # %s\n",
991 XSTRING (CALL_DUMMY_P));
992#endif
993#ifdef CALL_DUMMY_WORDS
994 fprintf_unfiltered (file,
995 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
996 XSTRING (CALL_DUMMY_WORDS));
997#endif
998#ifdef SIZEOF_CALL_DUMMY_WORDS
999 fprintf_unfiltered (file,
1000 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1001 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
1002#endif
1003#ifdef CALL_DUMMY_STACK_ADJUST_P
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1006 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
1007#endif
1008#ifdef CALL_DUMMY_STACK_ADJUST
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1011 XSTRING (CALL_DUMMY_STACK_ADJUST));
1012#endif
63e69063
AC
1013#if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1014 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: %s # %s\n",
1017 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1018 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1019#endif
1020#ifdef BELIEVE_PCC_PROMOTION
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1023 XSTRING (BELIEVE_PCC_PROMOTION));
1024#endif
1025#ifdef BELIEVE_PCC_PROMOTION_TYPE
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1028 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
1029#endif
1030#ifdef COERCE_FLOAT_TO_DOUBLE
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: %s # %s\n",
1033 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1034 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
1035#endif
63e69063
AC
1036#if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1037 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1038 fprintf_unfiltered (file,
1039 "gdbarch_dump: %s # %s\n",
1040 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1041 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1042#endif
1043#ifdef REGISTER_CONVERTIBLE
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: %s # %s\n",
1046 "REGISTER_CONVERTIBLE(nr)",
1047 XSTRING (REGISTER_CONVERTIBLE (nr)));
1048#endif
63e69063
AC
1049#if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1050 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: %s # %s\n",
1053 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1054 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1055#endif
63e69063
AC
1056#if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1057 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: %s # %s\n",
1060 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1061 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1062#endif
7f1b2585
EZ
1063#if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1064 /* Macro might contain `[{}]' when not multi-arch */
1065 fprintf_unfiltered (file,
1066 "gdbarch_dump: %s # %s\n",
1067 "FETCH_PSEUDO_REGISTER(regnum)",
1068 XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
1069#endif
1070#if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1071 /* Macro might contain `[{}]' when not multi-arch */
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: %s # %s\n",
1074 "STORE_PSEUDO_REGISTER(regnum)",
1075 XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1076#endif
4b9b3959
AC
1077#ifdef POINTER_TO_ADDRESS
1078 fprintf_unfiltered (file,
1079 "gdbarch_dump: %s # %s\n",
1080 "POINTER_TO_ADDRESS(type, buf)",
1081 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1082#endif
63e69063
AC
1083#if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1084 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: %s # %s\n",
1087 "ADDRESS_TO_POINTER(type, buf, addr)",
1088 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
1089#endif
1090#ifdef RETURN_VALUE_ON_STACK
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: %s # %s\n",
1093 "RETURN_VALUE_ON_STACK(type)",
1094 XSTRING (RETURN_VALUE_ON_STACK (type)));
1095#endif
63e69063
AC
1096#if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1097 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: %s # %s\n",
1100 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1101 XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1102#endif
1103#ifdef PUSH_ARGUMENTS
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: %s # %s\n",
1106 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1107 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1108#endif
63e69063
AC
1109#if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1110 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: %s # %s\n",
1113 "PUSH_DUMMY_FRAME(-)",
1114 XSTRING (PUSH_DUMMY_FRAME (-)));
1115#endif
1116#ifdef PUSH_RETURN_ADDRESS
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: %s # %s\n",
1119 "PUSH_RETURN_ADDRESS(pc, sp)",
1120 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1121#endif
63e69063
AC
1122#if defined (POP_FRAME) && GDB_MULTI_ARCH
1123 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: %s # %s\n",
1126 "POP_FRAME(-)",
1127 XSTRING (POP_FRAME (-)));
1128#endif
1129#ifdef D10V_MAKE_DADDR
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: %s # %s\n",
1132 "D10V_MAKE_DADDR(x)",
1133 XSTRING (D10V_MAKE_DADDR (x)));
1134#endif
1135#ifdef D10V_MAKE_IADDR
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: %s # %s\n",
1138 "D10V_MAKE_IADDR(x)",
1139 XSTRING (D10V_MAKE_IADDR (x)));
1140#endif
1141#ifdef D10V_DADDR_P
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: %s # %s\n",
1144 "D10V_DADDR_P(x)",
1145 XSTRING (D10V_DADDR_P (x)));
1146#endif
1147#ifdef D10V_IADDR_P
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: %s # %s\n",
1150 "D10V_IADDR_P(x)",
1151 XSTRING (D10V_IADDR_P (x)));
1152#endif
1153#ifdef D10V_CONVERT_DADDR_TO_RAW
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: %s # %s\n",
1156 "D10V_CONVERT_DADDR_TO_RAW(x)",
1157 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x)));
1158#endif
1159#ifdef D10V_CONVERT_IADDR_TO_RAW
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: %s # %s\n",
1162 "D10V_CONVERT_IADDR_TO_RAW(x)",
1163 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x)));
1164#endif
63e69063
AC
1165#if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1166 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: %s # %s\n",
1169 "STORE_STRUCT_RETURN(addr, sp)",
1170 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1171#endif
63e69063
AC
1172#if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1173 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: %s # %s\n",
1176 "STORE_RETURN_VALUE(type, valbuf)",
1177 XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1178#endif
1179#ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: %s # %s\n",
1182 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1183 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1184#endif
1185#ifdef USE_STRUCT_CONVENTION
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: %s # %s\n",
1188 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1189 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
1190#endif
63e69063
AC
1191#if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1192 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: %s # %s\n",
1195 "FRAME_INIT_SAVED_REGS(frame)",
1196 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1197#endif
63e69063
AC
1198#if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1199 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: %s # %s\n",
1202 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1203 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1204#endif
1205#ifdef SKIP_PROLOGUE
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: %s # %s\n",
1208 "SKIP_PROLOGUE(ip)",
1209 XSTRING (SKIP_PROLOGUE (ip)));
1210#endif
1211#ifdef PROLOGUE_FRAMELESS_P
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: %s # %s\n",
1214 "PROLOGUE_FRAMELESS_P(ip)",
1215 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1216#endif
1217#ifdef INNER_THAN
1218 fprintf_unfiltered (file,
1219 "gdbarch_dump: %s # %s\n",
1220 "INNER_THAN(lhs, rhs)",
1221 XSTRING (INNER_THAN (lhs, rhs)));
1222#endif
1223#ifdef BREAKPOINT_FROM_PC
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: %s # %s\n",
1226 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1227 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
1228#endif
1229#ifdef MEMORY_INSERT_BREAKPOINT
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: %s # %s\n",
1232 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1233 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1234#endif
1235#ifdef MEMORY_REMOVE_BREAKPOINT
1236 fprintf_unfiltered (file,
1237 "gdbarch_dump: %s # %s\n",
1238 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1239 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1240#endif
1241#ifdef DECR_PC_AFTER_BREAK
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1244 XSTRING (DECR_PC_AFTER_BREAK));
1245#endif
1246#ifdef FUNCTION_START_OFFSET
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1249 XSTRING (FUNCTION_START_OFFSET));
1250#endif
63e69063
AC
1251#if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1252 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: %s # %s\n",
1255 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1256 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1257#endif
1258#ifdef FRAME_ARGS_SKIP
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1261 XSTRING (FRAME_ARGS_SKIP));
1262#endif
1263#ifdef FRAMELESS_FUNCTION_INVOCATION
1264 fprintf_unfiltered (file,
1265 "gdbarch_dump: %s # %s\n",
1266 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1267 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1268#endif
1269#ifdef FRAME_CHAIN
1270 fprintf_unfiltered (file,
1271 "gdbarch_dump: %s # %s\n",
1272 "FRAME_CHAIN(frame)",
1273 XSTRING (FRAME_CHAIN (frame)));
1274#endif
1275#ifdef FRAME_CHAIN_VALID
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: %s # %s\n",
1278 "FRAME_CHAIN_VALID(chain, thisframe)",
1279 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1280#endif
1281#ifdef FRAME_SAVED_PC
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: %s # %s\n",
1284 "FRAME_SAVED_PC(fi)",
1285 XSTRING (FRAME_SAVED_PC (fi)));
1286#endif
1287#ifdef FRAME_ARGS_ADDRESS
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: %s # %s\n",
1290 "FRAME_ARGS_ADDRESS(fi)",
1291 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1292#endif
1293#ifdef FRAME_LOCALS_ADDRESS
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: %s # %s\n",
1296 "FRAME_LOCALS_ADDRESS(fi)",
1297 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1298#endif
1299#ifdef SAVED_PC_AFTER_CALL
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: %s # %s\n",
1302 "SAVED_PC_AFTER_CALL(frame)",
1303 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1304#endif
1305#ifdef FRAME_NUM_ARGS
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: %s # %s\n",
1308 "FRAME_NUM_ARGS(frame)",
1309 XSTRING (FRAME_NUM_ARGS (frame)));
1310#endif
1311#ifdef STACK_ALIGN
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: %s # %s\n",
1314 "STACK_ALIGN(sp)",
1315 XSTRING (STACK_ALIGN (sp)));
1316#endif
1dd4193b
AC
1317#ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1320 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1321#endif
4b9b3959
AC
1322#ifdef REG_STRUCT_HAS_ADDR
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: %s # %s\n",
1325 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1326 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1327#endif
63e69063
AC
1328#if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1329 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: %s # %s\n",
1332 "SAVE_DUMMY_FRAME_TOS(sp)",
1333 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1334#endif
1335#ifdef TARGET_FLOAT_FORMAT
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1338 XSTRING (TARGET_FLOAT_FORMAT));
1339#endif
1340#ifdef TARGET_DOUBLE_FORMAT
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1343 XSTRING (TARGET_DOUBLE_FORMAT));
1344#endif
1345#ifdef TARGET_LONG_DOUBLE_FORMAT
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1348 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1349#endif
f517ea4e
PS
1350#ifdef CONVERT_FROM_FUNC_PTR_ADDR
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: %s # %s\n",
1353 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1354 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1355#endif
381323f4 1356#ifdef TARGET_ARCHITECTURE
0f71a2f6 1357 if (TARGET_ARCHITECTURE != NULL)
4b9b3959
AC
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
adf40b2e 1360 TARGET_ARCHITECTURE->printable_name);
381323f4
AC
1361#endif
1362#ifdef TARGET_BYTE_ORDER
4b9b3959
AC
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
adf40b2e 1365 (long) TARGET_BYTE_ORDER);
381323f4 1366#endif
381323f4 1367#ifdef TARGET_SHORT_BIT
4b9b3959
AC
1368 fprintf_unfiltered (file,
1369 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
adf40b2e 1370 (long) TARGET_SHORT_BIT);
381323f4
AC
1371#endif
1372#ifdef TARGET_INT_BIT
4b9b3959
AC
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
adf40b2e 1375 (long) TARGET_INT_BIT);
381323f4
AC
1376#endif
1377#ifdef TARGET_LONG_BIT
4b9b3959
AC
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
adf40b2e 1380 (long) TARGET_LONG_BIT);
381323f4
AC
1381#endif
1382#ifdef TARGET_LONG_LONG_BIT
4b9b3959
AC
1383 fprintf_unfiltered (file,
1384 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
adf40b2e 1385 (long) TARGET_LONG_LONG_BIT);
381323f4
AC
1386#endif
1387#ifdef TARGET_FLOAT_BIT
4b9b3959
AC
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
adf40b2e 1390 (long) TARGET_FLOAT_BIT);
381323f4
AC
1391#endif
1392#ifdef TARGET_DOUBLE_BIT
4b9b3959
AC
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
adf40b2e 1395 (long) TARGET_DOUBLE_BIT);
381323f4
AC
1396#endif
1397#ifdef TARGET_LONG_DOUBLE_BIT
4b9b3959
AC
1398 fprintf_unfiltered (file,
1399 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
adf40b2e 1400 (long) TARGET_LONG_DOUBLE_BIT);
381323f4 1401#endif
66b43ecb
AC
1402#ifdef TARGET_PTR_BIT
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1405 (long) TARGET_PTR_BIT);
1406#endif
52204a0b
DT
1407#ifdef TARGET_ADDR_BIT
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1410 (long) TARGET_ADDR_BIT);
1411#endif
66b43ecb
AC
1412#ifdef TARGET_BFD_VMA_BIT
1413 fprintf_unfiltered (file,
1414 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1415 (long) TARGET_BFD_VMA_BIT);
1416#endif
381323f4 1417#ifdef IEEE_FLOAT
4b9b3959
AC
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: IEEE_FLOAT = %ld\n",
7355ddba 1420 (long) IEEE_FLOAT);
381323f4
AC
1421#endif
1422#ifdef TARGET_READ_PC
4b9b3959
AC
1423 if (GDB_MULTI_ARCH)
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1426 (long) current_gdbarch->read_pc
1427 /*TARGET_READ_PC ()*/);
381323f4
AC
1428#endif
1429#ifdef TARGET_WRITE_PC
4b9b3959
AC
1430 if (GDB_MULTI_ARCH)
1431 fprintf_unfiltered (file,
1432 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1433 (long) current_gdbarch->write_pc
1434 /*TARGET_WRITE_PC ()*/);
381323f4
AC
1435#endif
1436#ifdef TARGET_READ_FP
4b9b3959
AC
1437 if (GDB_MULTI_ARCH)
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1440 (long) current_gdbarch->read_fp
1441 /*TARGET_READ_FP ()*/);
381323f4
AC
1442#endif
1443#ifdef TARGET_WRITE_FP
4b9b3959
AC
1444 if (GDB_MULTI_ARCH)
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1447 (long) current_gdbarch->write_fp
1448 /*TARGET_WRITE_FP ()*/);
381323f4
AC
1449#endif
1450#ifdef TARGET_READ_SP
4b9b3959
AC
1451 if (GDB_MULTI_ARCH)
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1454 (long) current_gdbarch->read_sp
1455 /*TARGET_READ_SP ()*/);
381323f4
AC
1456#endif
1457#ifdef TARGET_WRITE_SP
4b9b3959
AC
1458 if (GDB_MULTI_ARCH)
1459 fprintf_unfiltered (file,
1460 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1461 (long) current_gdbarch->write_sp
1462 /*TARGET_WRITE_SP ()*/);
381323f4
AC
1463#endif
1464#ifdef NUM_REGS
4b9b3959
AC
1465 fprintf_unfiltered (file,
1466 "gdbarch_dump: NUM_REGS = %ld\n",
adf40b2e 1467 (long) NUM_REGS);
381323f4 1468#endif
0aba1244
EZ
1469#ifdef NUM_PSEUDO_REGS
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1472 (long) NUM_PSEUDO_REGS);
1473#endif
381323f4 1474#ifdef SP_REGNUM
4b9b3959
AC
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: SP_REGNUM = %ld\n",
adf40b2e 1477 (long) SP_REGNUM);
381323f4
AC
1478#endif
1479#ifdef FP_REGNUM
4b9b3959
AC
1480 fprintf_unfiltered (file,
1481 "gdbarch_dump: FP_REGNUM = %ld\n",
adf40b2e 1482 (long) FP_REGNUM);
381323f4
AC
1483#endif
1484#ifdef PC_REGNUM
4b9b3959
AC
1485 fprintf_unfiltered (file,
1486 "gdbarch_dump: PC_REGNUM = %ld\n",
adf40b2e 1487 (long) PC_REGNUM);
381323f4
AC
1488#endif
1489#ifdef FP0_REGNUM
4b9b3959
AC
1490 fprintf_unfiltered (file,
1491 "gdbarch_dump: FP0_REGNUM = %ld\n",
60054393 1492 (long) FP0_REGNUM);
381323f4
AC
1493#endif
1494#ifdef NPC_REGNUM
4b9b3959
AC
1495 fprintf_unfiltered (file,
1496 "gdbarch_dump: NPC_REGNUM = %ld\n",
03863182 1497 (long) NPC_REGNUM);
381323f4
AC
1498#endif
1499#ifdef NNPC_REGNUM
4b9b3959
AC
1500 fprintf_unfiltered (file,
1501 "gdbarch_dump: NNPC_REGNUM = %ld\n",
03863182 1502 (long) NNPC_REGNUM);
381323f4 1503#endif
88c72b7d
AC
1504#ifdef STAB_REG_TO_REGNUM
1505 if (GDB_MULTI_ARCH)
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1508 (long) current_gdbarch->stab_reg_to_regnum
1509 /*STAB_REG_TO_REGNUM ()*/);
1510#endif
1511#ifdef ECOFF_REG_TO_REGNUM
1512 if (GDB_MULTI_ARCH)
1513 fprintf_unfiltered (file,
1514 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1515 (long) current_gdbarch->ecoff_reg_to_regnum
1516 /*ECOFF_REG_TO_REGNUM ()*/);
1517#endif
1518#ifdef DWARF_REG_TO_REGNUM
1519 if (GDB_MULTI_ARCH)
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1522 (long) current_gdbarch->dwarf_reg_to_regnum
1523 /*DWARF_REG_TO_REGNUM ()*/);
1524#endif
1525#ifdef SDB_REG_TO_REGNUM
1526 if (GDB_MULTI_ARCH)
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1529 (long) current_gdbarch->sdb_reg_to_regnum
1530 /*SDB_REG_TO_REGNUM ()*/);
1531#endif
1532#ifdef DWARF2_REG_TO_REGNUM
1533 if (GDB_MULTI_ARCH)
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1536 (long) current_gdbarch->dwarf2_reg_to_regnum
1537 /*DWARF2_REG_TO_REGNUM ()*/);
1538#endif
381323f4 1539#ifdef REGISTER_NAME
4b9b3959
AC
1540 if (GDB_MULTI_ARCH)
1541 fprintf_unfiltered (file,
1542 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1543 (long) current_gdbarch->register_name
1544 /*REGISTER_NAME ()*/);
381323f4
AC
1545#endif
1546#ifdef REGISTER_SIZE
4b9b3959
AC
1547 fprintf_unfiltered (file,
1548 "gdbarch_dump: REGISTER_SIZE = %ld\n",
adf40b2e 1549 (long) REGISTER_SIZE);
381323f4
AC
1550#endif
1551#ifdef REGISTER_BYTES
4b9b3959
AC
1552 fprintf_unfiltered (file,
1553 "gdbarch_dump: REGISTER_BYTES = %ld\n",
adf40b2e 1554 (long) REGISTER_BYTES);
381323f4
AC
1555#endif
1556#ifdef REGISTER_BYTE
4b9b3959
AC
1557 if (GDB_MULTI_ARCH)
1558 fprintf_unfiltered (file,
1559 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1560 (long) current_gdbarch->register_byte
1561 /*REGISTER_BYTE ()*/);
381323f4
AC
1562#endif
1563#ifdef REGISTER_RAW_SIZE
4b9b3959
AC
1564 if (GDB_MULTI_ARCH)
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1567 (long) current_gdbarch->register_raw_size
1568 /*REGISTER_RAW_SIZE ()*/);
381323f4
AC
1569#endif
1570#ifdef MAX_REGISTER_RAW_SIZE
4b9b3959
AC
1571 fprintf_unfiltered (file,
1572 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
adf40b2e 1573 (long) MAX_REGISTER_RAW_SIZE);
381323f4
AC
1574#endif
1575#ifdef REGISTER_VIRTUAL_SIZE
4b9b3959
AC
1576 if (GDB_MULTI_ARCH)
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1579 (long) current_gdbarch->register_virtual_size
1580 /*REGISTER_VIRTUAL_SIZE ()*/);
381323f4
AC
1581#endif
1582#ifdef MAX_REGISTER_VIRTUAL_SIZE
4b9b3959
AC
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
adf40b2e 1585 (long) MAX_REGISTER_VIRTUAL_SIZE);
381323f4
AC
1586#endif
1587#ifdef REGISTER_VIRTUAL_TYPE
4b9b3959
AC
1588 if (GDB_MULTI_ARCH)
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1591 (long) current_gdbarch->register_virtual_type
1592 /*REGISTER_VIRTUAL_TYPE ()*/);
381323f4 1593#endif
666e11c5
EZ
1594#ifdef DO_REGISTERS_INFO
1595 if (GDB_MULTI_ARCH)
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1598 (long) current_gdbarch->do_registers_info
1599 /*DO_REGISTERS_INFO ()*/);
1600#endif
7c7651b2
AC
1601#ifdef REGISTER_SIM_REGNO
1602 if (GDB_MULTI_ARCH)
1603 fprintf_unfiltered (file,
1604 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1605 (long) current_gdbarch->register_sim_regno
1606 /*REGISTER_SIM_REGNO ()*/);
1607#endif
381323f4 1608#ifdef USE_GENERIC_DUMMY_FRAMES
4b9b3959
AC
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
adf40b2e 1611 (long) USE_GENERIC_DUMMY_FRAMES);
381323f4
AC
1612#endif
1613#ifdef CALL_DUMMY_LOCATION
4b9b3959
AC
1614 fprintf_unfiltered (file,
1615 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
adf40b2e 1616 (long) CALL_DUMMY_LOCATION);
381323f4
AC
1617#endif
1618#ifdef CALL_DUMMY_ADDRESS
4b9b3959
AC
1619 if (GDB_MULTI_ARCH)
1620 fprintf_unfiltered (file,
1621 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1622 (long) current_gdbarch->call_dummy_address
1623 /*CALL_DUMMY_ADDRESS ()*/);
381323f4
AC
1624#endif
1625#ifdef CALL_DUMMY_START_OFFSET
4b9b3959
AC
1626 fprintf_unfiltered (file,
1627 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
adf40b2e 1628 (long) CALL_DUMMY_START_OFFSET);
381323f4
AC
1629#endif
1630#ifdef CALL_DUMMY_BREAKPOINT_OFFSET
7861024d
JG
1631 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
1632 fprintf_unfiltered (file,
1633 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1634 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
381323f4
AC
1635#endif
1636#ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
4b9b3959
AC
1637 fprintf_unfiltered (file,
1638 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
adf40b2e 1639 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
381323f4
AC
1640#endif
1641#ifdef CALL_DUMMY_LENGTH
0f71a2f6 1642 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
4b9b3959
AC
1643 fprintf_unfiltered (file,
1644 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
adf40b2e 1645 (long) CALL_DUMMY_LENGTH);
381323f4
AC
1646#endif
1647#ifdef PC_IN_CALL_DUMMY
4b9b3959
AC
1648 if (GDB_MULTI_ARCH)
1649 fprintf_unfiltered (file,
1650 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1651 (long) current_gdbarch->pc_in_call_dummy
1652 /*PC_IN_CALL_DUMMY ()*/);
381323f4
AC
1653#endif
1654#ifdef CALL_DUMMY_P
4b9b3959
AC
1655 fprintf_unfiltered (file,
1656 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
adf40b2e 1657 (long) CALL_DUMMY_P);
381323f4
AC
1658#endif
1659#ifdef CALL_DUMMY_WORDS
4b9b3959
AC
1660 fprintf_unfiltered (file,
1661 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
adf40b2e 1662 (long) CALL_DUMMY_WORDS);
381323f4
AC
1663#endif
1664#ifdef SIZEOF_CALL_DUMMY_WORDS
4b9b3959
AC
1665 fprintf_unfiltered (file,
1666 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
adf40b2e 1667 (long) SIZEOF_CALL_DUMMY_WORDS);
381323f4
AC
1668#endif
1669#ifdef CALL_DUMMY_STACK_ADJUST_P
4b9b3959
AC
1670 fprintf_unfiltered (file,
1671 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
adf40b2e 1672 (long) CALL_DUMMY_STACK_ADJUST_P);
381323f4
AC
1673#endif
1674#ifdef CALL_DUMMY_STACK_ADJUST
0f71a2f6 1675 if (CALL_DUMMY_STACK_ADJUST_P)
4b9b3959
AC
1676 fprintf_unfiltered (file,
1677 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
adf40b2e 1678 (long) CALL_DUMMY_STACK_ADJUST);
381323f4
AC
1679#endif
1680#ifdef FIX_CALL_DUMMY
4b9b3959
AC
1681 if (GDB_MULTI_ARCH)
1682 fprintf_unfiltered (file,
1683 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1684 (long) current_gdbarch->fix_call_dummy
1685 /*FIX_CALL_DUMMY ()*/);
381323f4 1686#endif
0f71a2f6 1687#ifdef BELIEVE_PCC_PROMOTION
4b9b3959
AC
1688 fprintf_unfiltered (file,
1689 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
adf40b2e 1690 (long) BELIEVE_PCC_PROMOTION);
0f71a2f6
JM
1691#endif
1692#ifdef BELIEVE_PCC_PROMOTION_TYPE
4b9b3959
AC
1693 fprintf_unfiltered (file,
1694 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
adf40b2e 1695 (long) BELIEVE_PCC_PROMOTION_TYPE);
0f71a2f6 1696#endif
381323f4 1697#ifdef COERCE_FLOAT_TO_DOUBLE
4b9b3959
AC
1698 if (GDB_MULTI_ARCH)
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1701 (long) current_gdbarch->coerce_float_to_double
1702 /*COERCE_FLOAT_TO_DOUBLE ()*/);
381323f4
AC
1703#endif
1704#ifdef GET_SAVED_REGISTER
4b9b3959
AC
1705 if (GDB_MULTI_ARCH)
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1708 (long) current_gdbarch->get_saved_register
1709 /*GET_SAVED_REGISTER ()*/);
381323f4
AC
1710#endif
1711#ifdef REGISTER_CONVERTIBLE
4b9b3959
AC
1712 if (GDB_MULTI_ARCH)
1713 fprintf_unfiltered (file,
1714 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1715 (long) current_gdbarch->register_convertible
1716 /*REGISTER_CONVERTIBLE ()*/);
381323f4
AC
1717#endif
1718#ifdef REGISTER_CONVERT_TO_VIRTUAL
4b9b3959
AC
1719 if (GDB_MULTI_ARCH)
1720 fprintf_unfiltered (file,
1721 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1722 (long) current_gdbarch->register_convert_to_virtual
1723 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
381323f4
AC
1724#endif
1725#ifdef REGISTER_CONVERT_TO_RAW
4b9b3959
AC
1726 if (GDB_MULTI_ARCH)
1727 fprintf_unfiltered (file,
1728 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1729 (long) current_gdbarch->register_convert_to_raw
1730 /*REGISTER_CONVERT_TO_RAW ()*/);
381323f4 1731#endif
7f1b2585
EZ
1732#ifdef FETCH_PSEUDO_REGISTER
1733 if (GDB_MULTI_ARCH)
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1736 (long) current_gdbarch->fetch_pseudo_register
1737 /*FETCH_PSEUDO_REGISTER ()*/);
1738#endif
1739#ifdef STORE_PSEUDO_REGISTER
1740 if (GDB_MULTI_ARCH)
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1743 (long) current_gdbarch->store_pseudo_register
1744 /*STORE_PSEUDO_REGISTER ()*/);
1745#endif
381323f4 1746#ifdef POINTER_TO_ADDRESS
4b9b3959
AC
1747 if (GDB_MULTI_ARCH)
1748 fprintf_unfiltered (file,
1749 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1750 (long) current_gdbarch->pointer_to_address
1751 /*POINTER_TO_ADDRESS ()*/);
381323f4
AC
1752#endif
1753#ifdef ADDRESS_TO_POINTER
4b9b3959
AC
1754 if (GDB_MULTI_ARCH)
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1757 (long) current_gdbarch->address_to_pointer
1758 /*ADDRESS_TO_POINTER ()*/);
381323f4
AC
1759#endif
1760#ifdef RETURN_VALUE_ON_STACK
4b9b3959
AC
1761 if (GDB_MULTI_ARCH)
1762 fprintf_unfiltered (file,
1763 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1764 (long) current_gdbarch->return_value_on_stack
1765 /*RETURN_VALUE_ON_STACK ()*/);
381323f4
AC
1766#endif
1767#ifdef EXTRACT_RETURN_VALUE
4b9b3959
AC
1768 if (GDB_MULTI_ARCH)
1769 fprintf_unfiltered (file,
1770 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1771 (long) current_gdbarch->extract_return_value
1772 /*EXTRACT_RETURN_VALUE ()*/);
381323f4
AC
1773#endif
1774#ifdef PUSH_ARGUMENTS
4b9b3959
AC
1775 if (GDB_MULTI_ARCH)
1776 fprintf_unfiltered (file,
1777 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1778 (long) current_gdbarch->push_arguments
1779 /*PUSH_ARGUMENTS ()*/);
381323f4
AC
1780#endif
1781#ifdef PUSH_DUMMY_FRAME
4b9b3959
AC
1782 if (GDB_MULTI_ARCH)
1783 fprintf_unfiltered (file,
1784 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1785 (long) current_gdbarch->push_dummy_frame
1786 /*PUSH_DUMMY_FRAME ()*/);
381323f4
AC
1787#endif
1788#ifdef PUSH_RETURN_ADDRESS
4b9b3959
AC
1789 if (GDB_MULTI_ARCH)
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1792 (long) current_gdbarch->push_return_address
1793 /*PUSH_RETURN_ADDRESS ()*/);
381323f4
AC
1794#endif
1795#ifdef POP_FRAME
4b9b3959
AC
1796 if (GDB_MULTI_ARCH)
1797 fprintf_unfiltered (file,
1798 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1799 (long) current_gdbarch->pop_frame
1800 /*POP_FRAME ()*/);
381323f4
AC
1801#endif
1802#ifdef D10V_MAKE_DADDR
4b9b3959
AC
1803 if (GDB_MULTI_ARCH)
1804 fprintf_unfiltered (file,
1805 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1806 (long) current_gdbarch->d10v_make_daddr
1807 /*D10V_MAKE_DADDR ()*/);
381323f4
AC
1808#endif
1809#ifdef D10V_MAKE_IADDR
4b9b3959
AC
1810 if (GDB_MULTI_ARCH)
1811 fprintf_unfiltered (file,
1812 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1813 (long) current_gdbarch->d10v_make_iaddr
1814 /*D10V_MAKE_IADDR ()*/);
381323f4
AC
1815#endif
1816#ifdef D10V_DADDR_P
4b9b3959
AC
1817 if (GDB_MULTI_ARCH)
1818 fprintf_unfiltered (file,
1819 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1820 (long) current_gdbarch->d10v_daddr_p
1821 /*D10V_DADDR_P ()*/);
381323f4
AC
1822#endif
1823#ifdef D10V_IADDR_P
4b9b3959
AC
1824 if (GDB_MULTI_ARCH)
1825 fprintf_unfiltered (file,
1826 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1827 (long) current_gdbarch->d10v_iaddr_p
1828 /*D10V_IADDR_P ()*/);
381323f4
AC
1829#endif
1830#ifdef D10V_CONVERT_DADDR_TO_RAW
4b9b3959
AC
1831 if (GDB_MULTI_ARCH)
1832 fprintf_unfiltered (file,
1833 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1834 (long) current_gdbarch->d10v_convert_daddr_to_raw
1835 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
381323f4
AC
1836#endif
1837#ifdef D10V_CONVERT_IADDR_TO_RAW
4b9b3959
AC
1838 if (GDB_MULTI_ARCH)
1839 fprintf_unfiltered (file,
1840 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1841 (long) current_gdbarch->d10v_convert_iaddr_to_raw
1842 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
381323f4
AC
1843#endif
1844#ifdef STORE_STRUCT_RETURN
4b9b3959
AC
1845 if (GDB_MULTI_ARCH)
1846 fprintf_unfiltered (file,
1847 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1848 (long) current_gdbarch->store_struct_return
1849 /*STORE_STRUCT_RETURN ()*/);
381323f4
AC
1850#endif
1851#ifdef STORE_RETURN_VALUE
4b9b3959
AC
1852 if (GDB_MULTI_ARCH)
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1855 (long) current_gdbarch->store_return_value
1856 /*STORE_RETURN_VALUE ()*/);
381323f4
AC
1857#endif
1858#ifdef EXTRACT_STRUCT_VALUE_ADDRESS
4b9b3959
AC
1859 if (GDB_MULTI_ARCH)
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1862 (long) current_gdbarch->extract_struct_value_address
1863 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
381323f4
AC
1864#endif
1865#ifdef USE_STRUCT_CONVENTION
4b9b3959
AC
1866 if (GDB_MULTI_ARCH)
1867 fprintf_unfiltered (file,
1868 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1869 (long) current_gdbarch->use_struct_convention
1870 /*USE_STRUCT_CONVENTION ()*/);
381323f4
AC
1871#endif
1872#ifdef FRAME_INIT_SAVED_REGS
4b9b3959
AC
1873 if (GDB_MULTI_ARCH)
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1876 (long) current_gdbarch->frame_init_saved_regs
1877 /*FRAME_INIT_SAVED_REGS ()*/);
381323f4
AC
1878#endif
1879#ifdef INIT_EXTRA_FRAME_INFO
4b9b3959
AC
1880 if (GDB_MULTI_ARCH)
1881 fprintf_unfiltered (file,
1882 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1883 (long) current_gdbarch->init_extra_frame_info
1884 /*INIT_EXTRA_FRAME_INFO ()*/);
381323f4
AC
1885#endif
1886#ifdef SKIP_PROLOGUE
4b9b3959
AC
1887 if (GDB_MULTI_ARCH)
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1890 (long) current_gdbarch->skip_prologue
1891 /*SKIP_PROLOGUE ()*/);
381323f4
AC
1892#endif
1893#ifdef PROLOGUE_FRAMELESS_P
4b9b3959
AC
1894 if (GDB_MULTI_ARCH)
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1897 (long) current_gdbarch->prologue_frameless_p
1898 /*PROLOGUE_FRAMELESS_P ()*/);
381323f4
AC
1899#endif
1900#ifdef INNER_THAN
4b9b3959
AC
1901 if (GDB_MULTI_ARCH)
1902 fprintf_unfiltered (file,
1903 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1904 (long) current_gdbarch->inner_than
1905 /*INNER_THAN ()*/);
381323f4
AC
1906#endif
1907#ifdef BREAKPOINT_FROM_PC
4b9b3959
AC
1908 if (GDB_MULTI_ARCH)
1909 fprintf_unfiltered (file,
1910 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
1911 (long) current_gdbarch->breakpoint_from_pc
1912 /*BREAKPOINT_FROM_PC ()*/);
381323f4
AC
1913#endif
1914#ifdef MEMORY_INSERT_BREAKPOINT
4b9b3959
AC
1915 if (GDB_MULTI_ARCH)
1916 fprintf_unfiltered (file,
1917 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1918 (long) current_gdbarch->memory_insert_breakpoint
1919 /*MEMORY_INSERT_BREAKPOINT ()*/);
381323f4
AC
1920#endif
1921#ifdef MEMORY_REMOVE_BREAKPOINT
4b9b3959
AC
1922 if (GDB_MULTI_ARCH)
1923 fprintf_unfiltered (file,
1924 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1925 (long) current_gdbarch->memory_remove_breakpoint
1926 /*MEMORY_REMOVE_BREAKPOINT ()*/);
381323f4
AC
1927#endif
1928#ifdef DECR_PC_AFTER_BREAK
4b9b3959
AC
1929 fprintf_unfiltered (file,
1930 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
adf40b2e 1931 (long) DECR_PC_AFTER_BREAK);
381323f4
AC
1932#endif
1933#ifdef FUNCTION_START_OFFSET
4b9b3959
AC
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
adf40b2e 1936 (long) FUNCTION_START_OFFSET);
381323f4
AC
1937#endif
1938#ifdef REMOTE_TRANSLATE_XFER_ADDRESS
4b9b3959
AC
1939 if (GDB_MULTI_ARCH)
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1942 (long) current_gdbarch->remote_translate_xfer_address
1943 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
381323f4
AC
1944#endif
1945#ifdef FRAME_ARGS_SKIP
4b9b3959
AC
1946 fprintf_unfiltered (file,
1947 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
adf40b2e 1948 (long) FRAME_ARGS_SKIP);
381323f4
AC
1949#endif
1950#ifdef FRAMELESS_FUNCTION_INVOCATION
4b9b3959
AC
1951 if (GDB_MULTI_ARCH)
1952 fprintf_unfiltered (file,
1953 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1954 (long) current_gdbarch->frameless_function_invocation
1955 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
381323f4
AC
1956#endif
1957#ifdef FRAME_CHAIN
4b9b3959
AC
1958 if (GDB_MULTI_ARCH)
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1961 (long) current_gdbarch->frame_chain
1962 /*FRAME_CHAIN ()*/);
381323f4
AC
1963#endif
1964#ifdef FRAME_CHAIN_VALID
4b9b3959
AC
1965 if (GDB_MULTI_ARCH)
1966 fprintf_unfiltered (file,
1967 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1968 (long) current_gdbarch->frame_chain_valid
1969 /*FRAME_CHAIN_VALID ()*/);
381323f4
AC
1970#endif
1971#ifdef FRAME_SAVED_PC
4b9b3959
AC
1972 if (GDB_MULTI_ARCH)
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1975 (long) current_gdbarch->frame_saved_pc
1976 /*FRAME_SAVED_PC ()*/);
381323f4
AC
1977#endif
1978#ifdef FRAME_ARGS_ADDRESS
4b9b3959
AC
1979 if (GDB_MULTI_ARCH)
1980 fprintf_unfiltered (file,
1981 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1982 (long) current_gdbarch->frame_args_address
1983 /*FRAME_ARGS_ADDRESS ()*/);
381323f4
AC
1984#endif
1985#ifdef FRAME_LOCALS_ADDRESS
4b9b3959
AC
1986 if (GDB_MULTI_ARCH)
1987 fprintf_unfiltered (file,
1988 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1989 (long) current_gdbarch->frame_locals_address
1990 /*FRAME_LOCALS_ADDRESS ()*/);
381323f4
AC
1991#endif
1992#ifdef SAVED_PC_AFTER_CALL
4b9b3959
AC
1993 if (GDB_MULTI_ARCH)
1994 fprintf_unfiltered (file,
1995 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1996 (long) current_gdbarch->saved_pc_after_call
1997 /*SAVED_PC_AFTER_CALL ()*/);
381323f4
AC
1998#endif
1999#ifdef FRAME_NUM_ARGS
4b9b3959
AC
2000 if (GDB_MULTI_ARCH)
2001 fprintf_unfiltered (file,
2002 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2003 (long) current_gdbarch->frame_num_args
2004 /*FRAME_NUM_ARGS ()*/);
381323f4
AC
2005#endif
2006#ifdef STACK_ALIGN
4b9b3959
AC
2007 if (GDB_MULTI_ARCH)
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2010 (long) current_gdbarch->stack_align
2011 /*STACK_ALIGN ()*/);
381323f4 2012#endif
1dd4193b
AC
2013#ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2014 fprintf_unfiltered (file,
2015 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2016 (long) EXTRA_STACK_ALIGNMENT_NEEDED);
2017#endif
381323f4 2018#ifdef REG_STRUCT_HAS_ADDR
4b9b3959
AC
2019 if (GDB_MULTI_ARCH)
2020 fprintf_unfiltered (file,
2021 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2022 (long) current_gdbarch->reg_struct_has_addr
2023 /*REG_STRUCT_HAS_ADDR ()*/);
d1e3cf49
AC
2024#endif
2025#ifdef SAVE_DUMMY_FRAME_TOS
4b9b3959
AC
2026 if (GDB_MULTI_ARCH)
2027 fprintf_unfiltered (file,
2028 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2029 (long) current_gdbarch->save_dummy_frame_tos
2030 /*SAVE_DUMMY_FRAME_TOS ()*/);
f0d4cc9e
AC
2031#endif
2032#ifdef TARGET_FLOAT_FORMAT
4b9b3959
AC
2033 fprintf_unfiltered (file,
2034 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
f0d4cc9e
AC
2035 (long) TARGET_FLOAT_FORMAT);
2036#endif
2037#ifdef TARGET_DOUBLE_FORMAT
4b9b3959
AC
2038 fprintf_unfiltered (file,
2039 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
f0d4cc9e
AC
2040 (long) TARGET_DOUBLE_FORMAT);
2041#endif
2042#ifdef TARGET_LONG_DOUBLE_FORMAT
4b9b3959
AC
2043 fprintf_unfiltered (file,
2044 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
f0d4cc9e 2045 (long) TARGET_LONG_DOUBLE_FORMAT);
f517ea4e
PS
2046#endif
2047#ifdef CONVERT_FROM_FUNC_PTR_ADDR
2048 if (GDB_MULTI_ARCH)
2049 fprintf_unfiltered (file,
2050 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2051 (long) current_gdbarch->convert_from_func_ptr_addr
2052 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
381323f4 2053#endif
4b9b3959
AC
2054 if (current_gdbarch->dump_tdep != NULL)
2055 current_gdbarch->dump_tdep (current_gdbarch, file);
0f71a2f6
JM
2056}
2057
2058struct gdbarch_tdep *
104c1213 2059gdbarch_tdep (struct gdbarch *gdbarch)
0f71a2f6
JM
2060{
2061 if (gdbarch_debug >= 2)
0f71a2f6
JM
2062 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2063 return gdbarch->tdep;
2064}
2065
2066
2067const struct bfd_arch_info *
104c1213 2068gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
0f71a2f6
JM
2069{
2070 if (gdbarch_debug >= 2)
0f71a2f6
JM
2071 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2072 return gdbarch->bfd_arch_info;
2073}
2074
2075int
104c1213 2076gdbarch_byte_order (struct gdbarch *gdbarch)
0f71a2f6
JM
2077{
2078 if (gdbarch_debug >= 2)
0f71a2f6
JM
2079 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2080 return gdbarch->byte_order;
2081}
2082
0f71a2f6 2083int
104c1213 2084gdbarch_short_bit (struct gdbarch *gdbarch)
0f71a2f6 2085{
66b43ecb 2086 /* Skip verify of short_bit, invalid_p == 0 */
0f71a2f6 2087 if (gdbarch_debug >= 2)
0f71a2f6
JM
2088 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2089 return gdbarch->short_bit;
2090}
2091
2092void
104c1213
JM
2093set_gdbarch_short_bit (struct gdbarch *gdbarch,
2094 int short_bit)
0f71a2f6
JM
2095{
2096 gdbarch->short_bit = short_bit;
2097}
2098
2099int
104c1213 2100gdbarch_int_bit (struct gdbarch *gdbarch)
0f71a2f6 2101{
66b43ecb 2102 /* Skip verify of int_bit, invalid_p == 0 */
0f71a2f6 2103 if (gdbarch_debug >= 2)
0f71a2f6
JM
2104 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2105 return gdbarch->int_bit;
2106}
2107
2108void
104c1213
JM
2109set_gdbarch_int_bit (struct gdbarch *gdbarch,
2110 int int_bit)
0f71a2f6
JM
2111{
2112 gdbarch->int_bit = int_bit;
2113}
2114
2115int
104c1213 2116gdbarch_long_bit (struct gdbarch *gdbarch)
0f71a2f6 2117{
66b43ecb 2118 /* Skip verify of long_bit, invalid_p == 0 */
0f71a2f6 2119 if (gdbarch_debug >= 2)
0f71a2f6
JM
2120 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2121 return gdbarch->long_bit;
2122}
2123
2124void
104c1213
JM
2125set_gdbarch_long_bit (struct gdbarch *gdbarch,
2126 int long_bit)
0f71a2f6
JM
2127{
2128 gdbarch->long_bit = long_bit;
2129}
2130
2131int
104c1213 2132gdbarch_long_long_bit (struct gdbarch *gdbarch)
0f71a2f6 2133{
66b43ecb 2134 /* Skip verify of long_long_bit, invalid_p == 0 */
0f71a2f6 2135 if (gdbarch_debug >= 2)
0f71a2f6
JM
2136 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2137 return gdbarch->long_long_bit;
2138}
2139
2140void
104c1213
JM
2141set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2142 int long_long_bit)
0f71a2f6
JM
2143{
2144 gdbarch->long_long_bit = long_long_bit;
2145}
2146
2147int
104c1213 2148gdbarch_float_bit (struct gdbarch *gdbarch)
0f71a2f6 2149{
66b43ecb 2150 /* Skip verify of float_bit, invalid_p == 0 */
0f71a2f6 2151 if (gdbarch_debug >= 2)
0f71a2f6
JM
2152 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2153 return gdbarch->float_bit;
2154}
2155
2156void
104c1213
JM
2157set_gdbarch_float_bit (struct gdbarch *gdbarch,
2158 int float_bit)
0f71a2f6
JM
2159{
2160 gdbarch->float_bit = float_bit;
2161}
2162
2163int
104c1213 2164gdbarch_double_bit (struct gdbarch *gdbarch)
0f71a2f6 2165{
66b43ecb 2166 /* Skip verify of double_bit, invalid_p == 0 */
0f71a2f6 2167 if (gdbarch_debug >= 2)
0f71a2f6
JM
2168 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2169 return gdbarch->double_bit;
2170}
2171
2172void
104c1213
JM
2173set_gdbarch_double_bit (struct gdbarch *gdbarch,
2174 int double_bit)
0f71a2f6
JM
2175{
2176 gdbarch->double_bit = double_bit;
2177}
2178
2179int
104c1213 2180gdbarch_long_double_bit (struct gdbarch *gdbarch)
0f71a2f6 2181{
66b43ecb 2182 /* Skip verify of long_double_bit, invalid_p == 0 */
0f71a2f6 2183 if (gdbarch_debug >= 2)
0f71a2f6
JM
2184 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2185 return gdbarch->long_double_bit;
2186}
2187
2188void
104c1213
JM
2189set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2190 int long_double_bit)
0f71a2f6
JM
2191{
2192 gdbarch->long_double_bit = long_double_bit;
2193}
2194
66b43ecb
AC
2195int
2196gdbarch_ptr_bit (struct gdbarch *gdbarch)
2197{
2198 /* Skip verify of ptr_bit, invalid_p == 0 */
2199 if (gdbarch_debug >= 2)
2200 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2201 return gdbarch->ptr_bit;
2202}
2203
2204void
2205set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2206 int ptr_bit)
2207{
2208 gdbarch->ptr_bit = ptr_bit;
2209}
2210
52204a0b
DT
2211int
2212gdbarch_addr_bit (struct gdbarch *gdbarch)
2213{
2214 if (gdbarch->addr_bit == 0)
2215 internal_error ("gdbarch: gdbarch_addr_bit invalid");
2216 if (gdbarch_debug >= 2)
2217 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2218 return gdbarch->addr_bit;
2219}
2220
2221void
2222set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2223 int addr_bit)
2224{
2225 gdbarch->addr_bit = addr_bit;
2226}
2227
66b43ecb
AC
2228int
2229gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2230{
2231 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2232 if (gdbarch_debug >= 2)
2233 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2234 return gdbarch->bfd_vma_bit;
2235}
2236
2237void
2238set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2239 int bfd_vma_bit)
2240{
2241 gdbarch->bfd_vma_bit = bfd_vma_bit;
2242}
2243
7355ddba
JB
2244int
2245gdbarch_ieee_float (struct gdbarch *gdbarch)
2246{
2247 /* Skip verify of ieee_float, invalid_p == 0 */
2248 if (gdbarch_debug >= 2)
2249 fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
2250 return gdbarch->ieee_float;
2251}
2252
2253void
2254set_gdbarch_ieee_float (struct gdbarch *gdbarch,
2255 int ieee_float)
2256{
2257 gdbarch->ieee_float = ieee_float;
2258}
2259
0f71a2f6
JM
2260CORE_ADDR
2261gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
2262{
2263 if (gdbarch->read_pc == 0)
96baa820 2264 internal_error ("gdbarch: gdbarch_read_pc invalid");
0f71a2f6 2265 if (gdbarch_debug >= 2)
0f71a2f6
JM
2266 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2267 return gdbarch->read_pc (pid);
2268}
2269
2270void
104c1213
JM
2271set_gdbarch_read_pc (struct gdbarch *gdbarch,
2272 gdbarch_read_pc_ftype read_pc)
0f71a2f6
JM
2273{
2274 gdbarch->read_pc = read_pc;
2275}
2276
2277void
2278gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
2279{
2280 if (gdbarch->write_pc == 0)
96baa820 2281 internal_error ("gdbarch: gdbarch_write_pc invalid");
0f71a2f6 2282 if (gdbarch_debug >= 2)
0f71a2f6
JM
2283 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2284 gdbarch->write_pc (val, pid);
2285}
2286
2287void
104c1213
JM
2288set_gdbarch_write_pc (struct gdbarch *gdbarch,
2289 gdbarch_write_pc_ftype write_pc)
0f71a2f6
JM
2290{
2291 gdbarch->write_pc = write_pc;
2292}
2293
2294CORE_ADDR
2295gdbarch_read_fp (struct gdbarch *gdbarch)
2296{
2297 if (gdbarch->read_fp == 0)
96baa820 2298 internal_error ("gdbarch: gdbarch_read_fp invalid");
0f71a2f6 2299 if (gdbarch_debug >= 2)
0f71a2f6
JM
2300 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2301 return gdbarch->read_fp ();
2302}
2303
2304void
104c1213
JM
2305set_gdbarch_read_fp (struct gdbarch *gdbarch,
2306 gdbarch_read_fp_ftype read_fp)
0f71a2f6
JM
2307{
2308 gdbarch->read_fp = read_fp;
2309}
2310
2311void
2312gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
2313{
2314 if (gdbarch->write_fp == 0)
96baa820 2315 internal_error ("gdbarch: gdbarch_write_fp invalid");
0f71a2f6 2316 if (gdbarch_debug >= 2)
0f71a2f6
JM
2317 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
2318 gdbarch->write_fp (val);
2319}
2320
2321void
104c1213
JM
2322set_gdbarch_write_fp (struct gdbarch *gdbarch,
2323 gdbarch_write_fp_ftype write_fp)
0f71a2f6
JM
2324{
2325 gdbarch->write_fp = write_fp;
2326}
2327
2328CORE_ADDR
2329gdbarch_read_sp (struct gdbarch *gdbarch)
2330{
2331 if (gdbarch->read_sp == 0)
96baa820 2332 internal_error ("gdbarch: gdbarch_read_sp invalid");
0f71a2f6 2333 if (gdbarch_debug >= 2)
0f71a2f6
JM
2334 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2335 return gdbarch->read_sp ();
2336}
2337
2338void
104c1213
JM
2339set_gdbarch_read_sp (struct gdbarch *gdbarch,
2340 gdbarch_read_sp_ftype read_sp)
0f71a2f6
JM
2341{
2342 gdbarch->read_sp = read_sp;
2343}
2344
2345void
2346gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2347{
2348 if (gdbarch->write_sp == 0)
96baa820 2349 internal_error ("gdbarch: gdbarch_write_sp invalid");
0f71a2f6 2350 if (gdbarch_debug >= 2)
0f71a2f6
JM
2351 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2352 gdbarch->write_sp (val);
2353}
2354
2355void
104c1213
JM
2356set_gdbarch_write_sp (struct gdbarch *gdbarch,
2357 gdbarch_write_sp_ftype write_sp)
0f71a2f6
JM
2358{
2359 gdbarch->write_sp = write_sp;
2360}
2361
2362int
104c1213 2363gdbarch_num_regs (struct gdbarch *gdbarch)
0f71a2f6
JM
2364{
2365 if (gdbarch->num_regs == -1)
96baa820 2366 internal_error ("gdbarch: gdbarch_num_regs invalid");
0f71a2f6 2367 if (gdbarch_debug >= 2)
0f71a2f6
JM
2368 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2369 return gdbarch->num_regs;
2370}
2371
2372void
104c1213
JM
2373set_gdbarch_num_regs (struct gdbarch *gdbarch,
2374 int num_regs)
0f71a2f6
JM
2375{
2376 gdbarch->num_regs = num_regs;
2377}
2378
0aba1244
EZ
2379int
2380gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2381{
2382 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2383 if (gdbarch_debug >= 2)
2384 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2385 return gdbarch->num_pseudo_regs;
2386}
2387
2388void
2389set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2390 int num_pseudo_regs)
2391{
2392 gdbarch->num_pseudo_regs = num_pseudo_regs;
2393}
2394
0f71a2f6 2395int
104c1213 2396gdbarch_sp_regnum (struct gdbarch *gdbarch)
0f71a2f6
JM
2397{
2398 if (gdbarch->sp_regnum == -1)
96baa820 2399 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
0f71a2f6 2400 if (gdbarch_debug >= 2)
0f71a2f6
JM
2401 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2402 return gdbarch->sp_regnum;
2403}
2404
2405void
104c1213
JM
2406set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2407 int sp_regnum)
0f71a2f6
JM
2408{
2409 gdbarch->sp_regnum = sp_regnum;
2410}
2411
2412int
104c1213 2413gdbarch_fp_regnum (struct gdbarch *gdbarch)
0f71a2f6
JM
2414{
2415 if (gdbarch->fp_regnum == -1)
96baa820 2416 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
0f71a2f6 2417 if (gdbarch_debug >= 2)
0f71a2f6
JM
2418 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2419 return gdbarch->fp_regnum;
2420}
2421
2422void
104c1213
JM
2423set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2424 int fp_regnum)
0f71a2f6
JM
2425{
2426 gdbarch->fp_regnum = fp_regnum;
2427}
2428
2429int
104c1213 2430gdbarch_pc_regnum (struct gdbarch *gdbarch)
0f71a2f6
JM
2431{
2432 if (gdbarch->pc_regnum == -1)
96baa820 2433 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
0f71a2f6 2434 if (gdbarch_debug >= 2)
0f71a2f6
JM
2435 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2436 return gdbarch->pc_regnum;
2437}
2438
2439void
104c1213
JM
2440set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2441 int pc_regnum)
0f71a2f6
JM
2442{
2443 gdbarch->pc_regnum = pc_regnum;
2444}
2445
60054393
MS
2446int
2447gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2448{
2449 /* Skip verify of fp0_regnum, invalid_p == 0 */
2450 if (gdbarch_debug >= 2)
2451 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2452 return gdbarch->fp0_regnum;
2453}
2454
2455void
2456set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2457 int fp0_regnum)
2458{
2459 gdbarch->fp0_regnum = fp0_regnum;
2460}
2461
03863182
AC
2462int
2463gdbarch_npc_regnum (struct gdbarch *gdbarch)
2464{
2465 /* Skip verify of npc_regnum, invalid_p == 0 */
2466 if (gdbarch_debug >= 2)
2467 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2468 return gdbarch->npc_regnum;
2469}
2470
2471void
2472set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2473 int npc_regnum)
2474{
2475 gdbarch->npc_regnum = npc_regnum;
2476}
2477
2478int
2479gdbarch_nnpc_regnum (struct gdbarch *gdbarch)
2480{
2481 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2482 if (gdbarch_debug >= 2)
2483 fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n");
2484 return gdbarch->nnpc_regnum;
2485}
2486
2487void
2488set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch,
2489 int nnpc_regnum)
2490{
2491 gdbarch->nnpc_regnum = nnpc_regnum;
2492}
2493
88c72b7d
AC
2494int
2495gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2496{
2497 if (gdbarch->stab_reg_to_regnum == 0)
2498 internal_error ("gdbarch: gdbarch_stab_reg_to_regnum invalid");
2499 if (gdbarch_debug >= 2)
2500 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2501 return gdbarch->stab_reg_to_regnum (stab_regnr);
2502}
2503
2504void
2505set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2506 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2507{
2508 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2509}
2510
2511int
2512gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2513{
2514 if (gdbarch->ecoff_reg_to_regnum == 0)
2515 internal_error ("gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2516 if (gdbarch_debug >= 2)
2517 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2518 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2519}
2520
2521void
2522set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2523 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2524{
2525 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2526}
2527
2528int
2529gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2530{
2531 if (gdbarch->dwarf_reg_to_regnum == 0)
2532 internal_error ("gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2533 if (gdbarch_debug >= 2)
2534 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2535 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2536}
2537
2538void
2539set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2540 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2541{
2542 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2543}
2544
2545int
2546gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2547{
2548 if (gdbarch->sdb_reg_to_regnum == 0)
2549 internal_error ("gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2550 if (gdbarch_debug >= 2)
2551 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2552 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2553}
2554
2555void
2556set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2557 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2558{
2559 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2560}
2561
2562int
2563gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2564{
2565 if (gdbarch->dwarf2_reg_to_regnum == 0)
2566 internal_error ("gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2567 if (gdbarch_debug >= 2)
2568 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2569 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2570}
2571
2572void
2573set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2574 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2575{
2576 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2577}
2578
0f71a2f6
JM
2579char *
2580gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2581{
7be570e7 2582 if (gdbarch->register_name == 0)
96baa820 2583 internal_error ("gdbarch: gdbarch_register_name invalid");
0f71a2f6 2584 if (gdbarch_debug >= 2)
0f71a2f6
JM
2585 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2586 return gdbarch->register_name (regnr);
2587}
2588
2589void
104c1213
JM
2590set_gdbarch_register_name (struct gdbarch *gdbarch,
2591 gdbarch_register_name_ftype register_name)
0f71a2f6
JM
2592{
2593 gdbarch->register_name = register_name;
2594}
2595
2596int
104c1213 2597gdbarch_register_size (struct gdbarch *gdbarch)
0f71a2f6
JM
2598{
2599 if (gdbarch->register_size == -1)
96baa820 2600 internal_error ("gdbarch: gdbarch_register_size invalid");
0f71a2f6 2601 if (gdbarch_debug >= 2)
0f71a2f6
JM
2602 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2603 return gdbarch->register_size;
2604}
2605
2606void
104c1213
JM
2607set_gdbarch_register_size (struct gdbarch *gdbarch,
2608 int register_size)
0f71a2f6
JM
2609{
2610 gdbarch->register_size = register_size;
2611}
2612
2613int
104c1213 2614gdbarch_register_bytes (struct gdbarch *gdbarch)
0f71a2f6
JM
2615{
2616 if (gdbarch->register_bytes == -1)
96baa820 2617 internal_error ("gdbarch: gdbarch_register_bytes invalid");
0f71a2f6 2618 if (gdbarch_debug >= 2)
0f71a2f6
JM
2619 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2620 return gdbarch->register_bytes;
2621}
2622
2623void
104c1213
JM
2624set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2625 int register_bytes)
0f71a2f6
JM
2626{
2627 gdbarch->register_bytes = register_bytes;
2628}
2629
2630int
2631gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2632{
2633 if (gdbarch->register_byte == 0)
96baa820 2634 internal_error ("gdbarch: gdbarch_register_byte invalid");
0f71a2f6 2635 if (gdbarch_debug >= 2)
0f71a2f6
JM
2636 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2637 return gdbarch->register_byte (reg_nr);
2638}
2639
2640void
104c1213
JM
2641set_gdbarch_register_byte (struct gdbarch *gdbarch,
2642 gdbarch_register_byte_ftype register_byte)
0f71a2f6
JM
2643{
2644 gdbarch->register_byte = register_byte;
2645}
2646
2647int
2648gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2649{
2650 if (gdbarch->register_raw_size == 0)
96baa820 2651 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
0f71a2f6 2652 if (gdbarch_debug >= 2)
0f71a2f6
JM
2653 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2654 return gdbarch->register_raw_size (reg_nr);
2655}
2656
2657void
104c1213
JM
2658set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2659 gdbarch_register_raw_size_ftype register_raw_size)
0f71a2f6
JM
2660{
2661 gdbarch->register_raw_size = register_raw_size;
2662}
2663
2664int
104c1213 2665gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
0f71a2f6
JM
2666{
2667 if (gdbarch->max_register_raw_size == -1)
96baa820 2668 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
0f71a2f6 2669 if (gdbarch_debug >= 2)
0f71a2f6
JM
2670 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2671 return gdbarch->max_register_raw_size;
2672}
2673
2674void
104c1213
JM
2675set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2676 int max_register_raw_size)
0f71a2f6
JM
2677{
2678 gdbarch->max_register_raw_size = max_register_raw_size;
2679}
2680
2681int
2682gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2683{
2684 if (gdbarch->register_virtual_size == 0)
96baa820 2685 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
0f71a2f6 2686 if (gdbarch_debug >= 2)
0f71a2f6
JM
2687 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2688 return gdbarch->register_virtual_size (reg_nr);
2689}
2690
2691void
104c1213
JM
2692set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2693 gdbarch_register_virtual_size_ftype register_virtual_size)
0f71a2f6
JM
2694{
2695 gdbarch->register_virtual_size = register_virtual_size;
2696}
2697
2698int
104c1213 2699gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
0f71a2f6
JM
2700{
2701 if (gdbarch->max_register_virtual_size == -1)
96baa820 2702 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
0f71a2f6 2703 if (gdbarch_debug >= 2)
0f71a2f6
JM
2704 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2705 return gdbarch->max_register_virtual_size;
2706}
2707
2708void
104c1213
JM
2709set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2710 int max_register_virtual_size)
0f71a2f6
JM
2711{
2712 gdbarch->max_register_virtual_size = max_register_virtual_size;
2713}
2714
2715struct type *
2716gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2717{
2718 if (gdbarch->register_virtual_type == 0)
96baa820 2719 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
0f71a2f6 2720 if (gdbarch_debug >= 2)
0f71a2f6
JM
2721 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2722 return gdbarch->register_virtual_type (reg_nr);
2723}
2724
2725void
104c1213
JM
2726set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2727 gdbarch_register_virtual_type_ftype register_virtual_type)
0f71a2f6
JM
2728{
2729 gdbarch->register_virtual_type = register_virtual_type;
2730}
2731
666e11c5
EZ
2732void
2733gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2734{
2735 if (gdbarch->do_registers_info == 0)
2736 internal_error ("gdbarch: gdbarch_do_registers_info invalid");
2737 if (gdbarch_debug >= 2)
2738 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
2739 gdbarch->do_registers_info (reg_nr, fpregs);
2740}
2741
2742void
2743set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
2744 gdbarch_do_registers_info_ftype do_registers_info)
2745{
2746 gdbarch->do_registers_info = do_registers_info;
2747}
2748
7c7651b2
AC
2749int
2750gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2751{
2752 if (gdbarch->register_sim_regno == 0)
2753 internal_error ("gdbarch: gdbarch_register_sim_regno invalid");
2754 if (gdbarch_debug >= 2)
2755 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2756 return gdbarch->register_sim_regno (reg_nr);
2757}
2758
2759void
2760set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2761 gdbarch_register_sim_regno_ftype register_sim_regno)
2762{
2763 gdbarch->register_sim_regno = register_sim_regno;
2764}
2765
0f71a2f6 2766int
104c1213 2767gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
0f71a2f6
JM
2768{
2769 if (gdbarch->use_generic_dummy_frames == -1)
96baa820 2770 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
0f71a2f6 2771 if (gdbarch_debug >= 2)
0f71a2f6
JM
2772 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
2773 return gdbarch->use_generic_dummy_frames;
2774}
2775
2776void
104c1213
JM
2777set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
2778 int use_generic_dummy_frames)
0f71a2f6
JM
2779{
2780 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
2781}
2782
2783int
104c1213 2784gdbarch_call_dummy_location (struct gdbarch *gdbarch)
0f71a2f6
JM
2785{
2786 if (gdbarch->call_dummy_location == 0)
96baa820 2787 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
0f71a2f6 2788 if (gdbarch_debug >= 2)
0f71a2f6
JM
2789 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2790 return gdbarch->call_dummy_location;
2791}
2792
2793void
104c1213
JM
2794set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2795 int call_dummy_location)
0f71a2f6
JM
2796{
2797 gdbarch->call_dummy_location = call_dummy_location;
2798}
2799
2800CORE_ADDR
2801gdbarch_call_dummy_address (struct gdbarch *gdbarch)
2802{
2803 if (gdbarch->call_dummy_address == 0)
96baa820 2804 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
0f71a2f6 2805 if (gdbarch_debug >= 2)
0f71a2f6
JM
2806 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
2807 return gdbarch->call_dummy_address ();
2808}
2809
2810void
104c1213
JM
2811set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
2812 gdbarch_call_dummy_address_ftype call_dummy_address)
0f71a2f6
JM
2813{
2814 gdbarch->call_dummy_address = call_dummy_address;
2815}
2816
2817CORE_ADDR
104c1213 2818gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
0f71a2f6
JM
2819{
2820 if (gdbarch->call_dummy_start_offset == -1)
96baa820 2821 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
0f71a2f6 2822 if (gdbarch_debug >= 2)
0f71a2f6
JM
2823 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
2824 return gdbarch->call_dummy_start_offset;
2825}
2826
2827void
104c1213
JM
2828set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
2829 CORE_ADDR call_dummy_start_offset)
0f71a2f6
JM
2830{
2831 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
2832}
2833
2834CORE_ADDR
104c1213 2835gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
0f71a2f6
JM
2836{
2837 if (gdbarch->call_dummy_breakpoint_offset == -1)
96baa820 2838 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
0f71a2f6 2839 if (gdbarch_debug >= 2)
0f71a2f6
JM
2840 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
2841 return gdbarch->call_dummy_breakpoint_offset;
2842}
2843
2844void
104c1213
JM
2845set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
2846 CORE_ADDR call_dummy_breakpoint_offset)
0f71a2f6
JM
2847{
2848 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
2849}
2850
2851int
104c1213 2852gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
0f71a2f6
JM
2853{
2854 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
96baa820 2855 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
0f71a2f6 2856 if (gdbarch_debug >= 2)
0f71a2f6
JM
2857 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
2858 return gdbarch->call_dummy_breakpoint_offset_p;
2859}
2860
2861void
104c1213
JM
2862set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
2863 int call_dummy_breakpoint_offset_p)
0f71a2f6
JM
2864{
2865 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
2866}
2867
2868int
104c1213 2869gdbarch_call_dummy_length (struct gdbarch *gdbarch)
0f71a2f6
JM
2870{
2871 if (gdbarch->call_dummy_length == -1)
96baa820 2872 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
0f71a2f6 2873 if (gdbarch_debug >= 2)
0f71a2f6
JM
2874 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
2875 return gdbarch->call_dummy_length;
2876}
2877
2878void
104c1213
JM
2879set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
2880 int call_dummy_length)
0f71a2f6
JM
2881{
2882 gdbarch->call_dummy_length = call_dummy_length;
2883}
2884
2885int
2886gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
2887{
2888 if (gdbarch->pc_in_call_dummy == 0)
96baa820 2889 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
0f71a2f6 2890 if (gdbarch_debug >= 2)
0f71a2f6
JM
2891 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
2892 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
2893}
2894
2895void
104c1213
JM
2896set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
2897 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
0f71a2f6
JM
2898{
2899 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
2900}
2901
2902int
104c1213 2903gdbarch_call_dummy_p (struct gdbarch *gdbarch)
0f71a2f6
JM
2904{
2905 if (gdbarch->call_dummy_p == -1)
96baa820 2906 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
0f71a2f6 2907 if (gdbarch_debug >= 2)
0f71a2f6
JM
2908 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
2909 return gdbarch->call_dummy_p;
2910}
2911
2912void
104c1213
JM
2913set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
2914 int call_dummy_p)
0f71a2f6
JM
2915{
2916 gdbarch->call_dummy_p = call_dummy_p;
2917}
2918
2919LONGEST *
104c1213 2920gdbarch_call_dummy_words (struct gdbarch *gdbarch)
0f71a2f6 2921{
c0e8c252 2922 /* Skip verify of call_dummy_words, invalid_p == 0 */
0f71a2f6 2923 if (gdbarch_debug >= 2)
0f71a2f6
JM
2924 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
2925 return gdbarch->call_dummy_words;
2926}
2927
2928void
104c1213
JM
2929set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
2930 LONGEST * call_dummy_words)
0f71a2f6
JM
2931{
2932 gdbarch->call_dummy_words = call_dummy_words;
2933}
2934
2935int
104c1213 2936gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
0f71a2f6 2937{
c0e8c252 2938 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
0f71a2f6 2939 if (gdbarch_debug >= 2)
0f71a2f6
JM
2940 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
2941 return gdbarch->sizeof_call_dummy_words;
2942}
2943
2944void
104c1213
JM
2945set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
2946 int sizeof_call_dummy_words)
0f71a2f6
JM
2947{
2948 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
2949}
2950
2951int
104c1213 2952gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
0f71a2f6
JM
2953{
2954 if (gdbarch->call_dummy_stack_adjust_p == -1)
96baa820 2955 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
0f71a2f6 2956 if (gdbarch_debug >= 2)
0f71a2f6
JM
2957 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
2958 return gdbarch->call_dummy_stack_adjust_p;
2959}
2960
2961void
104c1213
JM
2962set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
2963 int call_dummy_stack_adjust_p)
0f71a2f6
JM
2964{
2965 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
2966}
2967
2968int
104c1213 2969gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
0f71a2f6
JM
2970{
2971 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
96baa820 2972 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
0f71a2f6 2973 if (gdbarch_debug >= 2)
0f71a2f6
JM
2974 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
2975 return gdbarch->call_dummy_stack_adjust;
2976}
2977
2978void
104c1213
JM
2979set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
2980 int call_dummy_stack_adjust)
0f71a2f6
JM
2981{
2982 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
2983}
2984
2985void
2986gdbarch_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)
2987{
2988 if (gdbarch->fix_call_dummy == 0)
96baa820 2989 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
0f71a2f6 2990 if (gdbarch_debug >= 2)
0f71a2f6
JM
2991 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
2992 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
2993}
2994
2995void
104c1213
JM
2996set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
2997 gdbarch_fix_call_dummy_ftype fix_call_dummy)
0f71a2f6
JM
2998{
2999 gdbarch->fix_call_dummy = fix_call_dummy;
3000}
3001
3002int
104c1213 3003gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
0f71a2f6
JM
3004{
3005 if (gdbarch_debug >= 2)
0f71a2f6
JM
3006 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3007 return gdbarch->believe_pcc_promotion;
3008}
3009
3010void
104c1213
JM
3011set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3012 int believe_pcc_promotion)
0f71a2f6
JM
3013{
3014 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3015}
3016
3017int
104c1213 3018gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
0f71a2f6
JM
3019{
3020 if (gdbarch_debug >= 2)
0f71a2f6
JM
3021 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3022 return gdbarch->believe_pcc_promotion_type;
3023}
3024
3025void
104c1213
JM
3026set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3027 int believe_pcc_promotion_type)
0f71a2f6
JM
3028{
3029 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3030}
3031
b9a8e3bf
JB
3032int
3033gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3034{
3035 if (gdbarch->coerce_float_to_double == 0)
3036 internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
3037 if (gdbarch_debug >= 2)
b9a8e3bf
JB
3038 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3039 return gdbarch->coerce_float_to_double (formal, actual);
3040}
3041
3042void
3043set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3044 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3045{
3046 gdbarch->coerce_float_to_double = coerce_float_to_double;
3047}
3048
0f71a2f6 3049void
adf40b2e 3050gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
0f71a2f6
JM
3051{
3052 if (gdbarch->get_saved_register == 0)
96baa820 3053 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
0f71a2f6 3054 if (gdbarch_debug >= 2)
0f71a2f6
JM
3055 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3056 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3057}
3058
3059void
104c1213
JM
3060set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3061 gdbarch_get_saved_register_ftype get_saved_register)
0f71a2f6
JM
3062{
3063 gdbarch->get_saved_register = get_saved_register;
3064}
3065
3066int
3067gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3068{
3069 if (gdbarch->register_convertible == 0)
96baa820 3070 internal_error ("gdbarch: gdbarch_register_convertible invalid");
0f71a2f6 3071 if (gdbarch_debug >= 2)
0f71a2f6
JM
3072 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3073 return gdbarch->register_convertible (nr);
3074}
3075
3076void
104c1213
JM
3077set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3078 gdbarch_register_convertible_ftype register_convertible)
0f71a2f6
JM
3079{
3080 gdbarch->register_convertible = register_convertible;
3081}
3082
3083void
3084gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3085{
3086 if (gdbarch->register_convert_to_virtual == 0)
96baa820 3087 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
0f71a2f6 3088 if (gdbarch_debug >= 2)
0f71a2f6
JM
3089 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3090 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3091}
3092
3093void
104c1213
JM
3094set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3095 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
0f71a2f6
JM
3096{
3097 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3098}
3099
3100void
3101gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3102{
3103 if (gdbarch->register_convert_to_raw == 0)
96baa820 3104 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
0f71a2f6 3105 if (gdbarch_debug >= 2)
0f71a2f6
JM
3106 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3107 gdbarch->register_convert_to_raw (type, regnum, from, to);
3108}
3109
3110void
104c1213
JM
3111set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3112 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
0f71a2f6
JM
3113{
3114 gdbarch->register_convert_to_raw = register_convert_to_raw;
3115}
3116
7f1b2585
EZ
3117void
3118gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
3119{
3120 if (gdbarch->fetch_pseudo_register == 0)
3121 internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid");
3122 if (gdbarch_debug >= 2)
3123 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
3124 gdbarch->fetch_pseudo_register (regnum);
3125}
3126
3127void
3128set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
3129 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
3130{
3131 gdbarch->fetch_pseudo_register = fetch_pseudo_register;
3132}
3133
3134void
3135gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
3136{
3137 if (gdbarch->store_pseudo_register == 0)
3138 internal_error ("gdbarch: gdbarch_store_pseudo_register invalid");
3139 if (gdbarch_debug >= 2)
3140 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
3141 gdbarch->store_pseudo_register (regnum);
3142}
3143
3144void
3145set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
3146 gdbarch_store_pseudo_register_ftype store_pseudo_register)
3147{
3148 gdbarch->store_pseudo_register = store_pseudo_register;
3149}
3150
4478b372 3151CORE_ADDR
ac2e2ef7 3152gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4478b372
JB
3153{
3154 if (gdbarch->pointer_to_address == 0)
3155 internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
3156 if (gdbarch_debug >= 2)
3157 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3158 return gdbarch->pointer_to_address (type, buf);
3159}
3160
3161void
3162set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3163 gdbarch_pointer_to_address_ftype pointer_to_address)
3164{
3165 gdbarch->pointer_to_address = pointer_to_address;
3166}
3167
3168void
ac2e2ef7 3169gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4478b372
JB
3170{
3171 if (gdbarch->address_to_pointer == 0)
3172 internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
3173 if (gdbarch_debug >= 2)
3174 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3175 gdbarch->address_to_pointer (type, buf, addr);
3176}
3177
3178void
3179set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3180 gdbarch_address_to_pointer_ftype address_to_pointer)
3181{
3182 gdbarch->address_to_pointer = address_to_pointer;
3183}
3184
71a9f22e
JB
3185int
3186gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3187{
71a9f22e
JB
3188 if (gdbarch->return_value_on_stack == 0)
3189 internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
3190 if (gdbarch_debug >= 2)
3191 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3192 return gdbarch->return_value_on_stack (type);
3193}
3194
3195void
3196set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3197 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3198{
3199 gdbarch->return_value_on_stack = return_value_on_stack;
3200}
3201
0f71a2f6
JM
3202void
3203gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3204{
3205 if (gdbarch->extract_return_value == 0)
96baa820 3206 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
0f71a2f6 3207 if (gdbarch_debug >= 2)
0f71a2f6
JM
3208 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3209 gdbarch->extract_return_value (type, regbuf, valbuf);
3210}
3211
3212void
104c1213
JM
3213set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3214 gdbarch_extract_return_value_ftype extract_return_value)
0f71a2f6
JM
3215{
3216 gdbarch->extract_return_value = extract_return_value;
3217}
3218
3219CORE_ADDR
3220gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3221{
3222 if (gdbarch->push_arguments == 0)
96baa820 3223 internal_error ("gdbarch: gdbarch_push_arguments invalid");
0f71a2f6 3224 if (gdbarch_debug >= 2)
0f71a2f6
JM
3225 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3226 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3227}
3228
3229void
104c1213
JM
3230set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3231 gdbarch_push_arguments_ftype push_arguments)
0f71a2f6
JM
3232{
3233 gdbarch->push_arguments = push_arguments;
3234}
3235
3236void
3237gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3238{
3239 if (gdbarch->push_dummy_frame == 0)
96baa820 3240 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
0f71a2f6 3241 if (gdbarch_debug >= 2)
0f71a2f6
JM
3242 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3243 gdbarch->push_dummy_frame ();
3244}
3245
3246void
104c1213
JM
3247set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3248 gdbarch_push_dummy_frame_ftype push_dummy_frame)
0f71a2f6
JM
3249{
3250 gdbarch->push_dummy_frame = push_dummy_frame;
3251}
3252
3253CORE_ADDR
3254gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3255{
3256 if (gdbarch->push_return_address == 0)
96baa820 3257 internal_error ("gdbarch: gdbarch_push_return_address invalid");
0f71a2f6 3258 if (gdbarch_debug >= 2)
0f71a2f6
JM
3259 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3260 return gdbarch->push_return_address (pc, sp);
3261}
3262
3263void
104c1213
JM
3264set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3265 gdbarch_push_return_address_ftype push_return_address)
0f71a2f6
JM
3266{
3267 gdbarch->push_return_address = push_return_address;
3268}
3269
3270void
3271gdbarch_pop_frame (struct gdbarch *gdbarch)
3272{
3273 if (gdbarch->pop_frame == 0)
96baa820 3274 internal_error ("gdbarch: gdbarch_pop_frame invalid");
0f71a2f6 3275 if (gdbarch_debug >= 2)
0f71a2f6
JM
3276 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3277 gdbarch->pop_frame ();
3278}
3279
3280void
104c1213
JM
3281set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3282 gdbarch_pop_frame_ftype pop_frame)
0f71a2f6
JM
3283{
3284 gdbarch->pop_frame = pop_frame;
3285}
3286
3287CORE_ADDR
3288gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
3289{
3290 if (gdbarch->d10v_make_daddr == 0)
96baa820 3291 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
0f71a2f6 3292 if (gdbarch_debug >= 2)
0f71a2f6
JM
3293 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
3294 return gdbarch->d10v_make_daddr (x);
3295}
3296
3297void
104c1213
JM
3298set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch,
3299 gdbarch_d10v_make_daddr_ftype d10v_make_daddr)
0f71a2f6
JM
3300{
3301 gdbarch->d10v_make_daddr = d10v_make_daddr;
3302}
3303
3304CORE_ADDR
3305gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
3306{
3307 if (gdbarch->d10v_make_iaddr == 0)
96baa820 3308 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
0f71a2f6 3309 if (gdbarch_debug >= 2)
0f71a2f6
JM
3310 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
3311 return gdbarch->d10v_make_iaddr (x);
3312}
3313
3314void
104c1213
JM
3315set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch,
3316 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr)
0f71a2f6
JM
3317{
3318 gdbarch->d10v_make_iaddr = d10v_make_iaddr;
3319}
3320
3321int
3322gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3323{
3324 if (gdbarch->d10v_daddr_p == 0)
96baa820 3325 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
0f71a2f6 3326 if (gdbarch_debug >= 2)
0f71a2f6
JM
3327 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
3328 return gdbarch->d10v_daddr_p (x);
3329}
3330
3331void
104c1213
JM
3332set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch,
3333 gdbarch_d10v_daddr_p_ftype d10v_daddr_p)
0f71a2f6
JM
3334{
3335 gdbarch->d10v_daddr_p = d10v_daddr_p;
3336}
3337
3338int
3339gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3340{
3341 if (gdbarch->d10v_iaddr_p == 0)
96baa820 3342 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
0f71a2f6 3343 if (gdbarch_debug >= 2)
0f71a2f6
JM
3344 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
3345 return gdbarch->d10v_iaddr_p (x);
3346}
3347
3348void
104c1213
JM
3349set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch,
3350 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p)
0f71a2f6
JM
3351{
3352 gdbarch->d10v_iaddr_p = d10v_iaddr_p;
3353}
3354
3355CORE_ADDR
3356gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3357{
3358 if (gdbarch->d10v_convert_daddr_to_raw == 0)
96baa820 3359 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
0f71a2f6 3360 if (gdbarch_debug >= 2)
0f71a2f6
JM
3361 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
3362 return gdbarch->d10v_convert_daddr_to_raw (x);
3363}
3364
3365void
104c1213
JM
3366set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch,
3367 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw)
0f71a2f6
JM
3368{
3369 gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
3370}
3371
3372CORE_ADDR
3373gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3374{
3375 if (gdbarch->d10v_convert_iaddr_to_raw == 0)
96baa820 3376 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
0f71a2f6 3377 if (gdbarch_debug >= 2)
0f71a2f6
JM
3378 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3379 return gdbarch->d10v_convert_iaddr_to_raw (x);
3380}
3381
3382void
104c1213
JM
3383set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch,
3384 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw)
0f71a2f6
JM
3385{
3386 gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
3387}
3388
3389void
3390gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3391{
3392 if (gdbarch->store_struct_return == 0)
96baa820 3393 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
0f71a2f6 3394 if (gdbarch_debug >= 2)
0f71a2f6
JM
3395 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3396 gdbarch->store_struct_return (addr, sp);
3397}
3398
3399void
104c1213
JM
3400set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3401 gdbarch_store_struct_return_ftype store_struct_return)
0f71a2f6
JM
3402{
3403 gdbarch->store_struct_return = store_struct_return;
3404}
3405
3406void
3407gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3408{
3409 if (gdbarch->store_return_value == 0)
96baa820 3410 internal_error ("gdbarch: gdbarch_store_return_value invalid");
0f71a2f6 3411 if (gdbarch_debug >= 2)
0f71a2f6
JM
3412 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3413 gdbarch->store_return_value (type, valbuf);
3414}
3415
3416void
104c1213
JM
3417set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3418 gdbarch_store_return_value_ftype store_return_value)
0f71a2f6
JM
3419{
3420 gdbarch->store_return_value = store_return_value;
3421}
3422
3423CORE_ADDR
3424gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3425{
3426 if (gdbarch->extract_struct_value_address == 0)
96baa820 3427 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
0f71a2f6 3428 if (gdbarch_debug >= 2)
0f71a2f6
JM
3429 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
3430 return gdbarch->extract_struct_value_address (regbuf);
3431}
3432
3433void
104c1213
JM
3434set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
3435 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
0f71a2f6
JM
3436{
3437 gdbarch->extract_struct_value_address = extract_struct_value_address;
3438}
3439
3440int
3441gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3442{
3443 if (gdbarch->use_struct_convention == 0)
96baa820 3444 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
0f71a2f6 3445 if (gdbarch_debug >= 2)
0f71a2f6
JM
3446 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3447 return gdbarch->use_struct_convention (gcc_p, value_type);
3448}
3449
3450void
104c1213
JM
3451set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3452 gdbarch_use_struct_convention_ftype use_struct_convention)
0f71a2f6
JM
3453{
3454 gdbarch->use_struct_convention = use_struct_convention;
3455}
3456
3457void
3458gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3459{
3460 if (gdbarch->frame_init_saved_regs == 0)
96baa820 3461 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
0f71a2f6 3462 if (gdbarch_debug >= 2)
0f71a2f6
JM
3463 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3464 gdbarch->frame_init_saved_regs (frame);
3465}
3466
3467void
104c1213
JM
3468set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3469 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
0f71a2f6
JM
3470{
3471 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3472}
3473
3474void
3475gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3476{
3477 if (gdbarch->init_extra_frame_info == 0)
96baa820 3478 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
0f71a2f6 3479 if (gdbarch_debug >= 2)
0f71a2f6
JM
3480 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3481 gdbarch->init_extra_frame_info (fromleaf, frame);
3482}
3483
3484void
104c1213
JM
3485set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3486 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
0f71a2f6
JM
3487{
3488 gdbarch->init_extra_frame_info = init_extra_frame_info;
3489}
3490
3491CORE_ADDR
3492gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3493{
3494 if (gdbarch->skip_prologue == 0)
96baa820 3495 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
0f71a2f6 3496 if (gdbarch_debug >= 2)
0f71a2f6
JM
3497 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3498 return gdbarch->skip_prologue (ip);
3499}
3500
3501void
104c1213
JM
3502set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3503 gdbarch_skip_prologue_ftype skip_prologue)
0f71a2f6
JM
3504{
3505 gdbarch->skip_prologue = skip_prologue;
3506}
3507
dad41f9a
AC
3508int
3509gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
3510{
dad41f9a
AC
3511 if (gdbarch->prologue_frameless_p == 0)
3512 internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
3513 if (gdbarch_debug >= 2)
3514 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
3515 return gdbarch->prologue_frameless_p (ip);
3516}
3517
3518void
3519set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
3520 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
3521{
3522 gdbarch->prologue_frameless_p = prologue_frameless_p;
3523}
3524
0f71a2f6
JM
3525int
3526gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3527{
3528 if (gdbarch->inner_than == 0)
96baa820 3529 internal_error ("gdbarch: gdbarch_inner_than invalid");
0f71a2f6 3530 if (gdbarch_debug >= 2)
0f71a2f6
JM
3531 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3532 return gdbarch->inner_than (lhs, rhs);
3533}
3534
3535void
104c1213
JM
3536set_gdbarch_inner_than (struct gdbarch *gdbarch,
3537 gdbarch_inner_than_ftype inner_than)
0f71a2f6
JM
3538{
3539 gdbarch->inner_than = inner_than;
3540}
3541
3542unsigned char *
adf40b2e 3543gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
0f71a2f6
JM
3544{
3545 if (gdbarch->breakpoint_from_pc == 0)
96baa820 3546 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
0f71a2f6 3547 if (gdbarch_debug >= 2)
0f71a2f6
JM
3548 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3549 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3550}
3551
3552void
104c1213
JM
3553set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3554 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
0f71a2f6
JM
3555{
3556 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3557}
3558
917317f4
JM
3559int
3560gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3561{
3562 if (gdbarch->memory_insert_breakpoint == 0)
3563 internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
3564 if (gdbarch_debug >= 2)
917317f4
JM
3565 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3566 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3567}
3568
3569void
3570set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3571 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3572{
3573 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3574}
3575
3576int
3577gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3578{
3579 if (gdbarch->memory_remove_breakpoint == 0)
3580 internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
3581 if (gdbarch_debug >= 2)
917317f4
JM
3582 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3583 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3584}
3585
3586void
3587set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3588 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3589{
3590 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3591}
3592
0f71a2f6 3593CORE_ADDR
104c1213 3594gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
0f71a2f6
JM
3595{
3596 if (gdbarch->decr_pc_after_break == -1)
96baa820 3597 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
0f71a2f6 3598 if (gdbarch_debug >= 2)
0f71a2f6
JM
3599 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3600 return gdbarch->decr_pc_after_break;
3601}
3602
3603void
104c1213
JM
3604set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3605 CORE_ADDR decr_pc_after_break)
0f71a2f6
JM
3606{
3607 gdbarch->decr_pc_after_break = decr_pc_after_break;
3608}
3609
3610CORE_ADDR
104c1213 3611gdbarch_function_start_offset (struct gdbarch *gdbarch)
0f71a2f6
JM
3612{
3613 if (gdbarch->function_start_offset == -1)
96baa820 3614 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
0f71a2f6 3615 if (gdbarch_debug >= 2)
0f71a2f6
JM
3616 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3617 return gdbarch->function_start_offset;
3618}
3619
3620void
104c1213
JM
3621set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3622 CORE_ADDR function_start_offset)
0f71a2f6
JM
3623{
3624 gdbarch->function_start_offset = function_start_offset;
3625}
3626
3627void
adf40b2e 3628gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
0f71a2f6
JM
3629{
3630 if (gdbarch->remote_translate_xfer_address == 0)
96baa820 3631 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
0f71a2f6 3632 if (gdbarch_debug >= 2)
0f71a2f6
JM
3633 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3634 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
3635}
3636
3637void
104c1213
JM
3638set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3639 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
0f71a2f6
JM
3640{
3641 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3642}
3643
3644CORE_ADDR
104c1213 3645gdbarch_frame_args_skip (struct gdbarch *gdbarch)
0f71a2f6
JM
3646{
3647 if (gdbarch->frame_args_skip == -1)
96baa820 3648 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
0f71a2f6 3649 if (gdbarch_debug >= 2)
0f71a2f6
JM
3650 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3651 return gdbarch->frame_args_skip;
3652}
3653
3654void
104c1213
JM
3655set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3656 CORE_ADDR frame_args_skip)
0f71a2f6
JM
3657{
3658 gdbarch->frame_args_skip = frame_args_skip;
3659}
3660
3661int
3662gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3663{
3664 if (gdbarch->frameless_function_invocation == 0)
96baa820 3665 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
0f71a2f6 3666 if (gdbarch_debug >= 2)
0f71a2f6
JM
3667 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
3668 return gdbarch->frameless_function_invocation (fi);
3669}
3670
3671void
104c1213
JM
3672set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
3673 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
0f71a2f6
JM
3674{
3675 gdbarch->frameless_function_invocation = frameless_function_invocation;
3676}
3677
3678CORE_ADDR
3679gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3680{
3681 if (gdbarch->frame_chain == 0)
96baa820 3682 internal_error ("gdbarch: gdbarch_frame_chain invalid");
0f71a2f6 3683 if (gdbarch_debug >= 2)
0f71a2f6
JM
3684 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
3685 return gdbarch->frame_chain (frame);
3686}
3687
3688void
104c1213
JM
3689set_gdbarch_frame_chain (struct gdbarch *gdbarch,
3690 gdbarch_frame_chain_ftype frame_chain)
0f71a2f6
JM
3691{
3692 gdbarch->frame_chain = frame_chain;
3693}
3694
3695int
3696gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3697{
3698 if (gdbarch->frame_chain_valid == 0)
96baa820 3699 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
0f71a2f6 3700 if (gdbarch_debug >= 2)
0f71a2f6
JM
3701 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
3702 return gdbarch->frame_chain_valid (chain, thisframe);
3703}
3704
3705void
104c1213
JM
3706set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
3707 gdbarch_frame_chain_valid_ftype frame_chain_valid)
0f71a2f6
JM
3708{
3709 gdbarch->frame_chain_valid = frame_chain_valid;
3710}
3711
3712CORE_ADDR
3713gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3714{
3715 if (gdbarch->frame_saved_pc == 0)
96baa820 3716 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
0f71a2f6 3717 if (gdbarch_debug >= 2)
0f71a2f6
JM
3718 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
3719 return gdbarch->frame_saved_pc (fi);
3720}
3721
3722void
104c1213
JM
3723set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
3724 gdbarch_frame_saved_pc_ftype frame_saved_pc)
0f71a2f6
JM
3725{
3726 gdbarch->frame_saved_pc = frame_saved_pc;
3727}
3728
3729CORE_ADDR
3730gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3731{
3732 if (gdbarch->frame_args_address == 0)
96baa820 3733 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
0f71a2f6 3734 if (gdbarch_debug >= 2)
0f71a2f6
JM
3735 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
3736 return gdbarch->frame_args_address (fi);
3737}
3738
3739void
104c1213
JM
3740set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
3741 gdbarch_frame_args_address_ftype frame_args_address)
0f71a2f6
JM
3742{
3743 gdbarch->frame_args_address = frame_args_address;
3744}
3745
3746CORE_ADDR
3747gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3748{
3749 if (gdbarch->frame_locals_address == 0)
96baa820 3750 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
0f71a2f6 3751 if (gdbarch_debug >= 2)
0f71a2f6
JM
3752 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
3753 return gdbarch->frame_locals_address (fi);
3754}
3755
3756void
104c1213
JM
3757set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
3758 gdbarch_frame_locals_address_ftype frame_locals_address)
0f71a2f6
JM
3759{
3760 gdbarch->frame_locals_address = frame_locals_address;
3761}
3762
3763CORE_ADDR
3764gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3765{
3766 if (gdbarch->saved_pc_after_call == 0)
96baa820 3767 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
0f71a2f6 3768 if (gdbarch_debug >= 2)
0f71a2f6
JM
3769 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
3770 return gdbarch->saved_pc_after_call (frame);
3771}
3772
3773void
104c1213
JM
3774set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
3775 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
0f71a2f6
JM
3776{
3777 gdbarch->saved_pc_after_call = saved_pc_after_call;
3778}
3779
3780int
3781gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3782{
3783 if (gdbarch->frame_num_args == 0)
96baa820 3784 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
0f71a2f6 3785 if (gdbarch_debug >= 2)
0f71a2f6
JM
3786 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3787 return gdbarch->frame_num_args (frame);
3788}
3789
3790void
104c1213
JM
3791set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3792 gdbarch_frame_num_args_ftype frame_num_args)
0f71a2f6
JM
3793{
3794 gdbarch->frame_num_args = frame_num_args;
3795}
3796
2ada493a
AC
3797int
3798gdbarch_stack_align_p (struct gdbarch *gdbarch)
3799{
3800 return gdbarch->stack_align != 0;
3801}
3802
3803CORE_ADDR
3804gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3805{
3806 if (gdbarch->stack_align == 0)
3807 internal_error ("gdbarch: gdbarch_stack_align invalid");
3808 if (gdbarch_debug >= 2)
3809 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
3810 return gdbarch->stack_align (sp);
3811}
3812
3813void
3814set_gdbarch_stack_align (struct gdbarch *gdbarch,
3815 gdbarch_stack_align_ftype stack_align)
3816{
3817 gdbarch->stack_align = stack_align;
3818}
3819
1dd4193b
AC
3820int
3821gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
3822{
3823 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
3824 if (gdbarch_debug >= 2)
3825 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
3826 return gdbarch->extra_stack_alignment_needed;
3827}
3828
3829void
3830set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
3831 int extra_stack_alignment_needed)
3832{
3833 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
3834}
3835
d03e67c9
AC
3836int
3837gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3838{
3839 return gdbarch->reg_struct_has_addr != 0;
3840}
3841
3842int
3843gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3844{
3845 if (gdbarch->reg_struct_has_addr == 0)
3846 internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
3847 if (gdbarch_debug >= 2)
3848 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
3849 return gdbarch->reg_struct_has_addr (gcc_p, type);
3850}
3851
3852void
3853set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
3854 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
3855{
3856 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
3857}
3858
d1e3cf49
AC
3859int
3860gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3861{
3862 return gdbarch->save_dummy_frame_tos != 0;
3863}
3864
3865void
3866gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3867{
3868 if (gdbarch->save_dummy_frame_tos == 0)
3869 internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
3870 if (gdbarch_debug >= 2)
3871 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
3872 gdbarch->save_dummy_frame_tos (sp);
3873}
3874
3875void
3876set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
3877 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
3878{
3879 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
3880}
3881
f0d4cc9e
AC
3882const struct floatformat *
3883gdbarch_float_format (struct gdbarch *gdbarch)
3884{
3885 if (gdbarch_debug >= 2)
3886 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
3887 return gdbarch->float_format;
3888}
3889
3890void
3891set_gdbarch_float_format (struct gdbarch *gdbarch,
3892 const struct floatformat * float_format)
3893{
3894 gdbarch->float_format = float_format;
3895}
3896
3897const struct floatformat *
3898gdbarch_double_format (struct gdbarch *gdbarch)
3899{
3900 if (gdbarch_debug >= 2)
3901 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
3902 return gdbarch->double_format;
3903}
3904
3905void
3906set_gdbarch_double_format (struct gdbarch *gdbarch,
3907 const struct floatformat * double_format)
3908{
3909 gdbarch->double_format = double_format;
3910}
3911
3912const struct floatformat *
3913gdbarch_long_double_format (struct gdbarch *gdbarch)
3914{
3915 if (gdbarch_debug >= 2)
3916 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
3917 return gdbarch->long_double_format;
3918}
3919
3920void
3921set_gdbarch_long_double_format (struct gdbarch *gdbarch,
3922 const struct floatformat * long_double_format)
3923{
3924 gdbarch->long_double_format = long_double_format;
3925}
3926
f517ea4e
PS
3927CORE_ADDR
3928gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
3929{
3930 if (gdbarch->convert_from_func_ptr_addr == 0)
3931 internal_error ("gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
3932 if (gdbarch_debug >= 2)
3933 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3934 return gdbarch->convert_from_func_ptr_addr (addr);
3935}
3936
3937void
3938set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3939 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3940{
3941 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3942}
3943
0f71a2f6 3944
be5a57e1 3945/* Keep a registry of per-architecture data-pointers required by GDB
0f71a2f6
JM
3946 modules. */
3947
3948struct gdbarch_data
3949{
3950 int index;
3951};
3952
3953struct gdbarch_data_registration
adf40b2e
JM
3954{
3955 gdbarch_data_ftype *init;
3956 struct gdbarch_data *data;
3957 struct gdbarch_data_registration *next;
3958};
0f71a2f6 3959
be5a57e1 3960struct gdbarch_data_registry
adf40b2e
JM
3961{
3962 int nr;
3963 struct gdbarch_data_registration *registrations;
3964};
0f71a2f6 3965
be5a57e1 3966struct gdbarch_data_registry gdbarch_data_registry =
0f71a2f6
JM
3967{
3968 0, NULL,
3969};
3970
3971struct gdbarch_data *
104c1213 3972register_gdbarch_data (gdbarch_data_ftype *init)
0f71a2f6
JM
3973{
3974 struct gdbarch_data_registration **curr;
be5a57e1 3975 for (curr = &gdbarch_data_registry.registrations;
0f71a2f6
JM
3976 (*curr) != NULL;
3977 curr = &(*curr)->next);
3978 (*curr) = XMALLOC (struct gdbarch_data_registration);
3979 (*curr)->next = NULL;
3980 (*curr)->init = init;
3981 (*curr)->data = XMALLOC (struct gdbarch_data);
be5a57e1 3982 (*curr)->data->index = gdbarch_data_registry.nr++;
0f71a2f6
JM
3983 return (*curr)->data;
3984}
3985
3986
3987/* Walk through all the registered users initializing each in turn. */
3988
0f71a2f6 3989static void
104c1213 3990init_gdbarch_data (struct gdbarch *gdbarch)
0f71a2f6
JM
3991{
3992 struct gdbarch_data_registration *rego;
be5a57e1 3993 gdbarch->nr_data = gdbarch_data_registry.nr + 1;
adf40b2e 3994 gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
be5a57e1 3995 for (rego = gdbarch_data_registry.registrations;
0f71a2f6
JM
3996 rego != NULL;
3997 rego = rego->next)
3998 {
3999 if (rego->data->index < gdbarch->nr_data)
4000 gdbarch->data[rego->data->index] = rego->init ();
4001 }
4002}
4003
4004
4005/* Return the current value of the specified per-architecture
4006 data-pointer. */
4007
4008void *
7c7651b2 4009gdbarch_data (struct gdbarch_data *data)
0f71a2f6
JM
4010{
4011 if (data->index >= current_gdbarch->nr_data)
96baa820 4012 internal_error ("gdbarch_data: request for non-existant data.");
0f71a2f6
JM
4013 return current_gdbarch->data[data->index];
4014}
4015
4016
4017
be5a57e1 4018/* Keep a registry of swapped data required by GDB modules. */
0f71a2f6
JM
4019
4020struct gdbarch_swap
4021{
4022 void *swap;
4023 struct gdbarch_swap_registration *source;
4024 struct gdbarch_swap *next;
4025};
4026
4027struct gdbarch_swap_registration
adf40b2e
JM
4028{
4029 void *data;
4030 unsigned long sizeof_data;
4031 gdbarch_swap_ftype *init;
4032 struct gdbarch_swap_registration *next;
4033};
0f71a2f6 4034
be5a57e1 4035struct gdbarch_swap_registry
adf40b2e
JM
4036{
4037 int nr;
4038 struct gdbarch_swap_registration *registrations;
4039};
0f71a2f6 4040
be5a57e1 4041struct gdbarch_swap_registry gdbarch_swap_registry =
0f71a2f6
JM
4042{
4043 0, NULL,
4044};
4045
4046void
104c1213
JM
4047register_gdbarch_swap (void *data,
4048 unsigned long sizeof_data,
4049 gdbarch_swap_ftype *init)
0f71a2f6
JM
4050{
4051 struct gdbarch_swap_registration **rego;
be5a57e1 4052 for (rego = &gdbarch_swap_registry.registrations;
0f71a2f6
JM
4053 (*rego) != NULL;
4054 rego = &(*rego)->next);
4055 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4056 (*rego)->next = NULL;
4057 (*rego)->init = init;
4058 (*rego)->data = data;
4059 (*rego)->sizeof_data = sizeof_data;
4060}
4061
4062
0f71a2f6 4063static void
104c1213 4064init_gdbarch_swap (struct gdbarch *gdbarch)
0f71a2f6
JM
4065{
4066 struct gdbarch_swap_registration *rego;
4067 struct gdbarch_swap **curr = &gdbarch->swap;
be5a57e1 4068 for (rego = gdbarch_swap_registry.registrations;
0f71a2f6
JM
4069 rego != NULL;
4070 rego = rego->next)
4071 {
4072 if (rego->data != NULL)
4073 {
4074 (*curr) = XMALLOC (struct gdbarch_swap);
4075 (*curr)->source = rego;
4076 (*curr)->swap = xmalloc (rego->sizeof_data);
4077 (*curr)->next = NULL;
4078 memset (rego->data, 0, rego->sizeof_data);
4079 curr = &(*curr)->next;
4080 }
4081 if (rego->init != NULL)
4082 rego->init ();
4083 }
4084}
4085
0f71a2f6 4086static void
104c1213 4087swapout_gdbarch_swap (struct gdbarch *gdbarch)
0f71a2f6
JM
4088{
4089 struct gdbarch_swap *curr;
4090 for (curr = gdbarch->swap;
4091 curr != NULL;
4092 curr = curr->next)
4093 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4094}
4095
0f71a2f6 4096static void
104c1213 4097swapin_gdbarch_swap (struct gdbarch *gdbarch)
0f71a2f6
JM
4098{
4099 struct gdbarch_swap *curr;
4100 for (curr = gdbarch->swap;
4101 curr != NULL;
4102 curr = curr->next)
4103 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4104}
4105
4106
be5a57e1 4107/* Keep a registry of the architectures known by GDB. */
0f71a2f6 4108
4b9b3959 4109struct gdbarch_registration
0f71a2f6
JM
4110{
4111 enum bfd_architecture bfd_architecture;
4112 gdbarch_init_ftype *init;
4b9b3959 4113 gdbarch_dump_tdep_ftype *dump_tdep;
0f71a2f6 4114 struct gdbarch_list *arches;
4b9b3959 4115 struct gdbarch_registration *next;
0f71a2f6
JM
4116};
4117
be5a57e1 4118static struct gdbarch_registration *gdbarch_registry = NULL;
0f71a2f6 4119
b4a20239
AC
4120static void
4121append_name (const char ***buf, int *nr, const char *name)
4122{
4123 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4124 (*buf)[*nr] = name;
4125 *nr += 1;
4126}
4127
4128const char **
4129gdbarch_printable_names (void)
4130{
4131 if (GDB_MULTI_ARCH)
4132 {
4133 /* Accumulate a list of names based on the registed list of
4134 architectures. */
4135 enum bfd_architecture a;
4136 int nr_arches = 0;
4137 const char **arches = NULL;
4b9b3959 4138 struct gdbarch_registration *rego;
be5a57e1 4139 for (rego = gdbarch_registry;
b4a20239
AC
4140 rego != NULL;
4141 rego = rego->next)
4142 {
4143 const struct bfd_arch_info *ap;
4144 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4145 if (ap == NULL)
4146 internal_error ("gdbarch_architecture_names: multi-arch unknown");
4147 do
4148 {
4149 append_name (&arches, &nr_arches, ap->printable_name);
4150 ap = ap->next;
4151 }
4152 while (ap != NULL);
4153 }
4154 append_name (&arches, &nr_arches, NULL);
4155 return arches;
4156 }
4157 else
4158 /* Just return all the architectures that BFD knows. Assume that
4159 the legacy architecture framework supports them. */
4160 return bfd_arch_list ();
4161}
4162
4163
0f71a2f6 4164void
4b9b3959
AC
4165gdbarch_register (enum bfd_architecture bfd_architecture,
4166 gdbarch_init_ftype *init,
4167 gdbarch_dump_tdep_ftype *dump_tdep)
0f71a2f6 4168{
4b9b3959 4169 struct gdbarch_registration **curr;
0f71a2f6 4170 const struct bfd_arch_info *bfd_arch_info;
ec3d358c 4171 /* Check that BFD recognizes this architecture */
0f71a2f6
JM
4172 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4173 if (bfd_arch_info == NULL)
4174 {
96baa820 4175 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
0f71a2f6
JM
4176 }
4177 /* Check that we haven't seen this architecture before */
be5a57e1 4178 for (curr = &gdbarch_registry;
0f71a2f6
JM
4179 (*curr) != NULL;
4180 curr = &(*curr)->next)
4181 {
4182 if (bfd_architecture == (*curr)->bfd_architecture)
96baa820 4183 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
0f71a2f6
JM
4184 bfd_arch_info->printable_name);
4185 }
4186 /* log it */
4187 if (gdbarch_debug)
4188 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
4189 bfd_arch_info->printable_name,
4190 (long) init);
4191 /* Append it */
4b9b3959 4192 (*curr) = XMALLOC (struct gdbarch_registration);
0f71a2f6
JM
4193 (*curr)->bfd_architecture = bfd_architecture;
4194 (*curr)->init = init;
4b9b3959 4195 (*curr)->dump_tdep = dump_tdep;
0f71a2f6
JM
4196 (*curr)->arches = NULL;
4197 (*curr)->next = NULL;
8e1a459b
C
4198 /* When non- multi-arch, install whatever target dump routine we've
4199 been provided - hopefully that routine has been written correctly
4b9b3959
AC
4200 and works regardless of multi-arch. */
4201 if (!GDB_MULTI_ARCH && dump_tdep != NULL
4202 && startup_gdbarch.dump_tdep == NULL)
4203 startup_gdbarch.dump_tdep = dump_tdep;
4204}
4205
4206void
4207register_gdbarch_init (enum bfd_architecture bfd_architecture,
4208 gdbarch_init_ftype *init)
4209{
4210 gdbarch_register (bfd_architecture, init, NULL);
0f71a2f6 4211}
0f71a2f6
JM
4212
4213
4214/* Look for an architecture using gdbarch_info. Base search on only
4215 BFD_ARCH_INFO and BYTE_ORDER. */
4216
4217struct gdbarch_list *
104c1213
JM
4218gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4219 const struct gdbarch_info *info)
0f71a2f6
JM
4220{
4221 for (; arches != NULL; arches = arches->next)
4222 {
4223 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4224 continue;
4225 if (info->byte_order != arches->gdbarch->byte_order)
4226 continue;
4227 return arches;
4228 }
4229 return NULL;
4230}
4231
4232
4233/* Update the current architecture. Return ZERO if the update request
4234 failed. */
4235
4236int
16f33e29 4237gdbarch_update_p (struct gdbarch_info info)
0f71a2f6
JM
4238{
4239 struct gdbarch *new_gdbarch;
4240 struct gdbarch_list **list;
4b9b3959 4241 struct gdbarch_registration *rego;
0f71a2f6
JM
4242
4243 /* Fill in any missing bits. Most important is the bfd_architecture
4244 which is used to select the target architecture. */
4245 if (info.bfd_architecture == bfd_arch_unknown)
4246 {
4247 if (info.bfd_arch_info != NULL)
4248 info.bfd_architecture = info.bfd_arch_info->arch;
4249 else if (info.abfd != NULL)
4250 info.bfd_architecture = bfd_get_arch (info.abfd);
4251 /* FIXME - should query BFD for its default architecture. */
4252 else
4253 info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
4254 }
4255 if (info.bfd_arch_info == NULL)
4256 {
4257 if (target_architecture_auto && info.abfd != NULL)
4258 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
4259 else
4260 info.bfd_arch_info = current_gdbarch->bfd_arch_info;
4261 }
4262 if (info.byte_order == 0)
4263 {
4264 if (target_byte_order_auto && info.abfd != NULL)
4265 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
4266 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
4267 : 0);
4268 else
4269 info.byte_order = current_gdbarch->byte_order;
4270 /* FIXME - should query BFD for its default byte-order. */
4271 }
4272 /* A default for abfd? */
4273
4274 /* Find the target that knows about this architecture. */
be5a57e1 4275 for (rego = gdbarch_registry;
4b9b3959
AC
4276 rego != NULL;
4277 rego = rego->next)
4278 if (rego->bfd_architecture == info.bfd_architecture)
4279 break;
0f71a2f6
JM
4280 if (rego == NULL)
4281 {
4282 if (gdbarch_debug)
4283 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
4284 return 0;
4285 }
4286
4287 if (gdbarch_debug)
4288 {
4289 fprintf_unfiltered (gdb_stdlog,
4290 "gdbarch_update: info.bfd_architecture %d (%s)\n",
4291 info.bfd_architecture,
adf40b2e 4292 bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
0f71a2f6
JM
4293 fprintf_unfiltered (gdb_stdlog,
4294 "gdbarch_update: info.bfd_arch_info %s\n",
4295 (info.bfd_arch_info != NULL
4296 ? info.bfd_arch_info->printable_name
4297 : "(null)"));
4298 fprintf_unfiltered (gdb_stdlog,
4299 "gdbarch_update: info.byte_order %d (%s)\n",
4300 info.byte_order,
4301 (info.byte_order == BIG_ENDIAN ? "big"
4302 : info.byte_order == LITTLE_ENDIAN ? "little"
4303 : "default"));
4304 fprintf_unfiltered (gdb_stdlog,
4305 "gdbarch_update: info.abfd 0x%lx\n",
4306 (long) info.abfd);
4307 fprintf_unfiltered (gdb_stdlog,
4308 "gdbarch_update: info.tdep_info 0x%lx\n",
4309 (long) info.tdep_info);
4310 }
4311
4312 /* Ask the target for a replacement architecture. */
4313 new_gdbarch = rego->init (info, rego->arches);
4314
4315 /* Did the target like it? No. Reject the change. */
4316 if (new_gdbarch == NULL)
4317 {
4318 if (gdbarch_debug)
4319 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
4320 return 0;
4321 }
4322
4323 /* Did the architecture change? No. Do nothing. */
4324 if (current_gdbarch == new_gdbarch)
4325 {
4326 if (gdbarch_debug)
4327 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4328 (long) new_gdbarch,
4329 new_gdbarch->bfd_arch_info->printable_name);
4330 return 1;
4331 }
4332
4333 /* Swap all data belonging to the old target out */
4334 swapout_gdbarch_swap (current_gdbarch);
4335
4336 /* Is this a pre-existing architecture? Yes. Swap it in. */
4337 for (list = &rego->arches;
4338 (*list) != NULL;
4339 list = &(*list)->next)
4340 {
4341 if ((*list)->gdbarch == new_gdbarch)
4342 {
4343 if (gdbarch_debug)
4b9b3959
AC
4344 fprintf_unfiltered (gdb_stdlog,
4345 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
0f71a2f6
JM
4346 (long) new_gdbarch,
4347 new_gdbarch->bfd_arch_info->printable_name);
4348 current_gdbarch = new_gdbarch;
4349 swapin_gdbarch_swap (new_gdbarch);
4350 return 1;
4351 }
4352 }
4b9b3959 4353
0f71a2f6
JM
4354 /* Append this new architecture to this targets list. */
4355 (*list) = XMALLOC (struct gdbarch_list);
4356 (*list)->next = NULL;
4357 (*list)->gdbarch = new_gdbarch;
4358
4359 /* Switch to this new architecture. Dump it out. */
4360 current_gdbarch = new_gdbarch;
4361 if (gdbarch_debug)
4362 {
4363 fprintf_unfiltered (gdb_stdlog,
adf40b2e 4364 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
0f71a2f6
JM
4365 (long) new_gdbarch,
4366 new_gdbarch->bfd_arch_info->printable_name);
0f71a2f6 4367 }
adf40b2e 4368
4b9b3959
AC
4369 /* Check that the newly installed architecture is valid. Plug in
4370 any post init values. */
4371 new_gdbarch->dump_tdep = rego->dump_tdep;
0f71a2f6
JM
4372 verify_gdbarch (new_gdbarch);
4373
4374 /* Initialize the per-architecture memory (swap) areas.
4375 CURRENT_GDBARCH must be update before these modules are
4376 called. */
4377 init_gdbarch_swap (new_gdbarch);
adf40b2e 4378
0f71a2f6
JM
4379 /* Initialize the per-architecture data-pointer of all parties that
4380 registered an interest in this architecture. CURRENT_GDBARCH
4381 must be updated before these modules are called. */
4382 init_gdbarch_data (new_gdbarch);
adf40b2e 4383
4b9b3959
AC
4384 if (gdbarch_debug)
4385 gdbarch_dump (current_gdbarch, gdb_stdlog);
4386
0f71a2f6
JM
4387 return 1;
4388}
c906108c 4389
c906108c 4390
c906108c
SS
4391/* Disassembler */
4392
4393/* Pointer to the target-dependent disassembly function. */
104c1213 4394int (*tm_print_insn) (bfd_vma, disassemble_info *);
c906108c
SS
4395disassemble_info tm_print_insn_info;
4396
4397
104c1213 4398extern void _initialize_gdbarch (void);
b4a20239 4399
c906108c 4400void
7c7651b2 4401_initialize_gdbarch (void)
c906108c 4402{
5d161b24
DB
4403 struct cmd_list_element *c;
4404
adf40b2e 4405 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
c906108c
SS
4406 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
4407 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
4408 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
4409 tm_print_insn_info.print_address_func = dis_asm_print_address;
4410
5d161b24 4411 add_show_from_set (add_set_cmd ("arch",
c906108c
SS
4412 class_maintenance,
4413 var_zinteger,
adf40b2e 4414 (char *)&gdbarch_debug,
c906108c 4415 "Set architecture debugging.\n\
5d161b24
DB
4416When non-zero, architecture debugging is enabled.", &setdebuglist),
4417 &showdebuglist);
59233f88
AC
4418 c = add_set_cmd ("archdebug",
4419 class_maintenance,
4420 var_zinteger,
4421 (char *)&gdbarch_debug,
4422 "Set architecture debugging.\n\
5d161b24
DB
4423When non-zero, architecture debugging is enabled.", &setlist);
4424
59233f88
AC
4425 deprecate_cmd (c, "set debug arch");
4426 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
c906108c 4427}
This page took 0.36089 seconds and 4 git commands to generate.