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