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