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