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