1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
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.
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.
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. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
69 /* Static function declarations */
71 static void verify_gdbarch (struct gdbarch *gdbarch);
72 static void alloc_gdbarch_data (struct gdbarch *);
73 static void free_gdbarch_data (struct gdbarch *);
74 static void init_gdbarch_swap (struct gdbarch *);
75 static void clear_gdbarch_swap (struct gdbarch *);
76 static void swapout_gdbarch_swap (struct gdbarch *);
77 static void swapin_gdbarch_swap (struct gdbarch *);
79 /* Non-zero if we want to trace architecture code. */
82 #define GDBARCH_DEBUG 0
84 int gdbarch_debug = GDBARCH_DEBUG;
87 /* Maintain the struct gdbarch object */
91 /* Has this architecture been fully initialized? */
93 /* basic architectural information */
94 const struct bfd_arch_info * bfd_arch_info;
97 /* target specific vector. */
98 struct gdbarch_tdep *tdep;
99 gdbarch_dump_tdep_ftype *dump_tdep;
101 /* per-architecture data-pointers */
105 /* per-architecture swap-regions */
106 struct gdbarch_swap *swap;
108 /* Multi-arch values.
110 When extending this structure you must:
114 Declare set/get functions and define the corresponding
117 gdbarch_alloc(): If zero/NULL is not a suitable default,
118 initialize the new field.
120 verify_gdbarch(): Confirm that the target updated the field
123 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
126 ``startup_gdbarch()'': Append an initial value to the static
127 variable (base values on the host's c-type system).
129 get_gdbarch(): Implement the set/get functions (probably using
130 the macro's as shortcuts).
145 gdbarch_read_pc_ftype *read_pc;
146 gdbarch_write_pc_ftype *write_pc;
147 gdbarch_read_fp_ftype *read_fp;
148 gdbarch_read_sp_ftype *read_sp;
149 gdbarch_write_sp_ftype *write_sp;
150 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
151 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
152 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
161 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
162 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
163 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
164 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
165 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
166 gdbarch_register_name_ftype *register_name;
169 gdbarch_register_byte_ftype *register_byte;
170 gdbarch_register_raw_size_ftype *register_raw_size;
171 int max_register_raw_size;
172 gdbarch_register_virtual_size_ftype *register_virtual_size;
173 int max_register_virtual_size;
174 gdbarch_register_virtual_type_ftype *register_virtual_type;
175 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
176 gdbarch_print_registers_info_ftype *print_registers_info;
177 gdbarch_print_float_info_ftype *print_float_info;
178 gdbarch_print_vector_info_ftype *print_vector_info;
179 gdbarch_register_sim_regno_ftype *register_sim_regno;
180 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
181 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
182 gdbarch_cannot_store_register_ftype *cannot_store_register;
183 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
184 int deprecated_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_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
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;
198 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
199 gdbarch_init_frame_pc_ftype *init_frame_pc;
200 int believe_pcc_promotion;
201 int believe_pcc_promotion_type;
202 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
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;
207 gdbarch_convert_register_p_ftype *convert_register_p;
208 gdbarch_register_to_value_ftype *register_to_value;
209 gdbarch_value_to_register_ftype *value_to_register;
210 gdbarch_pointer_to_address_ftype *pointer_to_address;
211 gdbarch_address_to_pointer_ftype *address_to_pointer;
212 gdbarch_integer_to_address_ftype *integer_to_address;
213 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
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;
218 gdbarch_store_struct_return_ftype *store_struct_return;
219 gdbarch_extract_return_value_ftype *extract_return_value;
220 gdbarch_store_return_value_ftype *store_return_value;
221 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
222 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
223 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
224 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
225 gdbarch_use_struct_convention_ftype *use_struct_convention;
226 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
227 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
228 gdbarch_skip_prologue_ftype *skip_prologue;
229 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
230 gdbarch_inner_than_ftype *inner_than;
231 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
232 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
233 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
234 CORE_ADDR decr_pc_after_break;
235 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
236 CORE_ADDR function_start_offset;
237 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
238 CORE_ADDR frame_args_skip;
239 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
240 gdbarch_frame_chain_ftype *frame_chain;
241 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
242 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
243 gdbarch_frame_args_address_ftype *frame_args_address;
244 gdbarch_frame_locals_address_ftype *frame_locals_address;
245 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
246 gdbarch_frame_num_args_ftype *frame_num_args;
247 gdbarch_stack_align_ftype *stack_align;
248 gdbarch_frame_align_ftype *frame_align;
249 int extra_stack_alignment_needed;
250 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
251 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
253 const struct floatformat * float_format;
254 const struct floatformat * double_format;
255 const struct floatformat * long_double_format;
256 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
257 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
258 gdbarch_smash_text_address_ftype *smash_text_address;
259 gdbarch_software_single_step_ftype *software_single_step;
260 gdbarch_print_insn_ftype *print_insn;
261 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
262 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
263 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
264 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
265 gdbarch_sigtramp_start_ftype *sigtramp_start;
266 gdbarch_sigtramp_end_ftype *sigtramp_end;
267 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
268 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
269 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
270 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
271 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
272 const char * name_of_malloc;
273 int cannot_step_breakpoint;
274 int have_nonsteppable_watchpoint;
275 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
276 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
277 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
278 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
282 /* The default architecture uses host values (for want of a better
285 extern const struct bfd_arch_info bfd_default_arch_struct;
287 struct gdbarch startup_gdbarch =
289 1, /* Always initialized. */
290 /* basic architecture information */
291 &bfd_default_arch_struct,
293 /* target specific vector and its dump routine */
295 /*per-architecture data-pointers and swap regions */
297 /* Multi-arch values */
301 8 * sizeof (LONGEST),
304 8 * sizeof (long double),
333 generic_register_byte,
334 generic_register_size,
336 generic_register_size,
340 default_print_registers_info,
355 generic_pc_in_call_dummy,
431 generic_in_function_epilogue_p,
432 construct_inferior_arguments,
442 default_register_reggroup_p,
443 /* startup_gdbarch() */
446 struct gdbarch *current_gdbarch = &startup_gdbarch;
448 /* Do any initialization needed for a non-multiarch configuration
449 after the _initialize_MODULE functions have been run. */
451 initialize_non_multiarch (void)
453 alloc_gdbarch_data (&startup_gdbarch);
454 /* Ensure that all swap areas are zeroed so that they again think
455 they are starting from scratch. */
456 clear_gdbarch_swap (&startup_gdbarch);
457 init_gdbarch_swap (&startup_gdbarch);
461 /* Create a new ``struct gdbarch'' based on information provided by
462 ``struct gdbarch_info''. */
465 gdbarch_alloc (const struct gdbarch_info *info,
466 struct gdbarch_tdep *tdep)
468 /* NOTE: The new architecture variable is named ``current_gdbarch''
469 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
470 the current local architecture and not the previous global
471 architecture. This ensures that the new architectures initial
472 values are not influenced by the previous architecture. Once
473 everything is parameterised with gdbarch, this will go away. */
474 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
475 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
477 alloc_gdbarch_data (current_gdbarch);
479 current_gdbarch->tdep = tdep;
481 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
482 current_gdbarch->byte_order = info->byte_order;
484 /* Force the explicit initialization of these. */
485 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
486 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
487 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
488 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
489 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
490 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
491 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
492 current_gdbarch->ptr_bit = TARGET_INT_BIT;
493 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
494 current_gdbarch->char_signed = -1;
495 current_gdbarch->read_pc = generic_target_read_pc;
496 current_gdbarch->write_pc = generic_target_write_pc;
497 current_gdbarch->read_fp = generic_target_read_fp;
498 current_gdbarch->read_sp = generic_target_read_sp;
499 current_gdbarch->write_sp = generic_target_write_sp;
500 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
501 current_gdbarch->num_regs = -1;
502 current_gdbarch->sp_regnum = -1;
503 current_gdbarch->fp_regnum = -1;
504 current_gdbarch->pc_regnum = -1;
505 current_gdbarch->ps_regnum = -1;
506 current_gdbarch->fp0_regnum = -1;
507 current_gdbarch->npc_regnum = -1;
508 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
509 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
510 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
511 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
512 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
513 current_gdbarch->register_name = legacy_register_name;
514 current_gdbarch->register_size = -1;
515 current_gdbarch->register_bytes = -1;
516 current_gdbarch->register_byte = generic_register_byte;
517 current_gdbarch->register_raw_size = generic_register_size;
518 current_gdbarch->max_register_raw_size = -1;
519 current_gdbarch->register_virtual_size = generic_register_size;
520 current_gdbarch->max_register_virtual_size = -1;
521 current_gdbarch->print_registers_info = default_print_registers_info;
522 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
523 current_gdbarch->cannot_fetch_register = cannot_register_not;
524 current_gdbarch->cannot_store_register = cannot_register_not;
525 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
526 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
527 current_gdbarch->call_dummy_start_offset = -1;
528 current_gdbarch->call_dummy_breakpoint_offset = -1;
529 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
530 current_gdbarch->call_dummy_length = -1;
531 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
532 current_gdbarch->call_dummy_p = -1;
533 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
534 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
535 current_gdbarch->call_dummy_stack_adjust_p = -1;
536 current_gdbarch->init_frame_pc = init_frame_pc_default;
537 current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
538 current_gdbarch->register_convertible = generic_register_convertible_not;
539 current_gdbarch->convert_register_p = legacy_convert_register_p;
540 current_gdbarch->register_to_value = legacy_register_to_value;
541 current_gdbarch->value_to_register = legacy_value_to_register;
542 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
543 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
544 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
545 current_gdbarch->push_arguments = default_push_arguments;
546 current_gdbarch->extract_return_value = legacy_extract_return_value;
547 current_gdbarch->store_return_value = legacy_store_return_value;
548 current_gdbarch->use_struct_convention = generic_use_struct_convention;
549 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
550 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
551 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
552 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
553 current_gdbarch->decr_pc_after_break = -1;
554 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
555 current_gdbarch->function_start_offset = -1;
556 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
557 current_gdbarch->frame_args_skip = -1;
558 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
559 current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
560 current_gdbarch->frame_args_address = get_frame_base;
561 current_gdbarch->frame_locals_address = get_frame_base;
562 current_gdbarch->extra_stack_alignment_needed = 1;
563 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
564 current_gdbarch->addr_bits_remove = core_addr_identity;
565 current_gdbarch->smash_text_address = core_addr_identity;
566 current_gdbarch->print_insn = legacy_print_insn;
567 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
568 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
569 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
570 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
571 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
572 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
573 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
574 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
575 current_gdbarch->name_of_malloc = "malloc";
576 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
577 /* gdbarch_alloc() */
579 return current_gdbarch;
583 /* Free a gdbarch struct. This should never happen in normal
584 operation --- once you've created a gdbarch, you keep it around.
585 However, if an architecture's init function encounters an error
586 building the structure, it may need to clean up a partially
587 constructed gdbarch. */
590 gdbarch_free (struct gdbarch *arch)
592 gdb_assert (arch != NULL);
593 free_gdbarch_data (arch);
598 /* Ensure that all values in a GDBARCH are reasonable. */
601 verify_gdbarch (struct gdbarch *gdbarch)
604 struct cleanup *cleanups;
607 /* Only perform sanity checks on a multi-arch target. */
610 log = mem_fileopen ();
611 cleanups = make_cleanup_ui_file_delete (log);
613 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
614 fprintf_unfiltered (log, "\n\tbyte-order");
615 if (gdbarch->bfd_arch_info == NULL)
616 fprintf_unfiltered (log, "\n\tbfd_arch_info");
617 /* Check those that need to be defined for the given multi-arch level. */
618 /* Skip verify of short_bit, invalid_p == 0 */
619 /* Skip verify of int_bit, invalid_p == 0 */
620 /* Skip verify of long_bit, invalid_p == 0 */
621 /* Skip verify of long_long_bit, invalid_p == 0 */
622 /* Skip verify of float_bit, invalid_p == 0 */
623 /* Skip verify of double_bit, invalid_p == 0 */
624 /* Skip verify of long_double_bit, invalid_p == 0 */
625 /* Skip verify of ptr_bit, invalid_p == 0 */
626 if (gdbarch->addr_bit == 0)
627 gdbarch->addr_bit = TARGET_PTR_BIT;
628 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
629 if (gdbarch->char_signed == -1)
630 gdbarch->char_signed = 1;
631 /* Skip verify of read_pc, invalid_p == 0 */
632 /* Skip verify of write_pc, invalid_p == 0 */
633 /* Skip verify of read_fp, invalid_p == 0 */
634 /* Skip verify of read_sp, invalid_p == 0 */
635 /* Skip verify of write_sp, invalid_p == 0 */
636 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
637 /* Skip verify of pseudo_register_read, has predicate */
638 /* Skip verify of pseudo_register_write, has predicate */
639 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
640 && (gdbarch->num_regs == -1))
641 fprintf_unfiltered (log, "\n\tnum_regs");
642 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
643 /* Skip verify of sp_regnum, invalid_p == 0 */
644 /* Skip verify of fp_regnum, invalid_p == 0 */
645 /* Skip verify of pc_regnum, invalid_p == 0 */
646 /* Skip verify of ps_regnum, invalid_p == 0 */
647 /* Skip verify of fp0_regnum, invalid_p == 0 */
648 /* Skip verify of npc_regnum, invalid_p == 0 */
649 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
650 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
651 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
652 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
653 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
654 /* Skip verify of register_name, invalid_p == 0 */
655 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
656 && (gdbarch->register_size == -1))
657 fprintf_unfiltered (log, "\n\tregister_size");
658 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
659 && (gdbarch->register_bytes == -1))
660 fprintf_unfiltered (log, "\n\tregister_bytes");
661 /* Skip verify of register_byte, invalid_p == 0 */
662 /* Skip verify of register_raw_size, invalid_p == 0 */
663 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
664 && (gdbarch->max_register_raw_size == -1))
665 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
666 /* Skip verify of register_virtual_size, invalid_p == 0 */
667 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
668 && (gdbarch->max_register_virtual_size == -1))
669 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
670 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
671 && (gdbarch->register_virtual_type == 0))
672 fprintf_unfiltered (log, "\n\tregister_virtual_type");
673 /* Skip verify of deprecated_do_registers_info, has predicate */
674 /* Skip verify of print_registers_info, invalid_p == 0 */
675 /* Skip verify of print_float_info, has predicate */
676 /* Skip verify of print_vector_info, has predicate */
677 /* Skip verify of register_sim_regno, invalid_p == 0 */
678 /* Skip verify of register_bytes_ok, has predicate */
679 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
680 /* Skip verify of cannot_store_register, invalid_p == 0 */
681 /* Skip verify of get_longjmp_target, has predicate */
682 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
683 /* Skip verify of call_dummy_location, invalid_p == 0 */
684 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
685 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
686 fprintf_unfiltered (log, "\n\tcall_dummy_address");
687 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
688 && (gdbarch->call_dummy_start_offset == -1))
689 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
690 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
691 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
692 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
693 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
694 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
695 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
696 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
697 && (gdbarch->call_dummy_length == -1))
698 fprintf_unfiltered (log, "\n\tcall_dummy_length");
699 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
700 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
701 && (gdbarch->call_dummy_p == -1))
702 fprintf_unfiltered (log, "\n\tcall_dummy_p");
703 /* Skip verify of call_dummy_words, invalid_p == 0 */
704 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
705 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
706 && (gdbarch->call_dummy_stack_adjust_p == -1))
707 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
708 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
709 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
710 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
711 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
712 && (gdbarch->fix_call_dummy == 0))
713 fprintf_unfiltered (log, "\n\tfix_call_dummy");
714 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
715 /* Skip verify of init_frame_pc, invalid_p == 0 */
716 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
717 /* Skip verify of get_saved_register, has predicate */
718 /* Skip verify of register_convertible, invalid_p == 0 */
719 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
720 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
721 /* Skip verify of convert_register_p, invalid_p == 0 */
722 /* Skip verify of register_to_value, invalid_p == 0 */
723 /* Skip verify of value_to_register, invalid_p == 0 */
724 /* Skip verify of pointer_to_address, invalid_p == 0 */
725 /* Skip verify of address_to_pointer, invalid_p == 0 */
726 /* Skip verify of integer_to_address, has predicate */
727 /* Skip verify of return_value_on_stack, invalid_p == 0 */
728 /* Skip verify of push_arguments, invalid_p == 0 */
729 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
730 && (gdbarch->push_dummy_frame == 0))
731 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
732 /* Skip verify of push_return_address, has predicate */
733 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
734 && (gdbarch->pop_frame == 0))
735 fprintf_unfiltered (log, "\n\tpop_frame");
736 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
737 && (gdbarch->store_struct_return == 0))
738 fprintf_unfiltered (log, "\n\tstore_struct_return");
739 /* Skip verify of extract_return_value, invalid_p == 0 */
740 /* Skip verify of store_return_value, invalid_p == 0 */
741 /* Skip verify of extract_struct_value_address, has predicate */
742 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
743 /* Skip verify of use_struct_convention, invalid_p == 0 */
744 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
745 && (gdbarch->frame_init_saved_regs == 0))
746 fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
747 /* Skip verify of init_extra_frame_info, has predicate */
748 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
749 && (gdbarch->skip_prologue == 0))
750 fprintf_unfiltered (log, "\n\tskip_prologue");
751 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
752 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
753 && (gdbarch->inner_than == 0))
754 fprintf_unfiltered (log, "\n\tinner_than");
755 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
756 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
757 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
758 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
759 && (gdbarch->decr_pc_after_break == -1))
760 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
761 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
762 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
763 && (gdbarch->function_start_offset == -1))
764 fprintf_unfiltered (log, "\n\tfunction_start_offset");
765 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
766 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
767 && (gdbarch->frame_args_skip == -1))
768 fprintf_unfiltered (log, "\n\tframe_args_skip");
769 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
770 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
771 && (gdbarch->frame_chain == 0))
772 fprintf_unfiltered (log, "\n\tframe_chain");
773 /* Skip verify of frame_chain_valid, invalid_p == 0 */
774 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
775 && (gdbarch->frame_saved_pc == 0))
776 fprintf_unfiltered (log, "\n\tframe_saved_pc");
777 /* Skip verify of frame_args_address, invalid_p == 0 */
778 /* Skip verify of frame_locals_address, invalid_p == 0 */
779 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
780 && (gdbarch->saved_pc_after_call == 0))
781 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
782 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
783 && (gdbarch->frame_num_args == 0))
784 fprintf_unfiltered (log, "\n\tframe_num_args");
785 /* Skip verify of stack_align, has predicate */
786 /* Skip verify of frame_align, has predicate */
787 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
788 /* Skip verify of reg_struct_has_addr, has predicate */
789 /* Skip verify of save_dummy_frame_tos, has predicate */
790 if (gdbarch->float_format == 0)
791 gdbarch->float_format = default_float_format (gdbarch);
792 if (gdbarch->double_format == 0)
793 gdbarch->double_format = default_double_format (gdbarch);
794 if (gdbarch->long_double_format == 0)
795 gdbarch->long_double_format = default_double_format (gdbarch);
796 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
797 /* Skip verify of addr_bits_remove, invalid_p == 0 */
798 /* Skip verify of smash_text_address, invalid_p == 0 */
799 /* Skip verify of software_single_step, has predicate */
800 /* Skip verify of print_insn, invalid_p == 0 */
801 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
802 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
803 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
804 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
805 /* Skip verify of sigtramp_start, has predicate */
806 /* Skip verify of sigtramp_end, has predicate */
807 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
808 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
809 /* Skip verify of dwarf2_build_frame_info, has predicate */
810 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
811 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
812 /* Skip verify of name_of_malloc, invalid_p == 0 */
813 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
814 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
815 /* Skip verify of address_class_type_flags, has predicate */
816 /* Skip verify of address_class_type_flags_to_name, has predicate */
817 /* Skip verify of address_class_name_to_type_flags, has predicate */
818 /* Skip verify of register_reggroup_p, invalid_p == 0 */
819 buf = ui_file_xstrdup (log, &dummy);
820 make_cleanup (xfree, buf);
821 if (strlen (buf) > 0)
822 internal_error (__FILE__, __LINE__,
823 "verify_gdbarch: the following are invalid ...%s",
825 do_cleanups (cleanups);
829 /* Print out the details of the current architecture. */
831 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
832 just happens to match the global variable ``current_gdbarch''. That
833 way macros refering to that variable get the local and not the global
834 version - ulgh. Once everything is parameterised with gdbarch, this
838 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
840 fprintf_unfiltered (file,
841 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
844 fprintf_unfiltered (file,
845 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
846 gdbarch_frame_align_p (current_gdbarch));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: frame_align = 0x%08lx\n",
850 (long) current_gdbarch->frame_align);
852 fprintf_unfiltered (file,
853 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
854 (long) current_gdbarch->in_function_epilogue_p);
856 fprintf_unfiltered (file,
857 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
858 (long) current_gdbarch->register_reggroup_p);
860 fprintf_unfiltered (file,
861 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
862 gdbarch_pseudo_register_read_p (current_gdbarch));
864 fprintf_unfiltered (file,
865 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
866 (long) current_gdbarch->pseudo_register_read);
868 fprintf_unfiltered (file,
869 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
870 gdbarch_pseudo_register_write_p (current_gdbarch));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
874 (long) current_gdbarch->pseudo_register_write);
876 fprintf_unfiltered (file,
877 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
878 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
880 fprintf_unfiltered (file,
881 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
882 (long) current_gdbarch->address_class_name_to_type_flags);
883 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
884 fprintf_unfiltered (file,
885 "gdbarch_dump: %s # %s\n",
886 "ADDRESS_CLASS_TYPE_FLAGS_P()",
887 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
888 fprintf_unfiltered (file,
889 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
890 ADDRESS_CLASS_TYPE_FLAGS_P ());
892 #ifdef ADDRESS_CLASS_TYPE_FLAGS
893 fprintf_unfiltered (file,
894 "gdbarch_dump: %s # %s\n",
895 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
896 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
900 (long) current_gdbarch->address_class_type_flags
901 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
904 fprintf_unfiltered (file,
905 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
906 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
910 (long) current_gdbarch->address_class_type_flags_to_name);
911 #ifdef ADDRESS_TO_POINTER
913 /* Macro might contain `[{}]' when not multi-arch */
914 fprintf_unfiltered (file,
915 "gdbarch_dump: %s # %s\n",
916 "ADDRESS_TO_POINTER(type, buf, addr)",
917 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
922 (long) current_gdbarch->address_to_pointer
923 /*ADDRESS_TO_POINTER ()*/);
925 #ifdef ADDR_BITS_REMOVE
926 fprintf_unfiltered (file,
927 "gdbarch_dump: %s # %s\n",
928 "ADDR_BITS_REMOVE(addr)",
929 XSTRING (ADDR_BITS_REMOVE (addr)));
931 fprintf_unfiltered (file,
932 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
933 (long) current_gdbarch->addr_bits_remove
934 /*ADDR_BITS_REMOVE ()*/);
936 #ifdef BELIEVE_PCC_PROMOTION
937 fprintf_unfiltered (file,
938 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
939 XSTRING (BELIEVE_PCC_PROMOTION));
940 fprintf_unfiltered (file,
941 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
942 BELIEVE_PCC_PROMOTION);
944 #ifdef BELIEVE_PCC_PROMOTION_TYPE
945 fprintf_unfiltered (file,
946 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
947 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
948 fprintf_unfiltered (file,
949 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
950 BELIEVE_PCC_PROMOTION_TYPE);
952 #ifdef BREAKPOINT_FROM_PC
953 fprintf_unfiltered (file,
954 "gdbarch_dump: %s # %s\n",
955 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
956 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
958 fprintf_unfiltered (file,
959 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
960 (long) current_gdbarch->breakpoint_from_pc
961 /*BREAKPOINT_FROM_PC ()*/);
963 #ifdef CALL_DUMMY_ADDRESS
964 fprintf_unfiltered (file,
965 "gdbarch_dump: %s # %s\n",
966 "CALL_DUMMY_ADDRESS()",
967 XSTRING (CALL_DUMMY_ADDRESS ()));
969 fprintf_unfiltered (file,
970 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
971 (long) current_gdbarch->call_dummy_address
972 /*CALL_DUMMY_ADDRESS ()*/);
974 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
975 fprintf_unfiltered (file,
976 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
977 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
978 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
979 fprintf_unfiltered (file,
980 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
981 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
983 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
984 fprintf_unfiltered (file,
985 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
986 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
987 fprintf_unfiltered (file,
988 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
989 CALL_DUMMY_BREAKPOINT_OFFSET_P);
991 #ifdef CALL_DUMMY_LENGTH
992 fprintf_unfiltered (file,
993 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
994 XSTRING (CALL_DUMMY_LENGTH));
995 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
996 fprintf_unfiltered (file,
997 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
1000 #ifdef CALL_DUMMY_LOCATION
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1003 XSTRING (CALL_DUMMY_LOCATION));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
1006 CALL_DUMMY_LOCATION);
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1011 XSTRING (CALL_DUMMY_P));
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: CALL_DUMMY_P = %d\n",
1016 #ifdef CALL_DUMMY_STACK_ADJUST
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1019 XSTRING (CALL_DUMMY_STACK_ADJUST));
1020 if (CALL_DUMMY_STACK_ADJUST_P)
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1023 (long) CALL_DUMMY_STACK_ADJUST);
1025 #ifdef CALL_DUMMY_STACK_ADJUST_P
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1028 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
1029 fprintf_unfiltered (file,
1030 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1031 (long) CALL_DUMMY_STACK_ADJUST_P);
1033 #ifdef CALL_DUMMY_START_OFFSET
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1036 XSTRING (CALL_DUMMY_START_OFFSET));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1039 (long) CALL_DUMMY_START_OFFSET);
1041 #ifdef CALL_DUMMY_WORDS
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1044 XSTRING (CALL_DUMMY_WORDS));
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1047 (long) CALL_DUMMY_WORDS);
1049 #ifdef CANNOT_FETCH_REGISTER
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: %s # %s\n",
1052 "CANNOT_FETCH_REGISTER(regnum)",
1053 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
1057 (long) current_gdbarch->cannot_fetch_register
1058 /*CANNOT_FETCH_REGISTER ()*/);
1060 #ifdef CANNOT_STEP_BREAKPOINT
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1063 XSTRING (CANNOT_STEP_BREAKPOINT));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1066 CANNOT_STEP_BREAKPOINT);
1068 #ifdef CANNOT_STORE_REGISTER
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: %s # %s\n",
1071 "CANNOT_STORE_REGISTER(regnum)",
1072 XSTRING (CANNOT_STORE_REGISTER (regnum)));
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1076 (long) current_gdbarch->cannot_store_register
1077 /*CANNOT_STORE_REGISTER ()*/);
1079 #ifdef COERCE_FLOAT_TO_DOUBLE
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: %s # %s\n",
1082 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1083 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = <0x%08lx>\n",
1087 (long) current_gdbarch->coerce_float_to_double
1088 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1090 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1092 /* Macro might contain `[{}]' when not multi-arch */
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: %s # %s\n",
1095 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1096 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1101 (long) current_gdbarch->coff_make_msymbol_special
1102 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1105 fprintf_unfiltered (file,
1106 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1107 (long) current_gdbarch->construct_inferior_arguments);
1108 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: %s # %s\n",
1111 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1112 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1114 fprintf_unfiltered (file,
1115 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1116 (long) current_gdbarch->convert_from_func_ptr_addr
1117 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1119 #ifdef CONVERT_REGISTER_P
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: %s # %s\n",
1122 "CONVERT_REGISTER_P(regnum)",
1123 XSTRING (CONVERT_REGISTER_P (regnum)));
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1127 (long) current_gdbarch->convert_register_p
1128 /*CONVERT_REGISTER_P ()*/);
1130 #ifdef DECR_PC_AFTER_BREAK
1131 fprintf_unfiltered (file,
1132 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1133 XSTRING (DECR_PC_AFTER_BREAK));
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1136 (long) DECR_PC_AFTER_BREAK);
1138 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: %s # %s\n",
1141 "DEPRECATED_DO_REGISTERS_INFO_P()",
1142 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1143 fprintf_unfiltered (file,
1144 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1145 DEPRECATED_DO_REGISTERS_INFO_P ());
1147 #ifdef DEPRECATED_DO_REGISTERS_INFO
1149 /* Macro might contain `[{}]' when not multi-arch */
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: %s # %s\n",
1152 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1153 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1156 fprintf_unfiltered (file,
1157 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1158 (long) current_gdbarch->deprecated_do_registers_info
1159 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1161 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1163 /* Macro might contain `[{}]' when not multi-arch */
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: %s # %s\n",
1166 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1167 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1170 fprintf_unfiltered (file,
1171 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1172 (long) current_gdbarch->deprecated_extract_return_value
1173 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1175 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: %s # %s\n",
1178 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1179 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1182 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1184 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1185 fprintf_unfiltered (file,
1186 "gdbarch_dump: %s # %s\n",
1187 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1188 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1192 (long) current_gdbarch->deprecated_extract_struct_value_address
1193 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1195 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: %s # %s\n",
1198 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1199 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1202 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1204 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: %s # %s\n",
1207 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1208 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1212 (long) current_gdbarch->deprecated_init_frame_pc_first
1213 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1215 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1216 fprintf_unfiltered (file,
1217 "gdbarch_dump: %s # %s\n",
1218 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1219 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1222 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1224 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: %s # %s\n",
1227 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1228 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1232 (long) current_gdbarch->deprecated_pc_in_call_dummy
1233 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1235 #ifdef DEPRECATED_STORE_RETURN_VALUE
1237 /* Macro might contain `[{}]' when not multi-arch */
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: %s # %s\n",
1240 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1241 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1246 (long) current_gdbarch->deprecated_store_return_value
1247 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1249 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1252 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1255 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1257 #ifdef DWARF2_BUILD_FRAME_INFO_P
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: %s # %s\n",
1260 "DWARF2_BUILD_FRAME_INFO_P()",
1261 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1264 DWARF2_BUILD_FRAME_INFO_P ());
1266 #ifdef DWARF2_BUILD_FRAME_INFO
1268 /* Macro might contain `[{}]' when not multi-arch */
1269 fprintf_unfiltered (file,
1270 "gdbarch_dump: %s # %s\n",
1271 "DWARF2_BUILD_FRAME_INFO(objfile)",
1272 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1275 fprintf_unfiltered (file,
1276 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1277 (long) current_gdbarch->dwarf2_build_frame_info
1278 /*DWARF2_BUILD_FRAME_INFO ()*/);
1280 #ifdef DWARF2_REG_TO_REGNUM
1281 fprintf_unfiltered (file,
1282 "gdbarch_dump: %s # %s\n",
1283 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1284 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1288 (long) current_gdbarch->dwarf2_reg_to_regnum
1289 /*DWARF2_REG_TO_REGNUM ()*/);
1291 #ifdef DWARF_REG_TO_REGNUM
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: %s # %s\n",
1294 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1295 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1299 (long) current_gdbarch->dwarf_reg_to_regnum
1300 /*DWARF_REG_TO_REGNUM ()*/);
1302 #ifdef ECOFF_REG_TO_REGNUM
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: %s # %s\n",
1305 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1306 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1308 fprintf_unfiltered (file,
1309 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1310 (long) current_gdbarch->ecoff_reg_to_regnum
1311 /*ECOFF_REG_TO_REGNUM ()*/);
1313 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1315 /* Macro might contain `[{}]' when not multi-arch */
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: %s # %s\n",
1318 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1319 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1324 (long) current_gdbarch->elf_make_msymbol_special
1325 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1327 #ifdef EXTRACT_RETURN_VALUE
1329 /* Macro might contain `[{}]' when not multi-arch */
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: %s # %s\n",
1332 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1333 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1338 (long) current_gdbarch->extract_return_value
1339 /*EXTRACT_RETURN_VALUE ()*/);
1341 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: %s # %s\n",
1344 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1345 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1348 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1350 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: %s # %s\n",
1353 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1354 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1356 fprintf_unfiltered (file,
1357 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1358 (long) current_gdbarch->extract_struct_value_address
1359 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1361 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1362 fprintf_unfiltered (file,
1363 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1364 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1365 fprintf_unfiltered (file,
1366 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1367 EXTRA_STACK_ALIGNMENT_NEEDED);
1369 #ifdef FIX_CALL_DUMMY
1371 /* Macro might contain `[{}]' when not multi-arch */
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: %s # %s\n",
1374 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1375 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1380 (long) current_gdbarch->fix_call_dummy
1381 /*FIX_CALL_DUMMY ()*/);
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: FP0_REGNUM # %s\n",
1386 XSTRING (FP0_REGNUM));
1387 fprintf_unfiltered (file,
1388 "gdbarch_dump: FP0_REGNUM = %d\n",
1392 fprintf_unfiltered (file,
1393 "gdbarch_dump: FP_REGNUM # %s\n",
1394 XSTRING (FP_REGNUM));
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: FP_REGNUM = %d\n",
1399 #ifdef FRAMELESS_FUNCTION_INVOCATION
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: %s # %s\n",
1402 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1403 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1405 fprintf_unfiltered (file,
1406 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1407 (long) current_gdbarch->frameless_function_invocation
1408 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1410 #ifdef FRAME_ARGS_ADDRESS
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: %s # %s\n",
1413 "FRAME_ARGS_ADDRESS(fi)",
1414 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1418 (long) current_gdbarch->frame_args_address
1419 /*FRAME_ARGS_ADDRESS ()*/);
1421 #ifdef FRAME_ARGS_SKIP
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1424 XSTRING (FRAME_ARGS_SKIP));
1425 fprintf_unfiltered (file,
1426 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1427 (long) FRAME_ARGS_SKIP);
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: %s # %s\n",
1432 "FRAME_CHAIN(frame)",
1433 XSTRING (FRAME_CHAIN (frame)));
1435 fprintf_unfiltered (file,
1436 "gdbarch_dump: FRAME_CHAIN = <0x%08lx>\n",
1437 (long) current_gdbarch->frame_chain
1438 /*FRAME_CHAIN ()*/);
1440 #ifdef FRAME_CHAIN_VALID
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: %s # %s\n",
1443 "FRAME_CHAIN_VALID(chain, thisframe)",
1444 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1446 fprintf_unfiltered (file,
1447 "gdbarch_dump: FRAME_CHAIN_VALID = <0x%08lx>\n",
1448 (long) current_gdbarch->frame_chain_valid
1449 /*FRAME_CHAIN_VALID ()*/);
1451 #ifdef FRAME_INIT_SAVED_REGS
1453 /* Macro might contain `[{}]' when not multi-arch */
1454 fprintf_unfiltered (file,
1455 "gdbarch_dump: %s # %s\n",
1456 "FRAME_INIT_SAVED_REGS(frame)",
1457 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1462 (long) current_gdbarch->frame_init_saved_regs
1463 /*FRAME_INIT_SAVED_REGS ()*/);
1465 #ifdef FRAME_LOCALS_ADDRESS
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: %s # %s\n",
1468 "FRAME_LOCALS_ADDRESS(fi)",
1469 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1473 (long) current_gdbarch->frame_locals_address
1474 /*FRAME_LOCALS_ADDRESS ()*/);
1476 #ifdef FRAME_NUM_ARGS
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: %s # %s\n",
1479 "FRAME_NUM_ARGS(frame)",
1480 XSTRING (FRAME_NUM_ARGS (frame)));
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1484 (long) current_gdbarch->frame_num_args
1485 /*FRAME_NUM_ARGS ()*/);
1487 #ifdef FRAME_SAVED_PC
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: %s # %s\n",
1490 "FRAME_SAVED_PC(fi)",
1491 XSTRING (FRAME_SAVED_PC (fi)));
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: FRAME_SAVED_PC = <0x%08lx>\n",
1495 (long) current_gdbarch->frame_saved_pc
1496 /*FRAME_SAVED_PC ()*/);
1498 #ifdef FUNCTION_START_OFFSET
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1501 XSTRING (FUNCTION_START_OFFSET));
1502 fprintf_unfiltered (file,
1503 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1504 (long) FUNCTION_START_OFFSET);
1506 #ifdef GET_LONGJMP_TARGET_P
1507 fprintf_unfiltered (file,
1508 "gdbarch_dump: %s # %s\n",
1509 "GET_LONGJMP_TARGET_P()",
1510 XSTRING (GET_LONGJMP_TARGET_P ()));
1511 fprintf_unfiltered (file,
1512 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1513 GET_LONGJMP_TARGET_P ());
1515 #ifdef GET_LONGJMP_TARGET
1516 fprintf_unfiltered (file,
1517 "gdbarch_dump: %s # %s\n",
1518 "GET_LONGJMP_TARGET(pc)",
1519 XSTRING (GET_LONGJMP_TARGET (pc)));
1521 fprintf_unfiltered (file,
1522 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1523 (long) current_gdbarch->get_longjmp_target
1524 /*GET_LONGJMP_TARGET ()*/);
1526 #ifdef GET_SAVED_REGISTER_P
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: %s # %s\n",
1529 "GET_SAVED_REGISTER_P()",
1530 XSTRING (GET_SAVED_REGISTER_P ()));
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: GET_SAVED_REGISTER_P() = %d\n",
1533 GET_SAVED_REGISTER_P ());
1535 #ifdef GET_SAVED_REGISTER
1537 /* Macro might contain `[{}]' when not multi-arch */
1538 fprintf_unfiltered (file,
1539 "gdbarch_dump: %s # %s\n",
1540 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1541 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1544 fprintf_unfiltered (file,
1545 "gdbarch_dump: GET_SAVED_REGISTER = <0x%08lx>\n",
1546 (long) current_gdbarch->get_saved_register
1547 /*GET_SAVED_REGISTER ()*/);
1549 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1550 fprintf_unfiltered (file,
1551 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1552 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1555 HAVE_NONSTEPPABLE_WATCHPOINT);
1557 #ifdef INIT_EXTRA_FRAME_INFO_P
1558 fprintf_unfiltered (file,
1559 "gdbarch_dump: %s # %s\n",
1560 "INIT_EXTRA_FRAME_INFO_P()",
1561 XSTRING (INIT_EXTRA_FRAME_INFO_P ()));
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: INIT_EXTRA_FRAME_INFO_P() = %d\n",
1564 INIT_EXTRA_FRAME_INFO_P ());
1566 #ifdef INIT_EXTRA_FRAME_INFO
1568 /* Macro might contain `[{}]' when not multi-arch */
1569 fprintf_unfiltered (file,
1570 "gdbarch_dump: %s # %s\n",
1571 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1572 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1575 fprintf_unfiltered (file,
1576 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1577 (long) current_gdbarch->init_extra_frame_info
1578 /*INIT_EXTRA_FRAME_INFO ()*/);
1580 #ifdef INIT_FRAME_PC
1581 fprintf_unfiltered (file,
1582 "gdbarch_dump: %s # %s\n",
1583 "INIT_FRAME_PC(fromleaf, prev)",
1584 XSTRING (INIT_FRAME_PC (fromleaf, prev)));
1586 fprintf_unfiltered (file,
1587 "gdbarch_dump: INIT_FRAME_PC = <0x%08lx>\n",
1588 (long) current_gdbarch->init_frame_pc
1589 /*INIT_FRAME_PC ()*/);
1592 fprintf_unfiltered (file,
1593 "gdbarch_dump: %s # %s\n",
1594 "INNER_THAN(lhs, rhs)",
1595 XSTRING (INNER_THAN (lhs, rhs)));
1597 fprintf_unfiltered (file,
1598 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1599 (long) current_gdbarch->inner_than
1602 #ifdef INTEGER_TO_ADDRESS_P
1603 fprintf_unfiltered (file,
1604 "gdbarch_dump: %s # %s\n",
1605 "INTEGER_TO_ADDRESS_P()",
1606 XSTRING (INTEGER_TO_ADDRESS_P ()));
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1609 INTEGER_TO_ADDRESS_P ());
1611 #ifdef INTEGER_TO_ADDRESS
1612 fprintf_unfiltered (file,
1613 "gdbarch_dump: %s # %s\n",
1614 "INTEGER_TO_ADDRESS(type, buf)",
1615 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1617 fprintf_unfiltered (file,
1618 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1619 (long) current_gdbarch->integer_to_address
1620 /*INTEGER_TO_ADDRESS ()*/);
1622 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1623 fprintf_unfiltered (file,
1624 "gdbarch_dump: %s # %s\n",
1625 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1626 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1628 fprintf_unfiltered (file,
1629 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1630 (long) current_gdbarch->in_solib_call_trampoline
1631 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1633 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1634 fprintf_unfiltered (file,
1635 "gdbarch_dump: %s # %s\n",
1636 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1637 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1641 (long) current_gdbarch->in_solib_return_trampoline
1642 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1644 #ifdef MAX_REGISTER_RAW_SIZE
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1647 XSTRING (MAX_REGISTER_RAW_SIZE));
1648 fprintf_unfiltered (file,
1649 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1650 MAX_REGISTER_RAW_SIZE);
1652 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1655 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1656 fprintf_unfiltered (file,
1657 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1658 MAX_REGISTER_VIRTUAL_SIZE);
1660 #ifdef MEMORY_INSERT_BREAKPOINT
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: %s # %s\n",
1663 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1664 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1666 fprintf_unfiltered (file,
1667 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1668 (long) current_gdbarch->memory_insert_breakpoint
1669 /*MEMORY_INSERT_BREAKPOINT ()*/);
1671 #ifdef MEMORY_REMOVE_BREAKPOINT
1672 fprintf_unfiltered (file,
1673 "gdbarch_dump: %s # %s\n",
1674 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1675 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1679 (long) current_gdbarch->memory_remove_breakpoint
1680 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1682 #ifdef NAME_OF_MALLOC
1683 fprintf_unfiltered (file,
1684 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1685 XSTRING (NAME_OF_MALLOC));
1686 fprintf_unfiltered (file,
1687 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1691 fprintf_unfiltered (file,
1692 "gdbarch_dump: NPC_REGNUM # %s\n",
1693 XSTRING (NPC_REGNUM));
1694 fprintf_unfiltered (file,
1695 "gdbarch_dump: NPC_REGNUM = %d\n",
1698 #ifdef NUM_PSEUDO_REGS
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1701 XSTRING (NUM_PSEUDO_REGS));
1702 fprintf_unfiltered (file,
1703 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1707 fprintf_unfiltered (file,
1708 "gdbarch_dump: NUM_REGS # %s\n",
1709 XSTRING (NUM_REGS));
1710 fprintf_unfiltered (file,
1711 "gdbarch_dump: NUM_REGS = %d\n",
1714 #ifdef PARM_BOUNDARY
1715 fprintf_unfiltered (file,
1716 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1717 XSTRING (PARM_BOUNDARY));
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1722 #ifdef PC_IN_SIGTRAMP
1723 fprintf_unfiltered (file,
1724 "gdbarch_dump: %s # %s\n",
1725 "PC_IN_SIGTRAMP(pc, name)",
1726 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1728 fprintf_unfiltered (file,
1729 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1730 (long) current_gdbarch->pc_in_sigtramp
1731 /*PC_IN_SIGTRAMP ()*/);
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: PC_REGNUM # %s\n",
1736 XSTRING (PC_REGNUM));
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: PC_REGNUM = %d\n",
1741 #ifdef POINTER_TO_ADDRESS
1742 fprintf_unfiltered (file,
1743 "gdbarch_dump: %s # %s\n",
1744 "POINTER_TO_ADDRESS(type, buf)",
1745 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1747 fprintf_unfiltered (file,
1748 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1749 (long) current_gdbarch->pointer_to_address
1750 /*POINTER_TO_ADDRESS ()*/);
1754 /* Macro might contain `[{}]' when not multi-arch */
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: %s # %s\n",
1758 XSTRING (POP_FRAME (-)));
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: POP_FRAME = <0x%08lx>\n",
1763 (long) current_gdbarch->pop_frame
1766 #ifdef PREPARE_TO_PROCEED
1767 fprintf_unfiltered (file,
1768 "gdbarch_dump: %s # %s\n",
1769 "PREPARE_TO_PROCEED(select_it)",
1770 XSTRING (PREPARE_TO_PROCEED (select_it)));
1772 fprintf_unfiltered (file,
1773 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1774 (long) current_gdbarch->prepare_to_proceed
1775 /*PREPARE_TO_PROCEED ()*/);
1778 fprintf_unfiltered (file,
1779 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1780 gdbarch_print_float_info_p (current_gdbarch));
1782 fprintf_unfiltered (file,
1783 "gdbarch_dump: print_float_info = 0x%08lx\n",
1784 (long) current_gdbarch->print_float_info);
1786 fprintf_unfiltered (file,
1787 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1788 (long) current_gdbarch->print_registers_info);
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1792 gdbarch_print_vector_info_p (current_gdbarch));
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1796 (long) current_gdbarch->print_vector_info);
1797 #ifdef PROLOGUE_FRAMELESS_P
1798 fprintf_unfiltered (file,
1799 "gdbarch_dump: %s # %s\n",
1800 "PROLOGUE_FRAMELESS_P(ip)",
1801 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1805 (long) current_gdbarch->prologue_frameless_p
1806 /*PROLOGUE_FRAMELESS_P ()*/);
1809 fprintf_unfiltered (file,
1810 "gdbarch_dump: PS_REGNUM # %s\n",
1811 XSTRING (PS_REGNUM));
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: PS_REGNUM = %d\n",
1816 #ifdef PUSH_ARGUMENTS
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: %s # %s\n",
1819 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1820 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1822 fprintf_unfiltered (file,
1823 "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
1824 (long) current_gdbarch->push_arguments
1825 /*PUSH_ARGUMENTS ()*/);
1827 #ifdef PUSH_DUMMY_FRAME
1829 /* Macro might contain `[{}]' when not multi-arch */
1830 fprintf_unfiltered (file,
1831 "gdbarch_dump: %s # %s\n",
1832 "PUSH_DUMMY_FRAME(-)",
1833 XSTRING (PUSH_DUMMY_FRAME (-)));
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: PUSH_DUMMY_FRAME = <0x%08lx>\n",
1838 (long) current_gdbarch->push_dummy_frame
1839 /*PUSH_DUMMY_FRAME ()*/);
1841 #ifdef PUSH_RETURN_ADDRESS_P
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: %s # %s\n",
1844 "PUSH_RETURN_ADDRESS_P()",
1845 XSTRING (PUSH_RETURN_ADDRESS_P ()));
1846 fprintf_unfiltered (file,
1847 "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
1848 PUSH_RETURN_ADDRESS_P ());
1850 #ifdef PUSH_RETURN_ADDRESS
1851 fprintf_unfiltered (file,
1852 "gdbarch_dump: %s # %s\n",
1853 "PUSH_RETURN_ADDRESS(pc, sp)",
1854 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1858 (long) current_gdbarch->push_return_address
1859 /*PUSH_RETURN_ADDRESS ()*/);
1861 #ifdef REGISTER_BYTE
1862 fprintf_unfiltered (file,
1863 "gdbarch_dump: %s # %s\n",
1864 "REGISTER_BYTE(reg_nr)",
1865 XSTRING (REGISTER_BYTE (reg_nr)));
1867 fprintf_unfiltered (file,
1868 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1869 (long) current_gdbarch->register_byte
1870 /*REGISTER_BYTE ()*/);
1872 #ifdef REGISTER_BYTES
1873 fprintf_unfiltered (file,
1874 "gdbarch_dump: REGISTER_BYTES # %s\n",
1875 XSTRING (REGISTER_BYTES));
1876 fprintf_unfiltered (file,
1877 "gdbarch_dump: REGISTER_BYTES = %d\n",
1880 #ifdef REGISTER_BYTES_OK_P
1881 fprintf_unfiltered (file,
1882 "gdbarch_dump: %s # %s\n",
1883 "REGISTER_BYTES_OK_P()",
1884 XSTRING (REGISTER_BYTES_OK_P ()));
1885 fprintf_unfiltered (file,
1886 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1887 REGISTER_BYTES_OK_P ());
1889 #ifdef REGISTER_BYTES_OK
1890 fprintf_unfiltered (file,
1891 "gdbarch_dump: %s # %s\n",
1892 "REGISTER_BYTES_OK(nr_bytes)",
1893 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1897 (long) current_gdbarch->register_bytes_ok
1898 /*REGISTER_BYTES_OK ()*/);
1900 #ifdef REGISTER_CONVERTIBLE
1901 fprintf_unfiltered (file,
1902 "gdbarch_dump: %s # %s\n",
1903 "REGISTER_CONVERTIBLE(nr)",
1904 XSTRING (REGISTER_CONVERTIBLE (nr)));
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1908 (long) current_gdbarch->register_convertible
1909 /*REGISTER_CONVERTIBLE ()*/);
1911 #ifdef REGISTER_CONVERT_TO_RAW
1913 /* Macro might contain `[{}]' when not multi-arch */
1914 fprintf_unfiltered (file,
1915 "gdbarch_dump: %s # %s\n",
1916 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1917 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1920 fprintf_unfiltered (file,
1921 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1922 (long) current_gdbarch->register_convert_to_raw
1923 /*REGISTER_CONVERT_TO_RAW ()*/);
1925 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1927 /* Macro might contain `[{}]' when not multi-arch */
1928 fprintf_unfiltered (file,
1929 "gdbarch_dump: %s # %s\n",
1930 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1931 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1936 (long) current_gdbarch->register_convert_to_virtual
1937 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1939 #ifdef REGISTER_NAME
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: %s # %s\n",
1942 "REGISTER_NAME(regnr)",
1943 XSTRING (REGISTER_NAME (regnr)));
1945 fprintf_unfiltered (file,
1946 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1947 (long) current_gdbarch->register_name
1948 /*REGISTER_NAME ()*/);
1950 #ifdef REGISTER_RAW_SIZE
1951 fprintf_unfiltered (file,
1952 "gdbarch_dump: %s # %s\n",
1953 "REGISTER_RAW_SIZE(reg_nr)",
1954 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1956 fprintf_unfiltered (file,
1957 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
1958 (long) current_gdbarch->register_raw_size
1959 /*REGISTER_RAW_SIZE ()*/);
1961 #ifdef REGISTER_SIM_REGNO
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: %s # %s\n",
1964 "REGISTER_SIM_REGNO(reg_nr)",
1965 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1967 fprintf_unfiltered (file,
1968 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1969 (long) current_gdbarch->register_sim_regno
1970 /*REGISTER_SIM_REGNO ()*/);
1972 #ifdef REGISTER_SIZE
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: REGISTER_SIZE # %s\n",
1975 XSTRING (REGISTER_SIZE));
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: REGISTER_SIZE = %d\n",
1980 #ifdef REGISTER_TO_VALUE
1982 /* Macro might contain `[{}]' when not multi-arch */
1983 fprintf_unfiltered (file,
1984 "gdbarch_dump: %s # %s\n",
1985 "REGISTER_TO_VALUE(regnum, type, from, to)",
1986 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1991 (long) current_gdbarch->register_to_value
1992 /*REGISTER_TO_VALUE ()*/);
1994 #ifdef REGISTER_VIRTUAL_SIZE
1995 fprintf_unfiltered (file,
1996 "gdbarch_dump: %s # %s\n",
1997 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1998 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2000 fprintf_unfiltered (file,
2001 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2002 (long) current_gdbarch->register_virtual_size
2003 /*REGISTER_VIRTUAL_SIZE ()*/);
2005 #ifdef REGISTER_VIRTUAL_TYPE
2006 fprintf_unfiltered (file,
2007 "gdbarch_dump: %s # %s\n",
2008 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2009 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2011 fprintf_unfiltered (file,
2012 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2013 (long) current_gdbarch->register_virtual_type
2014 /*REGISTER_VIRTUAL_TYPE ()*/);
2016 #ifdef REG_STRUCT_HAS_ADDR_P
2017 fprintf_unfiltered (file,
2018 "gdbarch_dump: %s # %s\n",
2019 "REG_STRUCT_HAS_ADDR_P()",
2020 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2021 fprintf_unfiltered (file,
2022 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2023 REG_STRUCT_HAS_ADDR_P ());
2025 #ifdef REG_STRUCT_HAS_ADDR
2026 fprintf_unfiltered (file,
2027 "gdbarch_dump: %s # %s\n",
2028 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2029 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2031 fprintf_unfiltered (file,
2032 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2033 (long) current_gdbarch->reg_struct_has_addr
2034 /*REG_STRUCT_HAS_ADDR ()*/);
2036 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2038 /* Macro might contain `[{}]' when not multi-arch */
2039 fprintf_unfiltered (file,
2040 "gdbarch_dump: %s # %s\n",
2041 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2042 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2045 fprintf_unfiltered (file,
2046 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2047 (long) current_gdbarch->remote_translate_xfer_address
2048 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2050 #ifdef RETURN_VALUE_ON_STACK
2051 fprintf_unfiltered (file,
2052 "gdbarch_dump: %s # %s\n",
2053 "RETURN_VALUE_ON_STACK(type)",
2054 XSTRING (RETURN_VALUE_ON_STACK (type)));
2056 fprintf_unfiltered (file,
2057 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2058 (long) current_gdbarch->return_value_on_stack
2059 /*RETURN_VALUE_ON_STACK ()*/);
2061 #ifdef SAVED_PC_AFTER_CALL
2062 fprintf_unfiltered (file,
2063 "gdbarch_dump: %s # %s\n",
2064 "SAVED_PC_AFTER_CALL(frame)",
2065 XSTRING (SAVED_PC_AFTER_CALL (frame)));
2067 fprintf_unfiltered (file,
2068 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2069 (long) current_gdbarch->saved_pc_after_call
2070 /*SAVED_PC_AFTER_CALL ()*/);
2072 #ifdef SAVE_DUMMY_FRAME_TOS_P
2073 fprintf_unfiltered (file,
2074 "gdbarch_dump: %s # %s\n",
2075 "SAVE_DUMMY_FRAME_TOS_P()",
2076 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2077 fprintf_unfiltered (file,
2078 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2079 SAVE_DUMMY_FRAME_TOS_P ());
2081 #ifdef SAVE_DUMMY_FRAME_TOS
2083 /* Macro might contain `[{}]' when not multi-arch */
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: %s # %s\n",
2086 "SAVE_DUMMY_FRAME_TOS(sp)",
2087 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2090 fprintf_unfiltered (file,
2091 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2092 (long) current_gdbarch->save_dummy_frame_tos
2093 /*SAVE_DUMMY_FRAME_TOS ()*/);
2095 #ifdef SDB_REG_TO_REGNUM
2096 fprintf_unfiltered (file,
2097 "gdbarch_dump: %s # %s\n",
2098 "SDB_REG_TO_REGNUM(sdb_regnr)",
2099 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2101 fprintf_unfiltered (file,
2102 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2103 (long) current_gdbarch->sdb_reg_to_regnum
2104 /*SDB_REG_TO_REGNUM ()*/);
2106 #ifdef SIGTRAMP_END_P
2107 fprintf_unfiltered (file,
2108 "gdbarch_dump: %s # %s\n",
2110 XSTRING (SIGTRAMP_END_P ()));
2111 fprintf_unfiltered (file,
2112 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2116 fprintf_unfiltered (file,
2117 "gdbarch_dump: %s # %s\n",
2119 XSTRING (SIGTRAMP_END (pc)));
2121 fprintf_unfiltered (file,
2122 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2123 (long) current_gdbarch->sigtramp_end
2124 /*SIGTRAMP_END ()*/);
2126 #ifdef SIGTRAMP_START_P
2127 fprintf_unfiltered (file,
2128 "gdbarch_dump: %s # %s\n",
2129 "SIGTRAMP_START_P()",
2130 XSTRING (SIGTRAMP_START_P ()));
2131 fprintf_unfiltered (file,
2132 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2133 SIGTRAMP_START_P ());
2135 #ifdef SIGTRAMP_START
2136 fprintf_unfiltered (file,
2137 "gdbarch_dump: %s # %s\n",
2138 "SIGTRAMP_START(pc)",
2139 XSTRING (SIGTRAMP_START (pc)));
2141 fprintf_unfiltered (file,
2142 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2143 (long) current_gdbarch->sigtramp_start
2144 /*SIGTRAMP_START ()*/);
2146 #ifdef SIZEOF_CALL_DUMMY_WORDS
2147 fprintf_unfiltered (file,
2148 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2149 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
2150 fprintf_unfiltered (file,
2151 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
2152 (long) SIZEOF_CALL_DUMMY_WORDS);
2154 #ifdef SKIP_PROLOGUE
2155 fprintf_unfiltered (file,
2156 "gdbarch_dump: %s # %s\n",
2157 "SKIP_PROLOGUE(ip)",
2158 XSTRING (SKIP_PROLOGUE (ip)));
2160 fprintf_unfiltered (file,
2161 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2162 (long) current_gdbarch->skip_prologue
2163 /*SKIP_PROLOGUE ()*/);
2165 #ifdef SKIP_TRAMPOLINE_CODE
2166 fprintf_unfiltered (file,
2167 "gdbarch_dump: %s # %s\n",
2168 "SKIP_TRAMPOLINE_CODE(pc)",
2169 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2171 fprintf_unfiltered (file,
2172 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2173 (long) current_gdbarch->skip_trampoline_code
2174 /*SKIP_TRAMPOLINE_CODE ()*/);
2176 #ifdef SMASH_TEXT_ADDRESS
2177 fprintf_unfiltered (file,
2178 "gdbarch_dump: %s # %s\n",
2179 "SMASH_TEXT_ADDRESS(addr)",
2180 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2182 fprintf_unfiltered (file,
2183 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2184 (long) current_gdbarch->smash_text_address
2185 /*SMASH_TEXT_ADDRESS ()*/);
2187 #ifdef SOFTWARE_SINGLE_STEP_P
2188 fprintf_unfiltered (file,
2189 "gdbarch_dump: %s # %s\n",
2190 "SOFTWARE_SINGLE_STEP_P()",
2191 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2192 fprintf_unfiltered (file,
2193 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2194 SOFTWARE_SINGLE_STEP_P ());
2196 #ifdef SOFTWARE_SINGLE_STEP
2198 /* Macro might contain `[{}]' when not multi-arch */
2199 fprintf_unfiltered (file,
2200 "gdbarch_dump: %s # %s\n",
2201 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2202 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2205 fprintf_unfiltered (file,
2206 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2207 (long) current_gdbarch->software_single_step
2208 /*SOFTWARE_SINGLE_STEP ()*/);
2211 fprintf_unfiltered (file,
2212 "gdbarch_dump: SP_REGNUM # %s\n",
2213 XSTRING (SP_REGNUM));
2214 fprintf_unfiltered (file,
2215 "gdbarch_dump: SP_REGNUM = %d\n",
2218 #ifdef STAB_REG_TO_REGNUM
2219 fprintf_unfiltered (file,
2220 "gdbarch_dump: %s # %s\n",
2221 "STAB_REG_TO_REGNUM(stab_regnr)",
2222 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2224 fprintf_unfiltered (file,
2225 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2226 (long) current_gdbarch->stab_reg_to_regnum
2227 /*STAB_REG_TO_REGNUM ()*/);
2229 #ifdef STACK_ALIGN_P
2230 fprintf_unfiltered (file,
2231 "gdbarch_dump: %s # %s\n",
2233 XSTRING (STACK_ALIGN_P ()));
2234 fprintf_unfiltered (file,
2235 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2239 fprintf_unfiltered (file,
2240 "gdbarch_dump: %s # %s\n",
2242 XSTRING (STACK_ALIGN (sp)));
2244 fprintf_unfiltered (file,
2245 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2246 (long) current_gdbarch->stack_align
2247 /*STACK_ALIGN ()*/);
2249 #ifdef STORE_RETURN_VALUE
2251 /* Macro might contain `[{}]' when not multi-arch */
2252 fprintf_unfiltered (file,
2253 "gdbarch_dump: %s # %s\n",
2254 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2255 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2258 fprintf_unfiltered (file,
2259 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2260 (long) current_gdbarch->store_return_value
2261 /*STORE_RETURN_VALUE ()*/);
2263 #ifdef STORE_STRUCT_RETURN
2265 /* Macro might contain `[{}]' when not multi-arch */
2266 fprintf_unfiltered (file,
2267 "gdbarch_dump: %s # %s\n",
2268 "STORE_STRUCT_RETURN(addr, sp)",
2269 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
2272 fprintf_unfiltered (file,
2273 "gdbarch_dump: STORE_STRUCT_RETURN = <0x%08lx>\n",
2274 (long) current_gdbarch->store_struct_return
2275 /*STORE_STRUCT_RETURN ()*/);
2277 #ifdef TARGET_ADDR_BIT
2278 fprintf_unfiltered (file,
2279 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2280 XSTRING (TARGET_ADDR_BIT));
2281 fprintf_unfiltered (file,
2282 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2285 #ifdef TARGET_ARCHITECTURE
2286 fprintf_unfiltered (file,
2287 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2288 XSTRING (TARGET_ARCHITECTURE));
2289 if (TARGET_ARCHITECTURE != NULL)
2290 fprintf_unfiltered (file,
2291 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2292 TARGET_ARCHITECTURE->printable_name);
2294 #ifdef TARGET_BFD_VMA_BIT
2295 fprintf_unfiltered (file,
2296 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2297 XSTRING (TARGET_BFD_VMA_BIT));
2298 fprintf_unfiltered (file,
2299 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2300 TARGET_BFD_VMA_BIT);
2302 #ifdef TARGET_BYTE_ORDER
2303 fprintf_unfiltered (file,
2304 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2305 XSTRING (TARGET_BYTE_ORDER));
2306 fprintf_unfiltered (file,
2307 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2308 (long) TARGET_BYTE_ORDER);
2310 #ifdef TARGET_CHAR_SIGNED
2311 fprintf_unfiltered (file,
2312 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2313 XSTRING (TARGET_CHAR_SIGNED));
2314 fprintf_unfiltered (file,
2315 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2316 TARGET_CHAR_SIGNED);
2318 #ifdef TARGET_DOUBLE_BIT
2319 fprintf_unfiltered (file,
2320 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2321 XSTRING (TARGET_DOUBLE_BIT));
2322 fprintf_unfiltered (file,
2323 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2326 #ifdef TARGET_DOUBLE_FORMAT
2327 fprintf_unfiltered (file,
2328 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2329 XSTRING (TARGET_DOUBLE_FORMAT));
2330 fprintf_unfiltered (file,
2331 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2332 (TARGET_DOUBLE_FORMAT)->name);
2334 #ifdef TARGET_FLOAT_BIT
2335 fprintf_unfiltered (file,
2336 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2337 XSTRING (TARGET_FLOAT_BIT));
2338 fprintf_unfiltered (file,
2339 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2342 #ifdef TARGET_FLOAT_FORMAT
2343 fprintf_unfiltered (file,
2344 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2345 XSTRING (TARGET_FLOAT_FORMAT));
2346 fprintf_unfiltered (file,
2347 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2348 (TARGET_FLOAT_FORMAT)->name);
2350 #ifdef TARGET_INT_BIT
2351 fprintf_unfiltered (file,
2352 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2353 XSTRING (TARGET_INT_BIT));
2354 fprintf_unfiltered (file,
2355 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2358 #ifdef TARGET_LONG_BIT
2359 fprintf_unfiltered (file,
2360 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2361 XSTRING (TARGET_LONG_BIT));
2362 fprintf_unfiltered (file,
2363 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2366 #ifdef TARGET_LONG_DOUBLE_BIT
2367 fprintf_unfiltered (file,
2368 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2369 XSTRING (TARGET_LONG_DOUBLE_BIT));
2370 fprintf_unfiltered (file,
2371 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2372 TARGET_LONG_DOUBLE_BIT);
2374 #ifdef TARGET_LONG_DOUBLE_FORMAT
2375 fprintf_unfiltered (file,
2376 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2377 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2378 fprintf_unfiltered (file,
2379 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2380 (TARGET_LONG_DOUBLE_FORMAT)->name);
2382 #ifdef TARGET_LONG_LONG_BIT
2383 fprintf_unfiltered (file,
2384 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2385 XSTRING (TARGET_LONG_LONG_BIT));
2386 fprintf_unfiltered (file,
2387 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2388 TARGET_LONG_LONG_BIT);
2390 #ifdef TARGET_PRINT_INSN
2391 fprintf_unfiltered (file,
2392 "gdbarch_dump: %s # %s\n",
2393 "TARGET_PRINT_INSN(vma, info)",
2394 XSTRING (TARGET_PRINT_INSN (vma, info)));
2396 fprintf_unfiltered (file,
2397 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2398 (long) current_gdbarch->print_insn
2399 /*TARGET_PRINT_INSN ()*/);
2401 #ifdef TARGET_PTR_BIT
2402 fprintf_unfiltered (file,
2403 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2404 XSTRING (TARGET_PTR_BIT));
2405 fprintf_unfiltered (file,
2406 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2409 #ifdef TARGET_READ_FP
2410 fprintf_unfiltered (file,
2411 "gdbarch_dump: %s # %s\n",
2413 XSTRING (TARGET_READ_FP ()));
2415 fprintf_unfiltered (file,
2416 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2417 (long) current_gdbarch->read_fp
2418 /*TARGET_READ_FP ()*/);
2420 #ifdef TARGET_READ_PC
2421 fprintf_unfiltered (file,
2422 "gdbarch_dump: %s # %s\n",
2423 "TARGET_READ_PC(ptid)",
2424 XSTRING (TARGET_READ_PC (ptid)));
2426 fprintf_unfiltered (file,
2427 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2428 (long) current_gdbarch->read_pc
2429 /*TARGET_READ_PC ()*/);
2431 #ifdef TARGET_READ_SP
2432 fprintf_unfiltered (file,
2433 "gdbarch_dump: %s # %s\n",
2435 XSTRING (TARGET_READ_SP ()));
2437 fprintf_unfiltered (file,
2438 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2439 (long) current_gdbarch->read_sp
2440 /*TARGET_READ_SP ()*/);
2442 #ifdef TARGET_SHORT_BIT
2443 fprintf_unfiltered (file,
2444 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2445 XSTRING (TARGET_SHORT_BIT));
2446 fprintf_unfiltered (file,
2447 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2450 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2452 /* Macro might contain `[{}]' when not multi-arch */
2453 fprintf_unfiltered (file,
2454 "gdbarch_dump: %s # %s\n",
2455 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2456 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2459 fprintf_unfiltered (file,
2460 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2461 (long) current_gdbarch->virtual_frame_pointer
2462 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2464 #ifdef TARGET_WRITE_PC
2466 /* Macro might contain `[{}]' when not multi-arch */
2467 fprintf_unfiltered (file,
2468 "gdbarch_dump: %s # %s\n",
2469 "TARGET_WRITE_PC(val, ptid)",
2470 XSTRING (TARGET_WRITE_PC (val, ptid)));
2473 fprintf_unfiltered (file,
2474 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2475 (long) current_gdbarch->write_pc
2476 /*TARGET_WRITE_PC ()*/);
2478 #ifdef TARGET_WRITE_SP
2480 /* Macro might contain `[{}]' when not multi-arch */
2481 fprintf_unfiltered (file,
2482 "gdbarch_dump: %s # %s\n",
2483 "TARGET_WRITE_SP(val)",
2484 XSTRING (TARGET_WRITE_SP (val)));
2487 fprintf_unfiltered (file,
2488 "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
2489 (long) current_gdbarch->write_sp
2490 /*TARGET_WRITE_SP ()*/);
2492 #ifdef USE_STRUCT_CONVENTION
2493 fprintf_unfiltered (file,
2494 "gdbarch_dump: %s # %s\n",
2495 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2496 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2498 fprintf_unfiltered (file,
2499 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2500 (long) current_gdbarch->use_struct_convention
2501 /*USE_STRUCT_CONVENTION ()*/);
2503 #ifdef VALUE_TO_REGISTER
2505 /* Macro might contain `[{}]' when not multi-arch */
2506 fprintf_unfiltered (file,
2507 "gdbarch_dump: %s # %s\n",
2508 "VALUE_TO_REGISTER(type, regnum, from, to)",
2509 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2512 fprintf_unfiltered (file,
2513 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2514 (long) current_gdbarch->value_to_register
2515 /*VALUE_TO_REGISTER ()*/);
2517 if (current_gdbarch->dump_tdep != NULL)
2518 current_gdbarch->dump_tdep (current_gdbarch, file);
2521 struct gdbarch_tdep *
2522 gdbarch_tdep (struct gdbarch *gdbarch)
2524 if (gdbarch_debug >= 2)
2525 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2526 return gdbarch->tdep;
2530 const struct bfd_arch_info *
2531 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2533 gdb_assert (gdbarch != NULL);
2534 if (gdbarch_debug >= 2)
2535 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2536 return gdbarch->bfd_arch_info;
2540 gdbarch_byte_order (struct gdbarch *gdbarch)
2542 gdb_assert (gdbarch != NULL);
2543 if (gdbarch_debug >= 2)
2544 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2545 return gdbarch->byte_order;
2549 gdbarch_short_bit (struct gdbarch *gdbarch)
2551 gdb_assert (gdbarch != NULL);
2552 /* Skip verify of short_bit, invalid_p == 0 */
2553 if (gdbarch_debug >= 2)
2554 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2555 return gdbarch->short_bit;
2559 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2562 gdbarch->short_bit = short_bit;
2566 gdbarch_int_bit (struct gdbarch *gdbarch)
2568 gdb_assert (gdbarch != NULL);
2569 /* Skip verify of int_bit, invalid_p == 0 */
2570 if (gdbarch_debug >= 2)
2571 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2572 return gdbarch->int_bit;
2576 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2579 gdbarch->int_bit = int_bit;
2583 gdbarch_long_bit (struct gdbarch *gdbarch)
2585 gdb_assert (gdbarch != NULL);
2586 /* Skip verify of long_bit, invalid_p == 0 */
2587 if (gdbarch_debug >= 2)
2588 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2589 return gdbarch->long_bit;
2593 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2596 gdbarch->long_bit = long_bit;
2600 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2602 gdb_assert (gdbarch != NULL);
2603 /* Skip verify of long_long_bit, invalid_p == 0 */
2604 if (gdbarch_debug >= 2)
2605 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2606 return gdbarch->long_long_bit;
2610 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2613 gdbarch->long_long_bit = long_long_bit;
2617 gdbarch_float_bit (struct gdbarch *gdbarch)
2619 gdb_assert (gdbarch != NULL);
2620 /* Skip verify of float_bit, invalid_p == 0 */
2621 if (gdbarch_debug >= 2)
2622 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2623 return gdbarch->float_bit;
2627 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2630 gdbarch->float_bit = float_bit;
2634 gdbarch_double_bit (struct gdbarch *gdbarch)
2636 gdb_assert (gdbarch != NULL);
2637 /* Skip verify of double_bit, invalid_p == 0 */
2638 if (gdbarch_debug >= 2)
2639 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2640 return gdbarch->double_bit;
2644 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2647 gdbarch->double_bit = double_bit;
2651 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2653 gdb_assert (gdbarch != NULL);
2654 /* Skip verify of long_double_bit, invalid_p == 0 */
2655 if (gdbarch_debug >= 2)
2656 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2657 return gdbarch->long_double_bit;
2661 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2662 int long_double_bit)
2664 gdbarch->long_double_bit = long_double_bit;
2668 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2670 gdb_assert (gdbarch != NULL);
2671 /* Skip verify of ptr_bit, invalid_p == 0 */
2672 if (gdbarch_debug >= 2)
2673 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2674 return gdbarch->ptr_bit;
2678 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2681 gdbarch->ptr_bit = ptr_bit;
2685 gdbarch_addr_bit (struct gdbarch *gdbarch)
2687 gdb_assert (gdbarch != NULL);
2688 if (gdbarch->addr_bit == 0)
2689 internal_error (__FILE__, __LINE__,
2690 "gdbarch: gdbarch_addr_bit invalid");
2691 if (gdbarch_debug >= 2)
2692 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2693 return gdbarch->addr_bit;
2697 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2700 gdbarch->addr_bit = addr_bit;
2704 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2706 gdb_assert (gdbarch != NULL);
2707 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2708 if (gdbarch_debug >= 2)
2709 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2710 return gdbarch->bfd_vma_bit;
2714 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2717 gdbarch->bfd_vma_bit = bfd_vma_bit;
2721 gdbarch_char_signed (struct gdbarch *gdbarch)
2723 gdb_assert (gdbarch != NULL);
2724 if (gdbarch->char_signed == -1)
2725 internal_error (__FILE__, __LINE__,
2726 "gdbarch: gdbarch_char_signed invalid");
2727 if (gdbarch_debug >= 2)
2728 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2729 return gdbarch->char_signed;
2733 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2736 gdbarch->char_signed = char_signed;
2740 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2742 gdb_assert (gdbarch != NULL);
2743 if (gdbarch->read_pc == 0)
2744 internal_error (__FILE__, __LINE__,
2745 "gdbarch: gdbarch_read_pc invalid");
2746 if (gdbarch_debug >= 2)
2747 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2748 return gdbarch->read_pc (ptid);
2752 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2753 gdbarch_read_pc_ftype read_pc)
2755 gdbarch->read_pc = read_pc;
2759 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2761 gdb_assert (gdbarch != NULL);
2762 if (gdbarch->write_pc == 0)
2763 internal_error (__FILE__, __LINE__,
2764 "gdbarch: gdbarch_write_pc invalid");
2765 if (gdbarch_debug >= 2)
2766 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2767 gdbarch->write_pc (val, ptid);
2771 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2772 gdbarch_write_pc_ftype write_pc)
2774 gdbarch->write_pc = write_pc;
2778 gdbarch_read_fp (struct gdbarch *gdbarch)
2780 gdb_assert (gdbarch != NULL);
2781 if (gdbarch->read_fp == 0)
2782 internal_error (__FILE__, __LINE__,
2783 "gdbarch: gdbarch_read_fp invalid");
2784 if (gdbarch_debug >= 2)
2785 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2786 return gdbarch->read_fp ();
2790 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2791 gdbarch_read_fp_ftype read_fp)
2793 gdbarch->read_fp = read_fp;
2797 gdbarch_read_sp (struct gdbarch *gdbarch)
2799 gdb_assert (gdbarch != NULL);
2800 if (gdbarch->read_sp == 0)
2801 internal_error (__FILE__, __LINE__,
2802 "gdbarch: gdbarch_read_sp invalid");
2803 if (gdbarch_debug >= 2)
2804 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2805 return gdbarch->read_sp ();
2809 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2810 gdbarch_read_sp_ftype read_sp)
2812 gdbarch->read_sp = read_sp;
2816 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2818 gdb_assert (gdbarch != NULL);
2819 if (gdbarch->write_sp == 0)
2820 internal_error (__FILE__, __LINE__,
2821 "gdbarch: gdbarch_write_sp invalid");
2822 if (gdbarch_debug >= 2)
2823 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2824 gdbarch->write_sp (val);
2828 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2829 gdbarch_write_sp_ftype write_sp)
2831 gdbarch->write_sp = write_sp;
2835 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2837 gdb_assert (gdbarch != NULL);
2838 if (gdbarch->virtual_frame_pointer == 0)
2839 internal_error (__FILE__, __LINE__,
2840 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2841 if (gdbarch_debug >= 2)
2842 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2843 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2847 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2848 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2850 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2854 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2856 gdb_assert (gdbarch != NULL);
2857 return gdbarch->pseudo_register_read != 0;
2861 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2863 gdb_assert (gdbarch != NULL);
2864 if (gdbarch->pseudo_register_read == 0)
2865 internal_error (__FILE__, __LINE__,
2866 "gdbarch: gdbarch_pseudo_register_read invalid");
2867 if (gdbarch_debug >= 2)
2868 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2869 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2873 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2874 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2876 gdbarch->pseudo_register_read = pseudo_register_read;
2880 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2882 gdb_assert (gdbarch != NULL);
2883 return gdbarch->pseudo_register_write != 0;
2887 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2889 gdb_assert (gdbarch != NULL);
2890 if (gdbarch->pseudo_register_write == 0)
2891 internal_error (__FILE__, __LINE__,
2892 "gdbarch: gdbarch_pseudo_register_write invalid");
2893 if (gdbarch_debug >= 2)
2894 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2895 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2899 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2900 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2902 gdbarch->pseudo_register_write = pseudo_register_write;
2906 gdbarch_num_regs (struct gdbarch *gdbarch)
2908 gdb_assert (gdbarch != NULL);
2909 if (gdbarch->num_regs == -1)
2910 internal_error (__FILE__, __LINE__,
2911 "gdbarch: gdbarch_num_regs invalid");
2912 if (gdbarch_debug >= 2)
2913 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2914 return gdbarch->num_regs;
2918 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2921 gdbarch->num_regs = num_regs;
2925 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2927 gdb_assert (gdbarch != NULL);
2928 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2929 if (gdbarch_debug >= 2)
2930 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2931 return gdbarch->num_pseudo_regs;
2935 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2936 int num_pseudo_regs)
2938 gdbarch->num_pseudo_regs = num_pseudo_regs;
2942 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2944 gdb_assert (gdbarch != NULL);
2945 /* Skip verify of sp_regnum, invalid_p == 0 */
2946 if (gdbarch_debug >= 2)
2947 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2948 return gdbarch->sp_regnum;
2952 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2955 gdbarch->sp_regnum = sp_regnum;
2959 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2961 gdb_assert (gdbarch != NULL);
2962 /* Skip verify of fp_regnum, invalid_p == 0 */
2963 if (gdbarch_debug >= 2)
2964 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2965 return gdbarch->fp_regnum;
2969 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2972 gdbarch->fp_regnum = fp_regnum;
2976 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2978 gdb_assert (gdbarch != NULL);
2979 /* Skip verify of pc_regnum, invalid_p == 0 */
2980 if (gdbarch_debug >= 2)
2981 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2982 return gdbarch->pc_regnum;
2986 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2989 gdbarch->pc_regnum = pc_regnum;
2993 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2995 gdb_assert (gdbarch != NULL);
2996 /* Skip verify of ps_regnum, invalid_p == 0 */
2997 if (gdbarch_debug >= 2)
2998 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2999 return gdbarch->ps_regnum;
3003 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3006 gdbarch->ps_regnum = ps_regnum;
3010 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3012 gdb_assert (gdbarch != NULL);
3013 /* Skip verify of fp0_regnum, invalid_p == 0 */
3014 if (gdbarch_debug >= 2)
3015 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3016 return gdbarch->fp0_regnum;
3020 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3023 gdbarch->fp0_regnum = fp0_regnum;
3027 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3029 gdb_assert (gdbarch != NULL);
3030 /* Skip verify of npc_regnum, invalid_p == 0 */
3031 if (gdbarch_debug >= 2)
3032 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3033 return gdbarch->npc_regnum;
3037 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3040 gdbarch->npc_regnum = npc_regnum;
3044 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3046 gdb_assert (gdbarch != NULL);
3047 if (gdbarch->stab_reg_to_regnum == 0)
3048 internal_error (__FILE__, __LINE__,
3049 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3050 if (gdbarch_debug >= 2)
3051 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3052 return gdbarch->stab_reg_to_regnum (stab_regnr);
3056 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3057 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3059 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3063 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3065 gdb_assert (gdbarch != NULL);
3066 if (gdbarch->ecoff_reg_to_regnum == 0)
3067 internal_error (__FILE__, __LINE__,
3068 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3069 if (gdbarch_debug >= 2)
3070 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3071 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3075 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3076 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3078 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3082 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3084 gdb_assert (gdbarch != NULL);
3085 if (gdbarch->dwarf_reg_to_regnum == 0)
3086 internal_error (__FILE__, __LINE__,
3087 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3088 if (gdbarch_debug >= 2)
3089 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3090 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3094 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3095 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3097 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3101 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3103 gdb_assert (gdbarch != NULL);
3104 if (gdbarch->sdb_reg_to_regnum == 0)
3105 internal_error (__FILE__, __LINE__,
3106 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3107 if (gdbarch_debug >= 2)
3108 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3109 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3113 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3114 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3116 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3120 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3122 gdb_assert (gdbarch != NULL);
3123 if (gdbarch->dwarf2_reg_to_regnum == 0)
3124 internal_error (__FILE__, __LINE__,
3125 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3126 if (gdbarch_debug >= 2)
3127 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3128 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3132 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3133 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3135 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3139 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3141 gdb_assert (gdbarch != NULL);
3142 if (gdbarch->register_name == 0)
3143 internal_error (__FILE__, __LINE__,
3144 "gdbarch: gdbarch_register_name invalid");
3145 if (gdbarch_debug >= 2)
3146 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3147 return gdbarch->register_name (regnr);
3151 set_gdbarch_register_name (struct gdbarch *gdbarch,
3152 gdbarch_register_name_ftype register_name)
3154 gdbarch->register_name = register_name;
3158 gdbarch_register_size (struct gdbarch *gdbarch)
3160 gdb_assert (gdbarch != NULL);
3161 if (gdbarch->register_size == -1)
3162 internal_error (__FILE__, __LINE__,
3163 "gdbarch: gdbarch_register_size invalid");
3164 if (gdbarch_debug >= 2)
3165 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
3166 return gdbarch->register_size;
3170 set_gdbarch_register_size (struct gdbarch *gdbarch,
3173 gdbarch->register_size = register_size;
3177 gdbarch_register_bytes (struct gdbarch *gdbarch)
3179 gdb_assert (gdbarch != NULL);
3180 if (gdbarch->register_bytes == -1)
3181 internal_error (__FILE__, __LINE__,
3182 "gdbarch: gdbarch_register_bytes invalid");
3183 if (gdbarch_debug >= 2)
3184 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3185 return gdbarch->register_bytes;
3189 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3192 gdbarch->register_bytes = register_bytes;
3196 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3198 gdb_assert (gdbarch != NULL);
3199 if (gdbarch->register_byte == 0)
3200 internal_error (__FILE__, __LINE__,
3201 "gdbarch: gdbarch_register_byte invalid");
3202 if (gdbarch_debug >= 2)
3203 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3204 return gdbarch->register_byte (reg_nr);
3208 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3209 gdbarch_register_byte_ftype register_byte)
3211 gdbarch->register_byte = register_byte;
3215 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3217 gdb_assert (gdbarch != NULL);
3218 if (gdbarch->register_raw_size == 0)
3219 internal_error (__FILE__, __LINE__,
3220 "gdbarch: gdbarch_register_raw_size invalid");
3221 if (gdbarch_debug >= 2)
3222 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3223 return gdbarch->register_raw_size (reg_nr);
3227 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3228 gdbarch_register_raw_size_ftype register_raw_size)
3230 gdbarch->register_raw_size = register_raw_size;
3234 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
3236 gdb_assert (gdbarch != NULL);
3237 if (gdbarch->max_register_raw_size == -1)
3238 internal_error (__FILE__, __LINE__,
3239 "gdbarch: gdbarch_max_register_raw_size invalid");
3240 if (gdbarch_debug >= 2)
3241 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
3242 return gdbarch->max_register_raw_size;
3246 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
3247 int max_register_raw_size)
3249 gdbarch->max_register_raw_size = max_register_raw_size;
3253 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3255 gdb_assert (gdbarch != NULL);
3256 if (gdbarch->register_virtual_size == 0)
3257 internal_error (__FILE__, __LINE__,
3258 "gdbarch: gdbarch_register_virtual_size invalid");
3259 if (gdbarch_debug >= 2)
3260 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3261 return gdbarch->register_virtual_size (reg_nr);
3265 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3266 gdbarch_register_virtual_size_ftype register_virtual_size)
3268 gdbarch->register_virtual_size = register_virtual_size;
3272 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
3274 gdb_assert (gdbarch != NULL);
3275 if (gdbarch->max_register_virtual_size == -1)
3276 internal_error (__FILE__, __LINE__,
3277 "gdbarch: gdbarch_max_register_virtual_size invalid");
3278 if (gdbarch_debug >= 2)
3279 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
3280 return gdbarch->max_register_virtual_size;
3284 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
3285 int max_register_virtual_size)
3287 gdbarch->max_register_virtual_size = max_register_virtual_size;
3291 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3293 gdb_assert (gdbarch != NULL);
3294 if (gdbarch->register_virtual_type == 0)
3295 internal_error (__FILE__, __LINE__,
3296 "gdbarch: gdbarch_register_virtual_type invalid");
3297 if (gdbarch_debug >= 2)
3298 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3299 return gdbarch->register_virtual_type (reg_nr);
3303 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3304 gdbarch_register_virtual_type_ftype register_virtual_type)
3306 gdbarch->register_virtual_type = register_virtual_type;
3310 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3312 gdb_assert (gdbarch != NULL);
3313 return gdbarch->deprecated_do_registers_info != 0;
3317 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3319 gdb_assert (gdbarch != NULL);
3320 if (gdbarch->deprecated_do_registers_info == 0)
3321 internal_error (__FILE__, __LINE__,
3322 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3323 if (gdbarch_debug >= 2)
3324 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3325 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3329 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3330 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3332 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3336 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3338 gdb_assert (gdbarch != NULL);
3339 if (gdbarch->print_registers_info == 0)
3340 internal_error (__FILE__, __LINE__,
3341 "gdbarch: gdbarch_print_registers_info invalid");
3342 if (gdbarch_debug >= 2)
3343 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3344 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3348 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3349 gdbarch_print_registers_info_ftype print_registers_info)
3351 gdbarch->print_registers_info = print_registers_info;
3355 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3357 gdb_assert (gdbarch != NULL);
3358 return gdbarch->print_float_info != 0;
3362 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3364 gdb_assert (gdbarch != NULL);
3365 if (gdbarch->print_float_info == 0)
3366 internal_error (__FILE__, __LINE__,
3367 "gdbarch: gdbarch_print_float_info invalid");
3368 if (gdbarch_debug >= 2)
3369 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3370 gdbarch->print_float_info (gdbarch, file, frame, args);
3374 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3375 gdbarch_print_float_info_ftype print_float_info)
3377 gdbarch->print_float_info = print_float_info;
3381 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3383 gdb_assert (gdbarch != NULL);
3384 return gdbarch->print_vector_info != 0;
3388 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3390 gdb_assert (gdbarch != NULL);
3391 if (gdbarch->print_vector_info == 0)
3392 internal_error (__FILE__, __LINE__,
3393 "gdbarch: gdbarch_print_vector_info invalid");
3394 if (gdbarch_debug >= 2)
3395 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3396 gdbarch->print_vector_info (gdbarch, file, frame, args);
3400 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3401 gdbarch_print_vector_info_ftype print_vector_info)
3403 gdbarch->print_vector_info = print_vector_info;
3407 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3409 gdb_assert (gdbarch != NULL);
3410 if (gdbarch->register_sim_regno == 0)
3411 internal_error (__FILE__, __LINE__,
3412 "gdbarch: gdbarch_register_sim_regno invalid");
3413 if (gdbarch_debug >= 2)
3414 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3415 return gdbarch->register_sim_regno (reg_nr);
3419 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3420 gdbarch_register_sim_regno_ftype register_sim_regno)
3422 gdbarch->register_sim_regno = register_sim_regno;
3426 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3428 gdb_assert (gdbarch != NULL);
3429 return gdbarch->register_bytes_ok != 0;
3433 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3435 gdb_assert (gdbarch != NULL);
3436 if (gdbarch->register_bytes_ok == 0)
3437 internal_error (__FILE__, __LINE__,
3438 "gdbarch: gdbarch_register_bytes_ok invalid");
3439 if (gdbarch_debug >= 2)
3440 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3441 return gdbarch->register_bytes_ok (nr_bytes);
3445 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3446 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3448 gdbarch->register_bytes_ok = register_bytes_ok;
3452 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3454 gdb_assert (gdbarch != NULL);
3455 if (gdbarch->cannot_fetch_register == 0)
3456 internal_error (__FILE__, __LINE__,
3457 "gdbarch: gdbarch_cannot_fetch_register invalid");
3458 if (gdbarch_debug >= 2)
3459 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3460 return gdbarch->cannot_fetch_register (regnum);
3464 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3465 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3467 gdbarch->cannot_fetch_register = cannot_fetch_register;
3471 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3473 gdb_assert (gdbarch != NULL);
3474 if (gdbarch->cannot_store_register == 0)
3475 internal_error (__FILE__, __LINE__,
3476 "gdbarch: gdbarch_cannot_store_register invalid");
3477 if (gdbarch_debug >= 2)
3478 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3479 return gdbarch->cannot_store_register (regnum);
3483 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3484 gdbarch_cannot_store_register_ftype cannot_store_register)
3486 gdbarch->cannot_store_register = cannot_store_register;
3490 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3492 gdb_assert (gdbarch != NULL);
3493 return gdbarch->get_longjmp_target != 0;
3497 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3499 gdb_assert (gdbarch != NULL);
3500 if (gdbarch->get_longjmp_target == 0)
3501 internal_error (__FILE__, __LINE__,
3502 "gdbarch: gdbarch_get_longjmp_target invalid");
3503 if (gdbarch_debug >= 2)
3504 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3505 return gdbarch->get_longjmp_target (pc);
3509 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3510 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3512 gdbarch->get_longjmp_target = get_longjmp_target;
3516 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3518 gdb_assert (gdbarch != NULL);
3519 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3520 if (gdbarch_debug >= 2)
3521 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3522 return gdbarch->deprecated_use_generic_dummy_frames;
3526 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3527 int deprecated_use_generic_dummy_frames)
3529 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3533 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3535 gdb_assert (gdbarch != NULL);
3536 /* Skip verify of call_dummy_location, invalid_p == 0 */
3537 if (gdbarch_debug >= 2)
3538 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3539 return gdbarch->call_dummy_location;
3543 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3544 int call_dummy_location)
3546 gdbarch->call_dummy_location = call_dummy_location;
3550 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3552 gdb_assert (gdbarch != NULL);
3553 if (gdbarch->call_dummy_address == 0)
3554 internal_error (__FILE__, __LINE__,
3555 "gdbarch: gdbarch_call_dummy_address invalid");
3556 if (gdbarch_debug >= 2)
3557 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3558 return gdbarch->call_dummy_address ();
3562 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3563 gdbarch_call_dummy_address_ftype call_dummy_address)
3565 gdbarch->call_dummy_address = call_dummy_address;
3569 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3571 gdb_assert (gdbarch != NULL);
3572 if (gdbarch->call_dummy_start_offset == -1)
3573 internal_error (__FILE__, __LINE__,
3574 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3575 if (gdbarch_debug >= 2)
3576 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3577 return gdbarch->call_dummy_start_offset;
3581 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3582 CORE_ADDR call_dummy_start_offset)
3584 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3588 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3590 gdb_assert (gdbarch != NULL);
3591 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
3592 internal_error (__FILE__, __LINE__,
3593 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3594 if (gdbarch_debug >= 2)
3595 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3596 return gdbarch->call_dummy_breakpoint_offset;
3600 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3601 CORE_ADDR call_dummy_breakpoint_offset)
3603 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3607 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3609 gdb_assert (gdbarch != NULL);
3610 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3611 internal_error (__FILE__, __LINE__,
3612 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3613 if (gdbarch_debug >= 2)
3614 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3615 return gdbarch->call_dummy_breakpoint_offset_p;
3619 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3620 int call_dummy_breakpoint_offset_p)
3622 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3626 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3628 gdb_assert (gdbarch != NULL);
3629 if (gdbarch->call_dummy_length == -1)
3630 internal_error (__FILE__, __LINE__,
3631 "gdbarch: gdbarch_call_dummy_length invalid");
3632 if (gdbarch_debug >= 2)
3633 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3634 return gdbarch->call_dummy_length;
3638 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3639 int call_dummy_length)
3641 gdbarch->call_dummy_length = call_dummy_length;
3645 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3647 gdb_assert (gdbarch != NULL);
3648 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3652 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3654 gdb_assert (gdbarch != NULL);
3655 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3656 internal_error (__FILE__, __LINE__,
3657 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3658 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3659 if (gdbarch_debug >= 2)
3660 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3661 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3665 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3666 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3668 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3672 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3674 gdb_assert (gdbarch != NULL);
3675 if (gdbarch->call_dummy_p == -1)
3676 internal_error (__FILE__, __LINE__,
3677 "gdbarch: gdbarch_call_dummy_p invalid");
3678 if (gdbarch_debug >= 2)
3679 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3680 return gdbarch->call_dummy_p;
3684 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3687 gdbarch->call_dummy_p = call_dummy_p;
3691 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3693 gdb_assert (gdbarch != NULL);
3694 /* Skip verify of call_dummy_words, invalid_p == 0 */
3695 if (gdbarch_debug >= 2)
3696 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3697 return gdbarch->call_dummy_words;
3701 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3702 LONGEST * call_dummy_words)
3704 gdbarch->call_dummy_words = call_dummy_words;
3708 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3710 gdb_assert (gdbarch != NULL);
3711 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3712 if (gdbarch_debug >= 2)
3713 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3714 return gdbarch->sizeof_call_dummy_words;
3718 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3719 int sizeof_call_dummy_words)
3721 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3725 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3727 gdb_assert (gdbarch != NULL);
3728 if (gdbarch->call_dummy_stack_adjust_p == -1)
3729 internal_error (__FILE__, __LINE__,
3730 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3731 if (gdbarch_debug >= 2)
3732 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3733 return gdbarch->call_dummy_stack_adjust_p;
3737 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3738 int call_dummy_stack_adjust_p)
3740 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3744 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3746 gdb_assert (gdbarch != NULL);
3747 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3748 internal_error (__FILE__, __LINE__,
3749 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3750 if (gdbarch_debug >= 2)
3751 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3752 return gdbarch->call_dummy_stack_adjust;
3756 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3757 int call_dummy_stack_adjust)
3759 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3763 gdbarch_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)
3765 gdb_assert (gdbarch != NULL);
3766 if (gdbarch->fix_call_dummy == 0)
3767 internal_error (__FILE__, __LINE__,
3768 "gdbarch: gdbarch_fix_call_dummy invalid");
3769 if (gdbarch_debug >= 2)
3770 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3771 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3775 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3776 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3778 gdbarch->fix_call_dummy = fix_call_dummy;
3782 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3784 gdb_assert (gdbarch != NULL);
3785 return gdbarch->deprecated_init_frame_pc_first != 0;
3789 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3791 gdb_assert (gdbarch != NULL);
3792 if (gdbarch->deprecated_init_frame_pc_first == 0)
3793 internal_error (__FILE__, __LINE__,
3794 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3795 if (gdbarch_debug >= 2)
3796 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3797 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3801 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3802 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3804 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3808 gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3810 gdb_assert (gdbarch != NULL);
3811 if (gdbarch->init_frame_pc == 0)
3812 internal_error (__FILE__, __LINE__,
3813 "gdbarch: gdbarch_init_frame_pc invalid");
3814 if (gdbarch_debug >= 2)
3815 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
3816 return gdbarch->init_frame_pc (fromleaf, prev);
3820 set_gdbarch_init_frame_pc (struct gdbarch *gdbarch,
3821 gdbarch_init_frame_pc_ftype init_frame_pc)
3823 gdbarch->init_frame_pc = init_frame_pc;
3827 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3829 gdb_assert (gdbarch != NULL);
3830 if (gdbarch_debug >= 2)
3831 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3832 return gdbarch->believe_pcc_promotion;
3836 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3837 int believe_pcc_promotion)
3839 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3843 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3845 gdb_assert (gdbarch != NULL);
3846 if (gdbarch_debug >= 2)
3847 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3848 return gdbarch->believe_pcc_promotion_type;
3852 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3853 int believe_pcc_promotion_type)
3855 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3859 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3861 gdb_assert (gdbarch != NULL);
3862 if (gdbarch->coerce_float_to_double == 0)
3863 internal_error (__FILE__, __LINE__,
3864 "gdbarch: gdbarch_coerce_float_to_double invalid");
3865 if (gdbarch_debug >= 2)
3866 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3867 return gdbarch->coerce_float_to_double (formal, actual);
3871 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3872 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3874 gdbarch->coerce_float_to_double = coerce_float_to_double;
3878 gdbarch_get_saved_register_p (struct gdbarch *gdbarch)
3880 gdb_assert (gdbarch != NULL);
3881 return gdbarch->get_saved_register != 0;
3885 gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
3887 gdb_assert (gdbarch != NULL);
3888 if (gdbarch->get_saved_register == 0)
3889 internal_error (__FILE__, __LINE__,
3890 "gdbarch: gdbarch_get_saved_register invalid");
3891 if (gdbarch_debug >= 2)
3892 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3893 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3897 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3898 gdbarch_get_saved_register_ftype get_saved_register)
3900 gdbarch->get_saved_register = get_saved_register;
3904 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3906 gdb_assert (gdbarch != NULL);
3907 if (gdbarch->register_convertible == 0)
3908 internal_error (__FILE__, __LINE__,
3909 "gdbarch: gdbarch_register_convertible invalid");
3910 if (gdbarch_debug >= 2)
3911 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3912 return gdbarch->register_convertible (nr);
3916 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3917 gdbarch_register_convertible_ftype register_convertible)
3919 gdbarch->register_convertible = register_convertible;
3923 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3925 gdb_assert (gdbarch != NULL);
3926 if (gdbarch->register_convert_to_virtual == 0)
3927 internal_error (__FILE__, __LINE__,
3928 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3929 if (gdbarch_debug >= 2)
3930 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3931 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3935 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3936 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3938 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3942 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3944 gdb_assert (gdbarch != NULL);
3945 if (gdbarch->register_convert_to_raw == 0)
3946 internal_error (__FILE__, __LINE__,
3947 "gdbarch: gdbarch_register_convert_to_raw invalid");
3948 if (gdbarch_debug >= 2)
3949 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3950 gdbarch->register_convert_to_raw (type, regnum, from, to);
3954 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3955 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3957 gdbarch->register_convert_to_raw = register_convert_to_raw;
3961 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
3963 gdb_assert (gdbarch != NULL);
3964 if (gdbarch->convert_register_p == 0)
3965 internal_error (__FILE__, __LINE__,
3966 "gdbarch: gdbarch_convert_register_p invalid");
3967 if (gdbarch_debug >= 2)
3968 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3969 return gdbarch->convert_register_p (regnum);
3973 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3974 gdbarch_convert_register_p_ftype convert_register_p)
3976 gdbarch->convert_register_p = convert_register_p;
3980 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3982 gdb_assert (gdbarch != NULL);
3983 if (gdbarch->register_to_value == 0)
3984 internal_error (__FILE__, __LINE__,
3985 "gdbarch: gdbarch_register_to_value invalid");
3986 if (gdbarch_debug >= 2)
3987 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3988 gdbarch->register_to_value (regnum, type, from, to);
3992 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3993 gdbarch_register_to_value_ftype register_to_value)
3995 gdbarch->register_to_value = register_to_value;
3999 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4001 gdb_assert (gdbarch != NULL);
4002 if (gdbarch->value_to_register == 0)
4003 internal_error (__FILE__, __LINE__,
4004 "gdbarch: gdbarch_value_to_register invalid");
4005 if (gdbarch_debug >= 2)
4006 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4007 gdbarch->value_to_register (type, regnum, from, to);
4011 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4012 gdbarch_value_to_register_ftype value_to_register)
4014 gdbarch->value_to_register = value_to_register;
4018 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4020 gdb_assert (gdbarch != NULL);
4021 if (gdbarch->pointer_to_address == 0)
4022 internal_error (__FILE__, __LINE__,
4023 "gdbarch: gdbarch_pointer_to_address invalid");
4024 if (gdbarch_debug >= 2)
4025 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4026 return gdbarch->pointer_to_address (type, buf);
4030 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4031 gdbarch_pointer_to_address_ftype pointer_to_address)
4033 gdbarch->pointer_to_address = pointer_to_address;
4037 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4039 gdb_assert (gdbarch != NULL);
4040 if (gdbarch->address_to_pointer == 0)
4041 internal_error (__FILE__, __LINE__,
4042 "gdbarch: gdbarch_address_to_pointer invalid");
4043 if (gdbarch_debug >= 2)
4044 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4045 gdbarch->address_to_pointer (type, buf, addr);
4049 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4050 gdbarch_address_to_pointer_ftype address_to_pointer)
4052 gdbarch->address_to_pointer = address_to_pointer;
4056 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4058 gdb_assert (gdbarch != NULL);
4059 return gdbarch->integer_to_address != 0;
4063 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4065 gdb_assert (gdbarch != NULL);
4066 if (gdbarch->integer_to_address == 0)
4067 internal_error (__FILE__, __LINE__,
4068 "gdbarch: gdbarch_integer_to_address invalid");
4069 if (gdbarch_debug >= 2)
4070 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4071 return gdbarch->integer_to_address (type, buf);
4075 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4076 gdbarch_integer_to_address_ftype integer_to_address)
4078 gdbarch->integer_to_address = integer_to_address;
4082 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4084 gdb_assert (gdbarch != NULL);
4085 if (gdbarch->return_value_on_stack == 0)
4086 internal_error (__FILE__, __LINE__,
4087 "gdbarch: gdbarch_return_value_on_stack invalid");
4088 if (gdbarch_debug >= 2)
4089 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4090 return gdbarch->return_value_on_stack (type);
4094 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4095 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4097 gdbarch->return_value_on_stack = return_value_on_stack;
4101 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4103 gdb_assert (gdbarch != NULL);
4104 if (gdbarch->push_arguments == 0)
4105 internal_error (__FILE__, __LINE__,
4106 "gdbarch: gdbarch_push_arguments invalid");
4107 if (gdbarch_debug >= 2)
4108 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
4109 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
4113 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
4114 gdbarch_push_arguments_ftype push_arguments)
4116 gdbarch->push_arguments = push_arguments;
4120 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
4122 gdb_assert (gdbarch != NULL);
4123 if (gdbarch->push_dummy_frame == 0)
4124 internal_error (__FILE__, __LINE__,
4125 "gdbarch: gdbarch_push_dummy_frame invalid");
4126 if (gdbarch_debug >= 2)
4127 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
4128 gdbarch->push_dummy_frame ();
4132 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
4133 gdbarch_push_dummy_frame_ftype push_dummy_frame)
4135 gdbarch->push_dummy_frame = push_dummy_frame;
4139 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
4141 gdb_assert (gdbarch != NULL);
4142 return gdbarch->push_return_address != 0;
4146 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4148 gdb_assert (gdbarch != NULL);
4149 if (gdbarch->push_return_address == 0)
4150 internal_error (__FILE__, __LINE__,
4151 "gdbarch: gdbarch_push_return_address invalid");
4152 if (gdbarch_debug >= 2)
4153 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
4154 return gdbarch->push_return_address (pc, sp);
4158 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
4159 gdbarch_push_return_address_ftype push_return_address)
4161 gdbarch->push_return_address = push_return_address;
4165 gdbarch_pop_frame (struct gdbarch *gdbarch)
4167 gdb_assert (gdbarch != NULL);
4168 if (gdbarch->pop_frame == 0)
4169 internal_error (__FILE__, __LINE__,
4170 "gdbarch: gdbarch_pop_frame invalid");
4171 if (gdbarch_debug >= 2)
4172 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
4173 gdbarch->pop_frame ();
4177 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
4178 gdbarch_pop_frame_ftype pop_frame)
4180 gdbarch->pop_frame = pop_frame;
4184 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4186 gdb_assert (gdbarch != NULL);
4187 if (gdbarch->store_struct_return == 0)
4188 internal_error (__FILE__, __LINE__,
4189 "gdbarch: gdbarch_store_struct_return invalid");
4190 if (gdbarch_debug >= 2)
4191 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
4192 gdbarch->store_struct_return (addr, sp);
4196 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
4197 gdbarch_store_struct_return_ftype store_struct_return)
4199 gdbarch->store_struct_return = store_struct_return;
4203 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4205 gdb_assert (gdbarch != NULL);
4206 if (gdbarch->extract_return_value == 0)
4207 internal_error (__FILE__, __LINE__,
4208 "gdbarch: gdbarch_extract_return_value invalid");
4209 if (gdbarch_debug >= 2)
4210 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4211 gdbarch->extract_return_value (type, regcache, valbuf);
4215 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4216 gdbarch_extract_return_value_ftype extract_return_value)
4218 gdbarch->extract_return_value = extract_return_value;
4222 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4224 gdb_assert (gdbarch != NULL);
4225 if (gdbarch->store_return_value == 0)
4226 internal_error (__FILE__, __LINE__,
4227 "gdbarch: gdbarch_store_return_value invalid");
4228 if (gdbarch_debug >= 2)
4229 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4230 gdbarch->store_return_value (type, regcache, valbuf);
4234 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4235 gdbarch_store_return_value_ftype store_return_value)
4237 gdbarch->store_return_value = store_return_value;
4241 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4243 gdb_assert (gdbarch != NULL);
4244 if (gdbarch->deprecated_extract_return_value == 0)
4245 internal_error (__FILE__, __LINE__,
4246 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4247 if (gdbarch_debug >= 2)
4248 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4249 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4253 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4254 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4256 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4260 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4262 gdb_assert (gdbarch != NULL);
4263 if (gdbarch->deprecated_store_return_value == 0)
4264 internal_error (__FILE__, __LINE__,
4265 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4266 if (gdbarch_debug >= 2)
4267 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4268 gdbarch->deprecated_store_return_value (type, valbuf);
4272 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4273 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4275 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4279 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4281 gdb_assert (gdbarch != NULL);
4282 return gdbarch->extract_struct_value_address != 0;
4286 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4288 gdb_assert (gdbarch != NULL);
4289 if (gdbarch->extract_struct_value_address == 0)
4290 internal_error (__FILE__, __LINE__,
4291 "gdbarch: gdbarch_extract_struct_value_address invalid");
4292 if (gdbarch_debug >= 2)
4293 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4294 return gdbarch->extract_struct_value_address (regcache);
4298 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4299 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4301 gdbarch->extract_struct_value_address = extract_struct_value_address;
4305 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4307 gdb_assert (gdbarch != NULL);
4308 return gdbarch->deprecated_extract_struct_value_address != 0;
4312 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4314 gdb_assert (gdbarch != NULL);
4315 if (gdbarch->deprecated_extract_struct_value_address == 0)
4316 internal_error (__FILE__, __LINE__,
4317 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4318 if (gdbarch_debug >= 2)
4319 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4320 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4324 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4325 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4327 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4331 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4333 gdb_assert (gdbarch != NULL);
4334 if (gdbarch->use_struct_convention == 0)
4335 internal_error (__FILE__, __LINE__,
4336 "gdbarch: gdbarch_use_struct_convention invalid");
4337 if (gdbarch_debug >= 2)
4338 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4339 return gdbarch->use_struct_convention (gcc_p, value_type);
4343 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4344 gdbarch_use_struct_convention_ftype use_struct_convention)
4346 gdbarch->use_struct_convention = use_struct_convention;
4350 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4352 gdb_assert (gdbarch != NULL);
4353 if (gdbarch->frame_init_saved_regs == 0)
4354 internal_error (__FILE__, __LINE__,
4355 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4356 if (gdbarch_debug >= 2)
4357 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
4358 gdbarch->frame_init_saved_regs (frame);
4362 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
4363 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
4365 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
4369 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
4371 gdb_assert (gdbarch != NULL);
4372 return gdbarch->init_extra_frame_info != 0;
4376 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4378 gdb_assert (gdbarch != NULL);
4379 if (gdbarch->init_extra_frame_info == 0)
4380 internal_error (__FILE__, __LINE__,
4381 "gdbarch: gdbarch_init_extra_frame_info invalid");
4382 if (gdbarch_debug >= 2)
4383 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
4384 gdbarch->init_extra_frame_info (fromleaf, frame);
4388 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
4389 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
4391 gdbarch->init_extra_frame_info = init_extra_frame_info;
4395 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4397 gdb_assert (gdbarch != NULL);
4398 if (gdbarch->skip_prologue == 0)
4399 internal_error (__FILE__, __LINE__,
4400 "gdbarch: gdbarch_skip_prologue invalid");
4401 if (gdbarch_debug >= 2)
4402 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4403 return gdbarch->skip_prologue (ip);
4407 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4408 gdbarch_skip_prologue_ftype skip_prologue)
4410 gdbarch->skip_prologue = skip_prologue;
4414 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4416 gdb_assert (gdbarch != NULL);
4417 if (gdbarch->prologue_frameless_p == 0)
4418 internal_error (__FILE__, __LINE__,
4419 "gdbarch: gdbarch_prologue_frameless_p invalid");
4420 if (gdbarch_debug >= 2)
4421 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4422 return gdbarch->prologue_frameless_p (ip);
4426 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4427 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4429 gdbarch->prologue_frameless_p = prologue_frameless_p;
4433 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4435 gdb_assert (gdbarch != NULL);
4436 if (gdbarch->inner_than == 0)
4437 internal_error (__FILE__, __LINE__,
4438 "gdbarch: gdbarch_inner_than invalid");
4439 if (gdbarch_debug >= 2)
4440 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4441 return gdbarch->inner_than (lhs, rhs);
4445 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4446 gdbarch_inner_than_ftype inner_than)
4448 gdbarch->inner_than = inner_than;
4451 const unsigned char *
4452 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4454 gdb_assert (gdbarch != NULL);
4455 if (gdbarch->breakpoint_from_pc == 0)
4456 internal_error (__FILE__, __LINE__,
4457 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4458 if (gdbarch_debug >= 2)
4459 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4460 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4464 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4465 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4467 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4471 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4473 gdb_assert (gdbarch != NULL);
4474 if (gdbarch->memory_insert_breakpoint == 0)
4475 internal_error (__FILE__, __LINE__,
4476 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4477 if (gdbarch_debug >= 2)
4478 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4479 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4483 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4484 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4486 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4490 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4492 gdb_assert (gdbarch != NULL);
4493 if (gdbarch->memory_remove_breakpoint == 0)
4494 internal_error (__FILE__, __LINE__,
4495 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4496 if (gdbarch_debug >= 2)
4497 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4498 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4502 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4503 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4505 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4509 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4511 gdb_assert (gdbarch != NULL);
4512 if (gdbarch->decr_pc_after_break == -1)
4513 internal_error (__FILE__, __LINE__,
4514 "gdbarch: gdbarch_decr_pc_after_break invalid");
4515 if (gdbarch_debug >= 2)
4516 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4517 return gdbarch->decr_pc_after_break;
4521 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4522 CORE_ADDR decr_pc_after_break)
4524 gdbarch->decr_pc_after_break = decr_pc_after_break;
4528 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4530 gdb_assert (gdbarch != NULL);
4531 if (gdbarch->prepare_to_proceed == 0)
4532 internal_error (__FILE__, __LINE__,
4533 "gdbarch: gdbarch_prepare_to_proceed invalid");
4534 if (gdbarch_debug >= 2)
4535 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4536 return gdbarch->prepare_to_proceed (select_it);
4540 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4541 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4543 gdbarch->prepare_to_proceed = prepare_to_proceed;
4547 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4549 gdb_assert (gdbarch != NULL);
4550 if (gdbarch->function_start_offset == -1)
4551 internal_error (__FILE__, __LINE__,
4552 "gdbarch: gdbarch_function_start_offset invalid");
4553 if (gdbarch_debug >= 2)
4554 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4555 return gdbarch->function_start_offset;
4559 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4560 CORE_ADDR function_start_offset)
4562 gdbarch->function_start_offset = function_start_offset;
4566 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4568 gdb_assert (gdbarch != NULL);
4569 if (gdbarch->remote_translate_xfer_address == 0)
4570 internal_error (__FILE__, __LINE__,
4571 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4572 if (gdbarch_debug >= 2)
4573 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4574 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4578 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4579 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4581 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4585 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4587 gdb_assert (gdbarch != NULL);
4588 if (gdbarch->frame_args_skip == -1)
4589 internal_error (__FILE__, __LINE__,
4590 "gdbarch: gdbarch_frame_args_skip invalid");
4591 if (gdbarch_debug >= 2)
4592 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4593 return gdbarch->frame_args_skip;
4597 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4598 CORE_ADDR frame_args_skip)
4600 gdbarch->frame_args_skip = frame_args_skip;
4604 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4606 gdb_assert (gdbarch != NULL);
4607 if (gdbarch->frameless_function_invocation == 0)
4608 internal_error (__FILE__, __LINE__,
4609 "gdbarch: gdbarch_frameless_function_invocation invalid");
4610 if (gdbarch_debug >= 2)
4611 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4612 return gdbarch->frameless_function_invocation (fi);
4616 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4617 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4619 gdbarch->frameless_function_invocation = frameless_function_invocation;
4623 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4625 gdb_assert (gdbarch != NULL);
4626 if (gdbarch->frame_chain == 0)
4627 internal_error (__FILE__, __LINE__,
4628 "gdbarch: gdbarch_frame_chain invalid");
4629 if (gdbarch_debug >= 2)
4630 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4631 return gdbarch->frame_chain (frame);
4635 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4636 gdbarch_frame_chain_ftype frame_chain)
4638 gdbarch->frame_chain = frame_chain;
4642 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4644 gdb_assert (gdbarch != NULL);
4645 if (gdbarch->frame_chain_valid == 0)
4646 internal_error (__FILE__, __LINE__,
4647 "gdbarch: gdbarch_frame_chain_valid invalid");
4648 if (gdbarch_debug >= 2)
4649 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4650 return gdbarch->frame_chain_valid (chain, thisframe);
4654 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4655 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4657 gdbarch->frame_chain_valid = frame_chain_valid;
4661 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4663 gdb_assert (gdbarch != NULL);
4664 if (gdbarch->frame_saved_pc == 0)
4665 internal_error (__FILE__, __LINE__,
4666 "gdbarch: gdbarch_frame_saved_pc invalid");
4667 if (gdbarch_debug >= 2)
4668 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4669 return gdbarch->frame_saved_pc (fi);
4673 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4674 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4676 gdbarch->frame_saved_pc = frame_saved_pc;
4680 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4682 gdb_assert (gdbarch != NULL);
4683 if (gdbarch->frame_args_address == 0)
4684 internal_error (__FILE__, __LINE__,
4685 "gdbarch: gdbarch_frame_args_address invalid");
4686 if (gdbarch_debug >= 2)
4687 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4688 return gdbarch->frame_args_address (fi);
4692 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4693 gdbarch_frame_args_address_ftype frame_args_address)
4695 gdbarch->frame_args_address = frame_args_address;
4699 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4701 gdb_assert (gdbarch != NULL);
4702 if (gdbarch->frame_locals_address == 0)
4703 internal_error (__FILE__, __LINE__,
4704 "gdbarch: gdbarch_frame_locals_address invalid");
4705 if (gdbarch_debug >= 2)
4706 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4707 return gdbarch->frame_locals_address (fi);
4711 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4712 gdbarch_frame_locals_address_ftype frame_locals_address)
4714 gdbarch->frame_locals_address = frame_locals_address;
4718 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4720 gdb_assert (gdbarch != NULL);
4721 if (gdbarch->saved_pc_after_call == 0)
4722 internal_error (__FILE__, __LINE__,
4723 "gdbarch: gdbarch_saved_pc_after_call invalid");
4724 if (gdbarch_debug >= 2)
4725 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4726 return gdbarch->saved_pc_after_call (frame);
4730 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4731 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4733 gdbarch->saved_pc_after_call = saved_pc_after_call;
4737 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4739 gdb_assert (gdbarch != NULL);
4740 if (gdbarch->frame_num_args == 0)
4741 internal_error (__FILE__, __LINE__,
4742 "gdbarch: gdbarch_frame_num_args invalid");
4743 if (gdbarch_debug >= 2)
4744 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4745 return gdbarch->frame_num_args (frame);
4749 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4750 gdbarch_frame_num_args_ftype frame_num_args)
4752 gdbarch->frame_num_args = frame_num_args;
4756 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4758 gdb_assert (gdbarch != NULL);
4759 return gdbarch->stack_align != 0;
4763 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4765 gdb_assert (gdbarch != NULL);
4766 if (gdbarch->stack_align == 0)
4767 internal_error (__FILE__, __LINE__,
4768 "gdbarch: gdbarch_stack_align invalid");
4769 if (gdbarch_debug >= 2)
4770 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4771 return gdbarch->stack_align (sp);
4775 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4776 gdbarch_stack_align_ftype stack_align)
4778 gdbarch->stack_align = stack_align;
4782 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4784 gdb_assert (gdbarch != NULL);
4785 return gdbarch->frame_align != 0;
4789 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4791 gdb_assert (gdbarch != NULL);
4792 if (gdbarch->frame_align == 0)
4793 internal_error (__FILE__, __LINE__,
4794 "gdbarch: gdbarch_frame_align invalid");
4795 if (gdbarch_debug >= 2)
4796 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4797 return gdbarch->frame_align (gdbarch, address);
4801 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4802 gdbarch_frame_align_ftype frame_align)
4804 gdbarch->frame_align = frame_align;
4808 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4810 gdb_assert (gdbarch != NULL);
4811 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4812 if (gdbarch_debug >= 2)
4813 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4814 return gdbarch->extra_stack_alignment_needed;
4818 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4819 int extra_stack_alignment_needed)
4821 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4825 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4827 gdb_assert (gdbarch != NULL);
4828 return gdbarch->reg_struct_has_addr != 0;
4832 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4834 gdb_assert (gdbarch != NULL);
4835 if (gdbarch->reg_struct_has_addr == 0)
4836 internal_error (__FILE__, __LINE__,
4837 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4838 if (gdbarch_debug >= 2)
4839 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4840 return gdbarch->reg_struct_has_addr (gcc_p, type);
4844 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4845 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4847 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4851 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4853 gdb_assert (gdbarch != NULL);
4854 return gdbarch->save_dummy_frame_tos != 0;
4858 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4860 gdb_assert (gdbarch != NULL);
4861 if (gdbarch->save_dummy_frame_tos == 0)
4862 internal_error (__FILE__, __LINE__,
4863 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4864 if (gdbarch_debug >= 2)
4865 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4866 gdbarch->save_dummy_frame_tos (sp);
4870 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4871 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4873 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4877 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4879 gdb_assert (gdbarch != NULL);
4880 if (gdbarch_debug >= 2)
4881 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4882 return gdbarch->parm_boundary;
4886 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4889 gdbarch->parm_boundary = parm_boundary;
4892 const struct floatformat *
4893 gdbarch_float_format (struct gdbarch *gdbarch)
4895 gdb_assert (gdbarch != NULL);
4896 if (gdbarch_debug >= 2)
4897 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4898 return gdbarch->float_format;
4902 set_gdbarch_float_format (struct gdbarch *gdbarch,
4903 const struct floatformat * float_format)
4905 gdbarch->float_format = float_format;
4908 const struct floatformat *
4909 gdbarch_double_format (struct gdbarch *gdbarch)
4911 gdb_assert (gdbarch != NULL);
4912 if (gdbarch_debug >= 2)
4913 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4914 return gdbarch->double_format;
4918 set_gdbarch_double_format (struct gdbarch *gdbarch,
4919 const struct floatformat * double_format)
4921 gdbarch->double_format = double_format;
4924 const struct floatformat *
4925 gdbarch_long_double_format (struct gdbarch *gdbarch)
4927 gdb_assert (gdbarch != NULL);
4928 if (gdbarch_debug >= 2)
4929 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4930 return gdbarch->long_double_format;
4934 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4935 const struct floatformat * long_double_format)
4937 gdbarch->long_double_format = long_double_format;
4941 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4943 gdb_assert (gdbarch != NULL);
4944 if (gdbarch->convert_from_func_ptr_addr == 0)
4945 internal_error (__FILE__, __LINE__,
4946 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4947 if (gdbarch_debug >= 2)
4948 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4949 return gdbarch->convert_from_func_ptr_addr (addr);
4953 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4954 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4956 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4960 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4962 gdb_assert (gdbarch != NULL);
4963 if (gdbarch->addr_bits_remove == 0)
4964 internal_error (__FILE__, __LINE__,
4965 "gdbarch: gdbarch_addr_bits_remove invalid");
4966 if (gdbarch_debug >= 2)
4967 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4968 return gdbarch->addr_bits_remove (addr);
4972 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4973 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4975 gdbarch->addr_bits_remove = addr_bits_remove;
4979 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4981 gdb_assert (gdbarch != NULL);
4982 if (gdbarch->smash_text_address == 0)
4983 internal_error (__FILE__, __LINE__,
4984 "gdbarch: gdbarch_smash_text_address invalid");
4985 if (gdbarch_debug >= 2)
4986 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4987 return gdbarch->smash_text_address (addr);
4991 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4992 gdbarch_smash_text_address_ftype smash_text_address)
4994 gdbarch->smash_text_address = smash_text_address;
4998 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5000 gdb_assert (gdbarch != NULL);
5001 return gdbarch->software_single_step != 0;
5005 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5007 gdb_assert (gdbarch != NULL);
5008 if (gdbarch->software_single_step == 0)
5009 internal_error (__FILE__, __LINE__,
5010 "gdbarch: gdbarch_software_single_step invalid");
5011 if (gdbarch_debug >= 2)
5012 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5013 gdbarch->software_single_step (sig, insert_breakpoints_p);
5017 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5018 gdbarch_software_single_step_ftype software_single_step)
5020 gdbarch->software_single_step = software_single_step;
5024 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5026 gdb_assert (gdbarch != NULL);
5027 if (gdbarch->print_insn == 0)
5028 internal_error (__FILE__, __LINE__,
5029 "gdbarch: gdbarch_print_insn invalid");
5030 if (gdbarch_debug >= 2)
5031 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5032 return gdbarch->print_insn (vma, info);
5036 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5037 gdbarch_print_insn_ftype print_insn)
5039 gdbarch->print_insn = print_insn;
5043 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5045 gdb_assert (gdbarch != NULL);
5046 if (gdbarch->skip_trampoline_code == 0)
5047 internal_error (__FILE__, __LINE__,
5048 "gdbarch: gdbarch_skip_trampoline_code invalid");
5049 if (gdbarch_debug >= 2)
5050 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5051 return gdbarch->skip_trampoline_code (pc);
5055 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5056 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5058 gdbarch->skip_trampoline_code = skip_trampoline_code;
5062 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5064 gdb_assert (gdbarch != NULL);
5065 if (gdbarch->in_solib_call_trampoline == 0)
5066 internal_error (__FILE__, __LINE__,
5067 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5068 if (gdbarch_debug >= 2)
5069 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5070 return gdbarch->in_solib_call_trampoline (pc, name);
5074 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5075 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5077 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5081 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5083 gdb_assert (gdbarch != NULL);
5084 if (gdbarch->in_solib_return_trampoline == 0)
5085 internal_error (__FILE__, __LINE__,
5086 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5087 if (gdbarch_debug >= 2)
5088 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5089 return gdbarch->in_solib_return_trampoline (pc, name);
5093 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5094 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5096 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5100 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5102 gdb_assert (gdbarch != NULL);
5103 if (gdbarch->pc_in_sigtramp == 0)
5104 internal_error (__FILE__, __LINE__,
5105 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5106 if (gdbarch_debug >= 2)
5107 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5108 return gdbarch->pc_in_sigtramp (pc, name);
5112 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5113 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5115 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5119 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5121 gdb_assert (gdbarch != NULL);
5122 return gdbarch->sigtramp_start != 0;
5126 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5128 gdb_assert (gdbarch != NULL);
5129 if (gdbarch->sigtramp_start == 0)
5130 internal_error (__FILE__, __LINE__,
5131 "gdbarch: gdbarch_sigtramp_start invalid");
5132 if (gdbarch_debug >= 2)
5133 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5134 return gdbarch->sigtramp_start (pc);
5138 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5139 gdbarch_sigtramp_start_ftype sigtramp_start)
5141 gdbarch->sigtramp_start = sigtramp_start;
5145 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5147 gdb_assert (gdbarch != NULL);
5148 return gdbarch->sigtramp_end != 0;
5152 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5154 gdb_assert (gdbarch != NULL);
5155 if (gdbarch->sigtramp_end == 0)
5156 internal_error (__FILE__, __LINE__,
5157 "gdbarch: gdbarch_sigtramp_end invalid");
5158 if (gdbarch_debug >= 2)
5159 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5160 return gdbarch->sigtramp_end (pc);
5164 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5165 gdbarch_sigtramp_end_ftype sigtramp_end)
5167 gdbarch->sigtramp_end = sigtramp_end;
5171 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5173 gdb_assert (gdbarch != NULL);
5174 if (gdbarch->in_function_epilogue_p == 0)
5175 internal_error (__FILE__, __LINE__,
5176 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5177 if (gdbarch_debug >= 2)
5178 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5179 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5183 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5184 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5186 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5190 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5192 gdb_assert (gdbarch != NULL);
5193 if (gdbarch->construct_inferior_arguments == 0)
5194 internal_error (__FILE__, __LINE__,
5195 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5196 if (gdbarch_debug >= 2)
5197 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5198 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5202 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5203 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5205 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5209 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5211 gdb_assert (gdbarch != NULL);
5212 return gdbarch->dwarf2_build_frame_info != 0;
5216 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5218 gdb_assert (gdbarch != NULL);
5219 if (gdbarch->dwarf2_build_frame_info == 0)
5220 internal_error (__FILE__, __LINE__,
5221 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5222 if (gdbarch_debug >= 2)
5223 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5224 gdbarch->dwarf2_build_frame_info (objfile);
5228 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5229 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5231 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5235 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5237 gdb_assert (gdbarch != NULL);
5238 if (gdbarch->elf_make_msymbol_special == 0)
5239 internal_error (__FILE__, __LINE__,
5240 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5241 if (gdbarch_debug >= 2)
5242 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5243 gdbarch->elf_make_msymbol_special (sym, msym);
5247 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5248 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5250 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5254 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5256 gdb_assert (gdbarch != NULL);
5257 if (gdbarch->coff_make_msymbol_special == 0)
5258 internal_error (__FILE__, __LINE__,
5259 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5260 if (gdbarch_debug >= 2)
5261 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5262 gdbarch->coff_make_msymbol_special (val, msym);
5266 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5267 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5269 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5273 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5275 gdb_assert (gdbarch != NULL);
5276 /* Skip verify of name_of_malloc, invalid_p == 0 */
5277 if (gdbarch_debug >= 2)
5278 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5279 return gdbarch->name_of_malloc;
5283 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5284 const char * name_of_malloc)
5286 gdbarch->name_of_malloc = name_of_malloc;
5290 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5292 gdb_assert (gdbarch != NULL);
5293 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5294 if (gdbarch_debug >= 2)
5295 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5296 return gdbarch->cannot_step_breakpoint;
5300 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5301 int cannot_step_breakpoint)
5303 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5307 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5309 gdb_assert (gdbarch != NULL);
5310 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5311 if (gdbarch_debug >= 2)
5312 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5313 return gdbarch->have_nonsteppable_watchpoint;
5317 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5318 int have_nonsteppable_watchpoint)
5320 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5324 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5326 gdb_assert (gdbarch != NULL);
5327 return gdbarch->address_class_type_flags != 0;
5331 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5333 gdb_assert (gdbarch != NULL);
5334 if (gdbarch->address_class_type_flags == 0)
5335 internal_error (__FILE__, __LINE__,
5336 "gdbarch: gdbarch_address_class_type_flags invalid");
5337 if (gdbarch_debug >= 2)
5338 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5339 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5343 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5344 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5346 gdbarch->address_class_type_flags = address_class_type_flags;
5350 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5352 gdb_assert (gdbarch != NULL);
5353 return gdbarch->address_class_type_flags_to_name != 0;
5357 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5359 gdb_assert (gdbarch != NULL);
5360 if (gdbarch->address_class_type_flags_to_name == 0)
5361 internal_error (__FILE__, __LINE__,
5362 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5363 if (gdbarch_debug >= 2)
5364 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5365 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5369 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5370 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5372 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5376 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5378 gdb_assert (gdbarch != NULL);
5379 return gdbarch->address_class_name_to_type_flags != 0;
5383 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr)
5385 gdb_assert (gdbarch != NULL);
5386 if (gdbarch->address_class_name_to_type_flags == 0)
5387 internal_error (__FILE__, __LINE__,
5388 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5389 if (gdbarch_debug >= 2)
5390 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5391 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5395 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5396 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5398 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5402 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5404 gdb_assert (gdbarch != NULL);
5405 if (gdbarch->register_reggroup_p == 0)
5406 internal_error (__FILE__, __LINE__,
5407 "gdbarch: gdbarch_register_reggroup_p invalid");
5408 if (gdbarch_debug >= 2)
5409 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5410 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5414 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5415 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5417 gdbarch->register_reggroup_p = register_reggroup_p;
5421 /* Keep a registry of per-architecture data-pointers required by GDB
5428 gdbarch_data_init_ftype *init;
5429 gdbarch_data_free_ftype *free;
5432 struct gdbarch_data_registration
5434 struct gdbarch_data *data;
5435 struct gdbarch_data_registration *next;
5438 struct gdbarch_data_registry
5441 struct gdbarch_data_registration *registrations;
5444 struct gdbarch_data_registry gdbarch_data_registry =
5449 struct gdbarch_data *
5450 register_gdbarch_data (gdbarch_data_init_ftype *init,
5451 gdbarch_data_free_ftype *free)
5453 struct gdbarch_data_registration **curr;
5454 /* Append the new registraration. */
5455 for (curr = &gdbarch_data_registry.registrations;
5457 curr = &(*curr)->next);
5458 (*curr) = XMALLOC (struct gdbarch_data_registration);
5459 (*curr)->next = NULL;
5460 (*curr)->data = XMALLOC (struct gdbarch_data);
5461 (*curr)->data->index = gdbarch_data_registry.nr++;
5462 (*curr)->data->init = init;
5463 (*curr)->data->init_p = 1;
5464 (*curr)->data->free = free;
5465 return (*curr)->data;
5469 /* Create/delete the gdbarch data vector. */
5472 alloc_gdbarch_data (struct gdbarch *gdbarch)
5474 gdb_assert (gdbarch->data == NULL);
5475 gdbarch->nr_data = gdbarch_data_registry.nr;
5476 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5480 free_gdbarch_data (struct gdbarch *gdbarch)
5482 struct gdbarch_data_registration *rego;
5483 gdb_assert (gdbarch->data != NULL);
5484 for (rego = gdbarch_data_registry.registrations;
5488 struct gdbarch_data *data = rego->data;
5489 gdb_assert (data->index < gdbarch->nr_data);
5490 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5492 data->free (gdbarch, gdbarch->data[data->index]);
5493 gdbarch->data[data->index] = NULL;
5496 xfree (gdbarch->data);
5497 gdbarch->data = NULL;
5501 /* Initialize the current value of the specified per-architecture
5505 set_gdbarch_data (struct gdbarch *gdbarch,
5506 struct gdbarch_data *data,
5509 gdb_assert (data->index < gdbarch->nr_data);
5510 if (gdbarch->data[data->index] != NULL)
5512 gdb_assert (data->free != NULL);
5513 data->free (gdbarch, gdbarch->data[data->index]);
5515 gdbarch->data[data->index] = pointer;
5518 /* Return the current value of the specified per-architecture
5522 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5524 gdb_assert (data->index < gdbarch->nr_data);
5525 /* The data-pointer isn't initialized, call init() to get a value but
5526 only if the architecture initializaiton has completed. Otherwise
5527 punt - hope that the caller knows what they are doing. */
5528 if (gdbarch->data[data->index] == NULL
5529 && gdbarch->initialized_p)
5531 /* Be careful to detect an initialization cycle. */
5532 gdb_assert (data->init_p);
5534 gdb_assert (data->init != NULL);
5535 gdbarch->data[data->index] = data->init (gdbarch);
5537 gdb_assert (gdbarch->data[data->index] != NULL);
5539 return gdbarch->data[data->index];
5544 /* Keep a registry of swapped data required by GDB modules. */
5549 struct gdbarch_swap_registration *source;
5550 struct gdbarch_swap *next;
5553 struct gdbarch_swap_registration
5556 unsigned long sizeof_data;
5557 gdbarch_swap_ftype *init;
5558 struct gdbarch_swap_registration *next;
5561 struct gdbarch_swap_registry
5564 struct gdbarch_swap_registration *registrations;
5567 struct gdbarch_swap_registry gdbarch_swap_registry =
5573 register_gdbarch_swap (void *data,
5574 unsigned long sizeof_data,
5575 gdbarch_swap_ftype *init)
5577 struct gdbarch_swap_registration **rego;
5578 for (rego = &gdbarch_swap_registry.registrations;
5580 rego = &(*rego)->next);
5581 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5582 (*rego)->next = NULL;
5583 (*rego)->init = init;
5584 (*rego)->data = data;
5585 (*rego)->sizeof_data = sizeof_data;
5589 clear_gdbarch_swap (struct gdbarch *gdbarch)
5591 struct gdbarch_swap *curr;
5592 for (curr = gdbarch->swap;
5596 memset (curr->source->data, 0, curr->source->sizeof_data);
5601 init_gdbarch_swap (struct gdbarch *gdbarch)
5603 struct gdbarch_swap_registration *rego;
5604 struct gdbarch_swap **curr = &gdbarch->swap;
5605 for (rego = gdbarch_swap_registry.registrations;
5609 if (rego->data != NULL)
5611 (*curr) = XMALLOC (struct gdbarch_swap);
5612 (*curr)->source = rego;
5613 (*curr)->swap = xmalloc (rego->sizeof_data);
5614 (*curr)->next = NULL;
5615 curr = &(*curr)->next;
5617 if (rego->init != NULL)
5623 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5625 struct gdbarch_swap *curr;
5626 for (curr = gdbarch->swap;
5629 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5633 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5635 struct gdbarch_swap *curr;
5636 for (curr = gdbarch->swap;
5639 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5643 /* Keep a registry of the architectures known by GDB. */
5645 struct gdbarch_registration
5647 enum bfd_architecture bfd_architecture;
5648 gdbarch_init_ftype *init;
5649 gdbarch_dump_tdep_ftype *dump_tdep;
5650 struct gdbarch_list *arches;
5651 struct gdbarch_registration *next;
5654 static struct gdbarch_registration *gdbarch_registry = NULL;
5657 append_name (const char ***buf, int *nr, const char *name)
5659 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5665 gdbarch_printable_names (void)
5669 /* Accumulate a list of names based on the registed list of
5671 enum bfd_architecture a;
5673 const char **arches = NULL;
5674 struct gdbarch_registration *rego;
5675 for (rego = gdbarch_registry;
5679 const struct bfd_arch_info *ap;
5680 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5682 internal_error (__FILE__, __LINE__,
5683 "gdbarch_architecture_names: multi-arch unknown");
5686 append_name (&arches, &nr_arches, ap->printable_name);
5691 append_name (&arches, &nr_arches, NULL);
5695 /* Just return all the architectures that BFD knows. Assume that
5696 the legacy architecture framework supports them. */
5697 return bfd_arch_list ();
5702 gdbarch_register (enum bfd_architecture bfd_architecture,
5703 gdbarch_init_ftype *init,
5704 gdbarch_dump_tdep_ftype *dump_tdep)
5706 struct gdbarch_registration **curr;
5707 const struct bfd_arch_info *bfd_arch_info;
5708 /* Check that BFD recognizes this architecture */
5709 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5710 if (bfd_arch_info == NULL)
5712 internal_error (__FILE__, __LINE__,
5713 "gdbarch: Attempt to register unknown architecture (%d)",
5716 /* Check that we haven't seen this architecture before */
5717 for (curr = &gdbarch_registry;
5719 curr = &(*curr)->next)
5721 if (bfd_architecture == (*curr)->bfd_architecture)
5722 internal_error (__FILE__, __LINE__,
5723 "gdbarch: Duplicate registraration of architecture (%s)",
5724 bfd_arch_info->printable_name);
5728 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5729 bfd_arch_info->printable_name,
5732 (*curr) = XMALLOC (struct gdbarch_registration);
5733 (*curr)->bfd_architecture = bfd_architecture;
5734 (*curr)->init = init;
5735 (*curr)->dump_tdep = dump_tdep;
5736 (*curr)->arches = NULL;
5737 (*curr)->next = NULL;
5738 /* When non- multi-arch, install whatever target dump routine we've
5739 been provided - hopefully that routine has been written correctly
5740 and works regardless of multi-arch. */
5741 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5742 && startup_gdbarch.dump_tdep == NULL)
5743 startup_gdbarch.dump_tdep = dump_tdep;
5747 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5748 gdbarch_init_ftype *init)
5750 gdbarch_register (bfd_architecture, init, NULL);
5754 /* Look for an architecture using gdbarch_info. Base search on only
5755 BFD_ARCH_INFO and BYTE_ORDER. */
5757 struct gdbarch_list *
5758 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5759 const struct gdbarch_info *info)
5761 for (; arches != NULL; arches = arches->next)
5763 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5765 if (info->byte_order != arches->gdbarch->byte_order)
5773 /* Update the current architecture. Return ZERO if the update request
5777 gdbarch_update_p (struct gdbarch_info info)
5779 struct gdbarch *new_gdbarch;
5780 struct gdbarch *old_gdbarch;
5781 struct gdbarch_registration *rego;
5783 /* Fill in missing parts of the INFO struct using a number of
5784 sources: ``set ...''; INFOabfd supplied; existing target. */
5786 /* ``(gdb) set architecture ...'' */
5787 if (info.bfd_arch_info == NULL
5788 && !TARGET_ARCHITECTURE_AUTO)
5789 info.bfd_arch_info = TARGET_ARCHITECTURE;
5790 if (info.bfd_arch_info == NULL
5791 && info.abfd != NULL
5792 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5793 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5794 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5795 if (info.bfd_arch_info == NULL)
5796 info.bfd_arch_info = TARGET_ARCHITECTURE;
5798 /* ``(gdb) set byte-order ...'' */
5799 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5800 && !TARGET_BYTE_ORDER_AUTO)
5801 info.byte_order = TARGET_BYTE_ORDER;
5802 /* From the INFO struct. */
5803 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5804 && info.abfd != NULL)
5805 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5806 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5807 : BFD_ENDIAN_UNKNOWN);
5808 /* From the current target. */
5809 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5810 info.byte_order = TARGET_BYTE_ORDER;
5812 /* Must have found some sort of architecture. */
5813 gdb_assert (info.bfd_arch_info != NULL);
5817 fprintf_unfiltered (gdb_stdlog,
5818 "gdbarch_update: info.bfd_arch_info %s\n",
5819 (info.bfd_arch_info != NULL
5820 ? info.bfd_arch_info->printable_name
5822 fprintf_unfiltered (gdb_stdlog,
5823 "gdbarch_update: info.byte_order %d (%s)\n",
5825 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5826 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5828 fprintf_unfiltered (gdb_stdlog,
5829 "gdbarch_update: info.abfd 0x%lx\n",
5831 fprintf_unfiltered (gdb_stdlog,
5832 "gdbarch_update: info.tdep_info 0x%lx\n",
5833 (long) info.tdep_info);
5836 /* Find the target that knows about this architecture. */
5837 for (rego = gdbarch_registry;
5840 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5845 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
5849 /* Swap the data belonging to the old target out setting the
5850 installed data to zero. This stops the ->init() function trying
5851 to refer to the previous architecture's global data structures. */
5852 swapout_gdbarch_swap (current_gdbarch);
5853 clear_gdbarch_swap (current_gdbarch);
5855 /* Save the previously selected architecture, setting the global to
5856 NULL. This stops ->init() trying to use the previous
5857 architecture's configuration. The previous architecture may not
5858 even be of the same architecture family. The most recent
5859 architecture of the same family is found at the head of the
5860 rego->arches list. */
5861 old_gdbarch = current_gdbarch;
5862 current_gdbarch = NULL;
5864 /* Ask the target for a replacement architecture. */
5865 new_gdbarch = rego->init (info, rego->arches);
5867 /* Did the target like it? No. Reject the change and revert to the
5868 old architecture. */
5869 if (new_gdbarch == NULL)
5872 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
5873 swapin_gdbarch_swap (old_gdbarch);
5874 current_gdbarch = old_gdbarch;
5878 /* Did the architecture change? No. Oops, put the old architecture
5880 if (old_gdbarch == new_gdbarch)
5883 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5885 new_gdbarch->bfd_arch_info->printable_name);
5886 swapin_gdbarch_swap (old_gdbarch);
5887 current_gdbarch = old_gdbarch;
5891 /* Is this a pre-existing architecture? Yes. Move it to the front
5892 of the list of architectures (keeping the list sorted Most
5893 Recently Used) and then copy it in. */
5895 struct gdbarch_list **list;
5896 for (list = ®o->arches;
5898 list = &(*list)->next)
5900 if ((*list)->gdbarch == new_gdbarch)
5902 struct gdbarch_list *this;
5904 fprintf_unfiltered (gdb_stdlog,
5905 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5907 new_gdbarch->bfd_arch_info->printable_name);
5910 (*list) = this->next;
5911 /* Insert in the front. */
5912 this->next = rego->arches;
5913 rego->arches = this;
5914 /* Copy the new architecture in. */
5915 current_gdbarch = new_gdbarch;
5916 swapin_gdbarch_swap (new_gdbarch);
5917 architecture_changed_event ();
5923 /* Prepend this new architecture to the architecture list (keep the
5924 list sorted Most Recently Used). */
5926 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5927 this->next = rego->arches;
5928 this->gdbarch = new_gdbarch;
5929 rego->arches = this;
5932 /* Switch to this new architecture marking it initialized. */
5933 current_gdbarch = new_gdbarch;
5934 current_gdbarch->initialized_p = 1;
5937 fprintf_unfiltered (gdb_stdlog,
5938 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5940 new_gdbarch->bfd_arch_info->printable_name);
5943 /* Check that the newly installed architecture is valid. Plug in
5944 any post init values. */
5945 new_gdbarch->dump_tdep = rego->dump_tdep;
5946 verify_gdbarch (new_gdbarch);
5948 /* Initialize the per-architecture memory (swap) areas.
5949 CURRENT_GDBARCH must be update before these modules are
5951 init_gdbarch_swap (new_gdbarch);
5953 /* Initialize the per-architecture data. CURRENT_GDBARCH
5954 must be updated before these modules are called. */
5955 architecture_changed_event ();
5958 gdbarch_dump (current_gdbarch, gdb_stdlog);
5966 /* Pointer to the target-dependent disassembly function. */
5967 int (*tm_print_insn) (bfd_vma, disassemble_info *);
5968 disassemble_info tm_print_insn_info;
5971 extern void _initialize_gdbarch (void);
5974 _initialize_gdbarch (void)
5976 struct cmd_list_element *c;
5978 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
5979 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
5980 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
5981 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
5982 tm_print_insn_info.print_address_func = dis_asm_print_address;
5984 add_show_from_set (add_set_cmd ("arch",
5987 (char *)&gdbarch_debug,
5988 "Set architecture debugging.\n\
5989 When non-zero, architecture debugging is enabled.", &setdebuglist),
5991 c = add_set_cmd ("archdebug",
5994 (char *)&gdbarch_debug,
5995 "Set architecture debugging.\n\
5996 When non-zero, architecture debugging is enabled.", &setlist);
5998 deprecate_cmd (c, "set debug arch");
5999 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");