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