1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 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_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
200 int believe_pcc_promotion;
201 int believe_pcc_promotion_type;
202 gdbarch_get_saved_register_ftype *get_saved_register;
203 gdbarch_register_convertible_ftype *register_convertible;
204 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
205 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
206 gdbarch_convert_register_p_ftype *convert_register_p;
207 gdbarch_register_to_value_ftype *register_to_value;
208 gdbarch_value_to_register_ftype *value_to_register;
209 gdbarch_pointer_to_address_ftype *pointer_to_address;
210 gdbarch_address_to_pointer_ftype *address_to_pointer;
211 gdbarch_integer_to_address_ftype *integer_to_address;
212 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
213 gdbarch_push_arguments_ftype *push_arguments;
214 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
215 gdbarch_push_return_address_ftype *push_return_address;
216 gdbarch_pop_frame_ftype *pop_frame;
217 gdbarch_store_struct_return_ftype *store_struct_return;
218 gdbarch_extract_return_value_ftype *extract_return_value;
219 gdbarch_store_return_value_ftype *store_return_value;
220 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
221 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
222 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
223 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
224 gdbarch_use_struct_convention_ftype *use_struct_convention;
225 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
226 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
227 gdbarch_skip_prologue_ftype *skip_prologue;
228 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
229 gdbarch_inner_than_ftype *inner_than;
230 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
231 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
232 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
233 CORE_ADDR decr_pc_after_break;
234 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
235 CORE_ADDR function_start_offset;
236 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
237 CORE_ADDR frame_args_skip;
238 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
239 gdbarch_frame_chain_ftype *frame_chain;
240 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
241 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
242 gdbarch_frame_args_address_ftype *frame_args_address;
243 gdbarch_frame_locals_address_ftype *frame_locals_address;
244 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
245 gdbarch_frame_num_args_ftype *frame_num_args;
246 gdbarch_stack_align_ftype *stack_align;
247 gdbarch_frame_align_ftype *frame_align;
248 int extra_stack_alignment_needed;
249 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
250 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
252 const struct floatformat * float_format;
253 const struct floatformat * double_format;
254 const struct floatformat * long_double_format;
255 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
256 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
257 gdbarch_smash_text_address_ftype *smash_text_address;
258 gdbarch_software_single_step_ftype *software_single_step;
259 gdbarch_print_insn_ftype *print_insn;
260 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
261 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
262 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
263 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
264 gdbarch_sigtramp_start_ftype *sigtramp_start;
265 gdbarch_sigtramp_end_ftype *sigtramp_end;
266 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
267 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
268 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
269 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
270 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
271 const char * name_of_malloc;
272 int cannot_step_breakpoint;
273 int have_nonsteppable_watchpoint;
274 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
275 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
276 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
277 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
281 /* The default architecture uses host values (for want of a better
284 extern const struct bfd_arch_info bfd_default_arch_struct;
286 struct gdbarch startup_gdbarch =
288 1, /* Always initialized. */
289 /* basic architecture information */
290 &bfd_default_arch_struct,
292 /* target specific vector and its dump routine */
294 /*per-architecture data-pointers and swap regions */
296 /* Multi-arch values */
300 8 * sizeof (LONGEST),
303 8 * sizeof (long double),
332 generic_register_byte,
333 generic_register_size,
335 generic_register_size,
339 default_print_registers_info,
354 generic_pc_in_call_dummy,
429 generic_in_function_epilogue_p,
430 construct_inferior_arguments,
440 default_register_reggroup_p,
441 /* startup_gdbarch() */
444 struct gdbarch *current_gdbarch = &startup_gdbarch;
446 /* Do any initialization needed for a non-multiarch configuration
447 after the _initialize_MODULE functions have been run. */
449 initialize_non_multiarch (void)
451 alloc_gdbarch_data (&startup_gdbarch);
452 /* Ensure that all swap areas are zeroed so that they again think
453 they are starting from scratch. */
454 clear_gdbarch_swap (&startup_gdbarch);
455 init_gdbarch_swap (&startup_gdbarch);
459 /* Create a new ``struct gdbarch'' based on information provided by
460 ``struct gdbarch_info''. */
463 gdbarch_alloc (const struct gdbarch_info *info,
464 struct gdbarch_tdep *tdep)
466 /* NOTE: The new architecture variable is named ``current_gdbarch''
467 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
468 the current local architecture and not the previous global
469 architecture. This ensures that the new architectures initial
470 values are not influenced by the previous architecture. Once
471 everything is parameterised with gdbarch, this will go away. */
472 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
473 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
475 alloc_gdbarch_data (current_gdbarch);
477 current_gdbarch->tdep = tdep;
479 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
480 current_gdbarch->byte_order = info->byte_order;
482 /* Force the explicit initialization of these. */
483 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
484 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
485 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
486 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
487 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
488 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
489 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
490 current_gdbarch->ptr_bit = TARGET_INT_BIT;
491 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
492 current_gdbarch->char_signed = -1;
493 current_gdbarch->read_pc = generic_target_read_pc;
494 current_gdbarch->write_pc = generic_target_write_pc;
495 current_gdbarch->read_fp = generic_target_read_fp;
496 current_gdbarch->read_sp = generic_target_read_sp;
497 current_gdbarch->write_sp = generic_target_write_sp;
498 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
499 current_gdbarch->num_regs = -1;
500 current_gdbarch->sp_regnum = -1;
501 current_gdbarch->fp_regnum = -1;
502 current_gdbarch->pc_regnum = -1;
503 current_gdbarch->ps_regnum = -1;
504 current_gdbarch->fp0_regnum = -1;
505 current_gdbarch->npc_regnum = -1;
506 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
507 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
508 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
509 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
510 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
511 current_gdbarch->register_name = legacy_register_name;
512 current_gdbarch->register_size = -1;
513 current_gdbarch->register_bytes = -1;
514 current_gdbarch->register_byte = generic_register_byte;
515 current_gdbarch->register_raw_size = generic_register_size;
516 current_gdbarch->max_register_raw_size = -1;
517 current_gdbarch->register_virtual_size = generic_register_size;
518 current_gdbarch->max_register_virtual_size = -1;
519 current_gdbarch->print_registers_info = default_print_registers_info;
520 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
521 current_gdbarch->cannot_fetch_register = cannot_register_not;
522 current_gdbarch->cannot_store_register = cannot_register_not;
523 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
524 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
525 current_gdbarch->call_dummy_start_offset = -1;
526 current_gdbarch->call_dummy_breakpoint_offset = -1;
527 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
528 current_gdbarch->call_dummy_length = -1;
529 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
530 current_gdbarch->call_dummy_p = -1;
531 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
532 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
533 current_gdbarch->call_dummy_stack_adjust_p = -1;
534 current_gdbarch->register_convertible = generic_register_convertible_not;
535 current_gdbarch->convert_register_p = legacy_convert_register_p;
536 current_gdbarch->register_to_value = legacy_register_to_value;
537 current_gdbarch->value_to_register = legacy_value_to_register;
538 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
539 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
540 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
541 current_gdbarch->push_arguments = default_push_arguments;
542 current_gdbarch->extract_return_value = legacy_extract_return_value;
543 current_gdbarch->store_return_value = legacy_store_return_value;
544 current_gdbarch->use_struct_convention = generic_use_struct_convention;
545 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
546 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
547 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
548 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
549 current_gdbarch->decr_pc_after_break = -1;
550 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
551 current_gdbarch->function_start_offset = -1;
552 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
553 current_gdbarch->frame_args_skip = -1;
554 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
555 current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
556 current_gdbarch->frame_args_address = get_frame_base;
557 current_gdbarch->frame_locals_address = get_frame_base;
558 current_gdbarch->extra_stack_alignment_needed = 1;
559 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
560 current_gdbarch->addr_bits_remove = core_addr_identity;
561 current_gdbarch->smash_text_address = core_addr_identity;
562 current_gdbarch->print_insn = legacy_print_insn;
563 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
564 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
565 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
566 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
567 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
568 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
569 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
570 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
571 current_gdbarch->name_of_malloc = "malloc";
572 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
573 /* gdbarch_alloc() */
575 return current_gdbarch;
579 /* Free a gdbarch struct. This should never happen in normal
580 operation --- once you've created a gdbarch, you keep it around.
581 However, if an architecture's init function encounters an error
582 building the structure, it may need to clean up a partially
583 constructed gdbarch. */
586 gdbarch_free (struct gdbarch *arch)
588 gdb_assert (arch != NULL);
589 free_gdbarch_data (arch);
594 /* Ensure that all values in a GDBARCH are reasonable. */
597 verify_gdbarch (struct gdbarch *gdbarch)
600 struct cleanup *cleanups;
603 /* Only perform sanity checks on a multi-arch target. */
606 log = mem_fileopen ();
607 cleanups = make_cleanup_ui_file_delete (log);
609 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
610 fprintf_unfiltered (log, "\n\tbyte-order");
611 if (gdbarch->bfd_arch_info == NULL)
612 fprintf_unfiltered (log, "\n\tbfd_arch_info");
613 /* Check those that need to be defined for the given multi-arch level. */
614 /* Skip verify of short_bit, invalid_p == 0 */
615 /* Skip verify of int_bit, invalid_p == 0 */
616 /* Skip verify of long_bit, invalid_p == 0 */
617 /* Skip verify of long_long_bit, invalid_p == 0 */
618 /* Skip verify of float_bit, invalid_p == 0 */
619 /* Skip verify of double_bit, invalid_p == 0 */
620 /* Skip verify of long_double_bit, invalid_p == 0 */
621 /* Skip verify of ptr_bit, invalid_p == 0 */
622 if (gdbarch->addr_bit == 0)
623 gdbarch->addr_bit = TARGET_PTR_BIT;
624 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
625 if (gdbarch->char_signed == -1)
626 gdbarch->char_signed = 1;
627 /* Skip verify of read_pc, invalid_p == 0 */
628 /* Skip verify of write_pc, invalid_p == 0 */
629 /* Skip verify of read_fp, invalid_p == 0 */
630 /* Skip verify of read_sp, invalid_p == 0 */
631 /* Skip verify of write_sp, invalid_p == 0 */
632 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
633 /* Skip verify of pseudo_register_read, has predicate */
634 /* Skip verify of pseudo_register_write, has predicate */
635 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
636 && (gdbarch->num_regs == -1))
637 fprintf_unfiltered (log, "\n\tnum_regs");
638 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
639 /* Skip verify of sp_regnum, invalid_p == 0 */
640 /* Skip verify of fp_regnum, invalid_p == 0 */
641 /* Skip verify of pc_regnum, invalid_p == 0 */
642 /* Skip verify of ps_regnum, invalid_p == 0 */
643 /* Skip verify of fp0_regnum, invalid_p == 0 */
644 /* Skip verify of npc_regnum, invalid_p == 0 */
645 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
646 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
647 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
648 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
649 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
650 /* Skip verify of register_name, invalid_p == 0 */
651 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
652 && (gdbarch->register_size == -1))
653 fprintf_unfiltered (log, "\n\tregister_size");
654 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
655 && (gdbarch->register_bytes == -1))
656 fprintf_unfiltered (log, "\n\tregister_bytes");
657 /* Skip verify of register_byte, invalid_p == 0 */
658 /* Skip verify of register_raw_size, invalid_p == 0 */
659 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
660 && (gdbarch->max_register_raw_size == -1))
661 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
662 /* Skip verify of register_virtual_size, invalid_p == 0 */
663 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
664 && (gdbarch->max_register_virtual_size == -1))
665 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
666 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
667 && (gdbarch->register_virtual_type == 0))
668 fprintf_unfiltered (log, "\n\tregister_virtual_type");
669 /* Skip verify of deprecated_do_registers_info, has predicate */
670 /* Skip verify of print_registers_info, invalid_p == 0 */
671 /* Skip verify of print_float_info, has predicate */
672 /* Skip verify of print_vector_info, has predicate */
673 /* Skip verify of register_sim_regno, invalid_p == 0 */
674 /* Skip verify of register_bytes_ok, has predicate */
675 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
676 /* Skip verify of cannot_store_register, invalid_p == 0 */
677 /* Skip verify of get_longjmp_target, has predicate */
678 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
679 /* Skip verify of call_dummy_location, invalid_p == 0 */
680 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
681 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
682 fprintf_unfiltered (log, "\n\tcall_dummy_address");
683 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
684 && (gdbarch->call_dummy_start_offset == -1))
685 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
686 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
687 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
688 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
689 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
690 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
691 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
692 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
693 && (gdbarch->call_dummy_length == -1))
694 fprintf_unfiltered (log, "\n\tcall_dummy_length");
695 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
696 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
697 && (gdbarch->call_dummy_p == -1))
698 fprintf_unfiltered (log, "\n\tcall_dummy_p");
699 /* Skip verify of call_dummy_words, invalid_p == 0 */
700 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
701 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
702 && (gdbarch->call_dummy_stack_adjust_p == -1))
703 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
704 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
705 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
706 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
707 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
708 && (gdbarch->fix_call_dummy == 0))
709 fprintf_unfiltered (log, "\n\tfix_call_dummy");
710 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
711 /* Skip verify of deprecated_init_frame_pc, has predicate */
712 /* Skip verify of get_saved_register, has predicate */
713 /* Skip verify of register_convertible, invalid_p == 0 */
714 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
715 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
716 /* Skip verify of convert_register_p, invalid_p == 0 */
717 /* Skip verify of register_to_value, invalid_p == 0 */
718 /* Skip verify of value_to_register, invalid_p == 0 */
719 /* Skip verify of pointer_to_address, invalid_p == 0 */
720 /* Skip verify of address_to_pointer, invalid_p == 0 */
721 /* Skip verify of integer_to_address, has predicate */
722 /* Skip verify of return_value_on_stack, invalid_p == 0 */
723 /* Skip verify of push_arguments, invalid_p == 0 */
724 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
725 && (gdbarch->push_dummy_frame == 0))
726 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
727 /* Skip verify of push_return_address, has predicate */
728 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
729 && (gdbarch->pop_frame == 0))
730 fprintf_unfiltered (log, "\n\tpop_frame");
731 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
732 && (gdbarch->store_struct_return == 0))
733 fprintf_unfiltered (log, "\n\tstore_struct_return");
734 /* Skip verify of extract_return_value, invalid_p == 0 */
735 /* Skip verify of store_return_value, invalid_p == 0 */
736 /* Skip verify of extract_struct_value_address, has predicate */
737 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
738 /* Skip verify of use_struct_convention, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
740 && (gdbarch->frame_init_saved_regs == 0))
741 fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
742 /* Skip verify of init_extra_frame_info, has predicate */
743 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
744 && (gdbarch->skip_prologue == 0))
745 fprintf_unfiltered (log, "\n\tskip_prologue");
746 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
747 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
748 && (gdbarch->inner_than == 0))
749 fprintf_unfiltered (log, "\n\tinner_than");
750 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
751 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
752 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
753 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
754 && (gdbarch->decr_pc_after_break == -1))
755 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
756 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
757 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
758 && (gdbarch->function_start_offset == -1))
759 fprintf_unfiltered (log, "\n\tfunction_start_offset");
760 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
761 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
762 && (gdbarch->frame_args_skip == -1))
763 fprintf_unfiltered (log, "\n\tframe_args_skip");
764 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
765 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
766 && (gdbarch->frame_chain == 0))
767 fprintf_unfiltered (log, "\n\tframe_chain");
768 /* Skip verify of frame_chain_valid, invalid_p == 0 */
769 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
770 && (gdbarch->frame_saved_pc == 0))
771 fprintf_unfiltered (log, "\n\tframe_saved_pc");
772 /* Skip verify of frame_args_address, invalid_p == 0 */
773 /* Skip verify of frame_locals_address, invalid_p == 0 */
774 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
775 && (gdbarch->saved_pc_after_call == 0))
776 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
777 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
778 && (gdbarch->frame_num_args == 0))
779 fprintf_unfiltered (log, "\n\tframe_num_args");
780 /* Skip verify of stack_align, has predicate */
781 /* Skip verify of frame_align, has predicate */
782 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
783 /* Skip verify of reg_struct_has_addr, has predicate */
784 /* Skip verify of save_dummy_frame_tos, has predicate */
785 if (gdbarch->float_format == 0)
786 gdbarch->float_format = default_float_format (gdbarch);
787 if (gdbarch->double_format == 0)
788 gdbarch->double_format = default_double_format (gdbarch);
789 if (gdbarch->long_double_format == 0)
790 gdbarch->long_double_format = default_double_format (gdbarch);
791 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
792 /* Skip verify of addr_bits_remove, invalid_p == 0 */
793 /* Skip verify of smash_text_address, invalid_p == 0 */
794 /* Skip verify of software_single_step, has predicate */
795 /* Skip verify of print_insn, invalid_p == 0 */
796 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
797 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
798 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
799 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
800 /* Skip verify of sigtramp_start, has predicate */
801 /* Skip verify of sigtramp_end, has predicate */
802 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
803 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
804 /* Skip verify of dwarf2_build_frame_info, has predicate */
805 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
806 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
807 /* Skip verify of name_of_malloc, invalid_p == 0 */
808 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
809 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
810 /* Skip verify of address_class_type_flags, has predicate */
811 /* Skip verify of address_class_type_flags_to_name, has predicate */
812 /* Skip verify of address_class_name_to_type_flags, has predicate */
813 /* Skip verify of register_reggroup_p, invalid_p == 0 */
814 buf = ui_file_xstrdup (log, &dummy);
815 make_cleanup (xfree, buf);
816 if (strlen (buf) > 0)
817 internal_error (__FILE__, __LINE__,
818 "verify_gdbarch: the following are invalid ...%s",
820 do_cleanups (cleanups);
824 /* Print out the details of the current architecture. */
826 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
827 just happens to match the global variable ``current_gdbarch''. That
828 way macros refering to that variable get the local and not the global
829 version - ulgh. Once everything is parameterised with gdbarch, this
833 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
835 fprintf_unfiltered (file,
836 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
839 fprintf_unfiltered (file,
840 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
841 gdbarch_frame_align_p (current_gdbarch));
843 fprintf_unfiltered (file,
844 "gdbarch_dump: frame_align = 0x%08lx\n",
845 (long) current_gdbarch->frame_align);
847 fprintf_unfiltered (file,
848 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
849 (long) current_gdbarch->in_function_epilogue_p);
851 fprintf_unfiltered (file,
852 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
853 (long) current_gdbarch->register_reggroup_p);
855 fprintf_unfiltered (file,
856 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
857 gdbarch_pseudo_register_read_p (current_gdbarch));
859 fprintf_unfiltered (file,
860 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
861 (long) current_gdbarch->pseudo_register_read);
863 fprintf_unfiltered (file,
864 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
865 gdbarch_pseudo_register_write_p (current_gdbarch));
867 fprintf_unfiltered (file,
868 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
869 (long) current_gdbarch->pseudo_register_write);
871 fprintf_unfiltered (file,
872 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
873 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
877 (long) current_gdbarch->address_class_name_to_type_flags);
878 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
879 fprintf_unfiltered (file,
880 "gdbarch_dump: %s # %s\n",
881 "ADDRESS_CLASS_TYPE_FLAGS_P()",
882 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
883 fprintf_unfiltered (file,
884 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
885 ADDRESS_CLASS_TYPE_FLAGS_P ());
887 #ifdef ADDRESS_CLASS_TYPE_FLAGS
888 fprintf_unfiltered (file,
889 "gdbarch_dump: %s # %s\n",
890 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
891 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
895 (long) current_gdbarch->address_class_type_flags
896 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
899 fprintf_unfiltered (file,
900 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
901 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
903 fprintf_unfiltered (file,
904 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
905 (long) current_gdbarch->address_class_type_flags_to_name);
906 #ifdef ADDRESS_TO_POINTER
908 /* Macro might contain `[{}]' when not multi-arch */
909 fprintf_unfiltered (file,
910 "gdbarch_dump: %s # %s\n",
911 "ADDRESS_TO_POINTER(type, buf, addr)",
912 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
917 (long) current_gdbarch->address_to_pointer
918 /*ADDRESS_TO_POINTER ()*/);
920 #ifdef ADDR_BITS_REMOVE
921 fprintf_unfiltered (file,
922 "gdbarch_dump: %s # %s\n",
923 "ADDR_BITS_REMOVE(addr)",
924 XSTRING (ADDR_BITS_REMOVE (addr)));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
928 (long) current_gdbarch->addr_bits_remove
929 /*ADDR_BITS_REMOVE ()*/);
931 #ifdef BELIEVE_PCC_PROMOTION
932 fprintf_unfiltered (file,
933 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
934 XSTRING (BELIEVE_PCC_PROMOTION));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
937 BELIEVE_PCC_PROMOTION);
939 #ifdef BELIEVE_PCC_PROMOTION_TYPE
940 fprintf_unfiltered (file,
941 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
942 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
943 fprintf_unfiltered (file,
944 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
945 BELIEVE_PCC_PROMOTION_TYPE);
947 #ifdef BREAKPOINT_FROM_PC
948 fprintf_unfiltered (file,
949 "gdbarch_dump: %s # %s\n",
950 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
951 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
955 (long) current_gdbarch->breakpoint_from_pc
956 /*BREAKPOINT_FROM_PC ()*/);
958 #ifdef CALL_DUMMY_ADDRESS
959 fprintf_unfiltered (file,
960 "gdbarch_dump: %s # %s\n",
961 "CALL_DUMMY_ADDRESS()",
962 XSTRING (CALL_DUMMY_ADDRESS ()));
964 fprintf_unfiltered (file,
965 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
966 (long) current_gdbarch->call_dummy_address
967 /*CALL_DUMMY_ADDRESS ()*/);
969 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
970 fprintf_unfiltered (file,
971 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
972 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
973 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
974 fprintf_unfiltered (file,
975 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
976 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
978 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
979 fprintf_unfiltered (file,
980 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
981 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
982 fprintf_unfiltered (file,
983 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
984 CALL_DUMMY_BREAKPOINT_OFFSET_P);
986 #ifdef CALL_DUMMY_LENGTH
987 fprintf_unfiltered (file,
988 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
989 XSTRING (CALL_DUMMY_LENGTH));
990 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
991 fprintf_unfiltered (file,
992 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
995 #ifdef CALL_DUMMY_LOCATION
996 fprintf_unfiltered (file,
997 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
998 XSTRING (CALL_DUMMY_LOCATION));
999 fprintf_unfiltered (file,
1000 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
1001 CALL_DUMMY_LOCATION);
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1006 XSTRING (CALL_DUMMY_P));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: CALL_DUMMY_P = %d\n",
1011 #ifdef CALL_DUMMY_STACK_ADJUST
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1014 XSTRING (CALL_DUMMY_STACK_ADJUST));
1015 if (CALL_DUMMY_STACK_ADJUST_P)
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1018 (long) CALL_DUMMY_STACK_ADJUST);
1020 #ifdef CALL_DUMMY_STACK_ADJUST_P
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1023 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1026 (long) CALL_DUMMY_STACK_ADJUST_P);
1028 #ifdef CALL_DUMMY_START_OFFSET
1029 fprintf_unfiltered (file,
1030 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1031 XSTRING (CALL_DUMMY_START_OFFSET));
1032 fprintf_unfiltered (file,
1033 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1034 (long) CALL_DUMMY_START_OFFSET);
1036 #ifdef CALL_DUMMY_WORDS
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1039 XSTRING (CALL_DUMMY_WORDS));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1042 (long) CALL_DUMMY_WORDS);
1044 #ifdef CANNOT_FETCH_REGISTER
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: %s # %s\n",
1047 "CANNOT_FETCH_REGISTER(regnum)",
1048 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
1052 (long) current_gdbarch->cannot_fetch_register
1053 /*CANNOT_FETCH_REGISTER ()*/);
1055 #ifdef CANNOT_STEP_BREAKPOINT
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1058 XSTRING (CANNOT_STEP_BREAKPOINT));
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1061 CANNOT_STEP_BREAKPOINT);
1063 #ifdef CANNOT_STORE_REGISTER
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: %s # %s\n",
1066 "CANNOT_STORE_REGISTER(regnum)",
1067 XSTRING (CANNOT_STORE_REGISTER (regnum)));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1071 (long) current_gdbarch->cannot_store_register
1072 /*CANNOT_STORE_REGISTER ()*/);
1074 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1076 /* Macro might contain `[{}]' when not multi-arch */
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: %s # %s\n",
1079 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1080 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1085 (long) current_gdbarch->coff_make_msymbol_special
1086 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1091 (long) current_gdbarch->construct_inferior_arguments);
1092 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: %s # %s\n",
1095 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1096 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1100 (long) current_gdbarch->convert_from_func_ptr_addr
1101 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1103 #ifdef CONVERT_REGISTER_P
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: %s # %s\n",
1106 "CONVERT_REGISTER_P(regnum)",
1107 XSTRING (CONVERT_REGISTER_P (regnum)));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1111 (long) current_gdbarch->convert_register_p
1112 /*CONVERT_REGISTER_P ()*/);
1114 #ifdef DECR_PC_AFTER_BREAK
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1117 XSTRING (DECR_PC_AFTER_BREAK));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1120 (long) DECR_PC_AFTER_BREAK);
1122 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1123 fprintf_unfiltered (file,
1124 "gdbarch_dump: %s # %s\n",
1125 "DEPRECATED_DO_REGISTERS_INFO_P()",
1126 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1129 DEPRECATED_DO_REGISTERS_INFO_P ());
1131 #ifdef DEPRECATED_DO_REGISTERS_INFO
1133 /* Macro might contain `[{}]' when not multi-arch */
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: %s # %s\n",
1136 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1137 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1140 fprintf_unfiltered (file,
1141 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1142 (long) current_gdbarch->deprecated_do_registers_info
1143 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1145 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1147 /* Macro might contain `[{}]' when not multi-arch */
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: %s # %s\n",
1150 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1151 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1156 (long) current_gdbarch->deprecated_extract_return_value
1157 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1159 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: %s # %s\n",
1162 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1163 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1166 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1168 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: %s # %s\n",
1171 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1172 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1176 (long) current_gdbarch->deprecated_extract_struct_value_address
1177 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1179 #ifdef DEPRECATED_INIT_FRAME_PC_P
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: %s # %s\n",
1182 "DEPRECATED_INIT_FRAME_PC_P()",
1183 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1186 DEPRECATED_INIT_FRAME_PC_P ());
1188 #ifdef DEPRECATED_INIT_FRAME_PC
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: %s # %s\n",
1191 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1192 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1196 (long) current_gdbarch->deprecated_init_frame_pc
1197 /*DEPRECATED_INIT_FRAME_PC ()*/);
1199 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: %s # %s\n",
1202 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1203 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1204 fprintf_unfiltered (file,
1205 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1206 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1208 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1209 fprintf_unfiltered (file,
1210 "gdbarch_dump: %s # %s\n",
1211 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1212 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1216 (long) current_gdbarch->deprecated_init_frame_pc_first
1217 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1219 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: %s # %s\n",
1222 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1223 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1226 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1228 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: %s # %s\n",
1231 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1232 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1234 fprintf_unfiltered (file,
1235 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1236 (long) current_gdbarch->deprecated_pc_in_call_dummy
1237 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1239 #ifdef DEPRECATED_STORE_RETURN_VALUE
1241 /* Macro might contain `[{}]' when not multi-arch */
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: %s # %s\n",
1244 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1245 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1250 (long) current_gdbarch->deprecated_store_return_value
1251 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1253 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1256 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1259 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1261 #ifdef DWARF2_BUILD_FRAME_INFO_P
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: %s # %s\n",
1264 "DWARF2_BUILD_FRAME_INFO_P()",
1265 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1268 DWARF2_BUILD_FRAME_INFO_P ());
1270 #ifdef DWARF2_BUILD_FRAME_INFO
1272 /* Macro might contain `[{}]' when not multi-arch */
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: %s # %s\n",
1275 "DWARF2_BUILD_FRAME_INFO(objfile)",
1276 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1279 fprintf_unfiltered (file,
1280 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1281 (long) current_gdbarch->dwarf2_build_frame_info
1282 /*DWARF2_BUILD_FRAME_INFO ()*/);
1284 #ifdef DWARF2_REG_TO_REGNUM
1285 fprintf_unfiltered (file,
1286 "gdbarch_dump: %s # %s\n",
1287 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1288 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1290 fprintf_unfiltered (file,
1291 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1292 (long) current_gdbarch->dwarf2_reg_to_regnum
1293 /*DWARF2_REG_TO_REGNUM ()*/);
1295 #ifdef DWARF_REG_TO_REGNUM
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: %s # %s\n",
1298 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1299 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1303 (long) current_gdbarch->dwarf_reg_to_regnum
1304 /*DWARF_REG_TO_REGNUM ()*/);
1306 #ifdef ECOFF_REG_TO_REGNUM
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: %s # %s\n",
1309 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1310 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1314 (long) current_gdbarch->ecoff_reg_to_regnum
1315 /*ECOFF_REG_TO_REGNUM ()*/);
1317 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1319 /* Macro might contain `[{}]' when not multi-arch */
1320 fprintf_unfiltered (file,
1321 "gdbarch_dump: %s # %s\n",
1322 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1323 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1326 fprintf_unfiltered (file,
1327 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1328 (long) current_gdbarch->elf_make_msymbol_special
1329 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1331 #ifdef EXTRACT_RETURN_VALUE
1333 /* Macro might contain `[{}]' when not multi-arch */
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: %s # %s\n",
1336 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1337 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1342 (long) current_gdbarch->extract_return_value
1343 /*EXTRACT_RETURN_VALUE ()*/);
1345 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: %s # %s\n",
1348 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1349 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1352 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1354 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: %s # %s\n",
1357 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1358 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1362 (long) current_gdbarch->extract_struct_value_address
1363 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1365 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1368 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1371 EXTRA_STACK_ALIGNMENT_NEEDED);
1373 #ifdef FIX_CALL_DUMMY
1375 /* Macro might contain `[{}]' when not multi-arch */
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: %s # %s\n",
1378 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1379 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1384 (long) current_gdbarch->fix_call_dummy
1385 /*FIX_CALL_DUMMY ()*/);
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: FP0_REGNUM # %s\n",
1390 XSTRING (FP0_REGNUM));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: FP0_REGNUM = %d\n",
1396 fprintf_unfiltered (file,
1397 "gdbarch_dump: FP_REGNUM # %s\n",
1398 XSTRING (FP_REGNUM));
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: FP_REGNUM = %d\n",
1403 #ifdef FRAMELESS_FUNCTION_INVOCATION
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: %s # %s\n",
1406 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1407 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1411 (long) current_gdbarch->frameless_function_invocation
1412 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1414 #ifdef FRAME_ARGS_ADDRESS
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: %s # %s\n",
1417 "FRAME_ARGS_ADDRESS(fi)",
1418 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1422 (long) current_gdbarch->frame_args_address
1423 /*FRAME_ARGS_ADDRESS ()*/);
1425 #ifdef FRAME_ARGS_SKIP
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1428 XSTRING (FRAME_ARGS_SKIP));
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1431 (long) FRAME_ARGS_SKIP);
1434 fprintf_unfiltered (file,
1435 "gdbarch_dump: %s # %s\n",
1436 "FRAME_CHAIN(frame)",
1437 XSTRING (FRAME_CHAIN (frame)));
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: FRAME_CHAIN = <0x%08lx>\n",
1441 (long) current_gdbarch->frame_chain
1442 /*FRAME_CHAIN ()*/);
1444 #ifdef FRAME_CHAIN_VALID
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: %s # %s\n",
1447 "FRAME_CHAIN_VALID(chain, thisframe)",
1448 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: FRAME_CHAIN_VALID = <0x%08lx>\n",
1452 (long) current_gdbarch->frame_chain_valid
1453 /*FRAME_CHAIN_VALID ()*/);
1455 #ifdef FRAME_INIT_SAVED_REGS
1457 /* Macro might contain `[{}]' when not multi-arch */
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: %s # %s\n",
1460 "FRAME_INIT_SAVED_REGS(frame)",
1461 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1464 fprintf_unfiltered (file,
1465 "gdbarch_dump: FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1466 (long) current_gdbarch->frame_init_saved_regs
1467 /*FRAME_INIT_SAVED_REGS ()*/);
1469 #ifdef FRAME_LOCALS_ADDRESS
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: %s # %s\n",
1472 "FRAME_LOCALS_ADDRESS(fi)",
1473 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1477 (long) current_gdbarch->frame_locals_address
1478 /*FRAME_LOCALS_ADDRESS ()*/);
1480 #ifdef FRAME_NUM_ARGS
1481 fprintf_unfiltered (file,
1482 "gdbarch_dump: %s # %s\n",
1483 "FRAME_NUM_ARGS(frame)",
1484 XSTRING (FRAME_NUM_ARGS (frame)));
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1488 (long) current_gdbarch->frame_num_args
1489 /*FRAME_NUM_ARGS ()*/);
1491 #ifdef FRAME_SAVED_PC
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: %s # %s\n",
1494 "FRAME_SAVED_PC(fi)",
1495 XSTRING (FRAME_SAVED_PC (fi)));
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: FRAME_SAVED_PC = <0x%08lx>\n",
1499 (long) current_gdbarch->frame_saved_pc
1500 /*FRAME_SAVED_PC ()*/);
1502 #ifdef FUNCTION_START_OFFSET
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1505 XSTRING (FUNCTION_START_OFFSET));
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1508 (long) FUNCTION_START_OFFSET);
1510 #ifdef GET_LONGJMP_TARGET_P
1511 fprintf_unfiltered (file,
1512 "gdbarch_dump: %s # %s\n",
1513 "GET_LONGJMP_TARGET_P()",
1514 XSTRING (GET_LONGJMP_TARGET_P ()));
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1517 GET_LONGJMP_TARGET_P ());
1519 #ifdef GET_LONGJMP_TARGET
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: %s # %s\n",
1522 "GET_LONGJMP_TARGET(pc)",
1523 XSTRING (GET_LONGJMP_TARGET (pc)));
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1527 (long) current_gdbarch->get_longjmp_target
1528 /*GET_LONGJMP_TARGET ()*/);
1530 #ifdef GET_SAVED_REGISTER_P
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: %s # %s\n",
1533 "GET_SAVED_REGISTER_P()",
1534 XSTRING (GET_SAVED_REGISTER_P ()));
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: GET_SAVED_REGISTER_P() = %d\n",
1537 GET_SAVED_REGISTER_P ());
1539 #ifdef GET_SAVED_REGISTER
1541 /* Macro might contain `[{}]' when not multi-arch */
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: %s # %s\n",
1544 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1545 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: GET_SAVED_REGISTER = <0x%08lx>\n",
1550 (long) current_gdbarch->get_saved_register
1551 /*GET_SAVED_REGISTER ()*/);
1553 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1554 fprintf_unfiltered (file,
1555 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1556 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1559 HAVE_NONSTEPPABLE_WATCHPOINT);
1561 #ifdef INIT_EXTRA_FRAME_INFO_P
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: %s # %s\n",
1564 "INIT_EXTRA_FRAME_INFO_P()",
1565 XSTRING (INIT_EXTRA_FRAME_INFO_P ()));
1566 fprintf_unfiltered (file,
1567 "gdbarch_dump: INIT_EXTRA_FRAME_INFO_P() = %d\n",
1568 INIT_EXTRA_FRAME_INFO_P ());
1570 #ifdef INIT_EXTRA_FRAME_INFO
1572 /* Macro might contain `[{}]' when not multi-arch */
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: %s # %s\n",
1575 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1576 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1581 (long) current_gdbarch->init_extra_frame_info
1582 /*INIT_EXTRA_FRAME_INFO ()*/);
1585 fprintf_unfiltered (file,
1586 "gdbarch_dump: %s # %s\n",
1587 "INNER_THAN(lhs, rhs)",
1588 XSTRING (INNER_THAN (lhs, rhs)));
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1592 (long) current_gdbarch->inner_than
1595 #ifdef INTEGER_TO_ADDRESS_P
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: %s # %s\n",
1598 "INTEGER_TO_ADDRESS_P()",
1599 XSTRING (INTEGER_TO_ADDRESS_P ()));
1600 fprintf_unfiltered (file,
1601 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1602 INTEGER_TO_ADDRESS_P ());
1604 #ifdef INTEGER_TO_ADDRESS
1605 fprintf_unfiltered (file,
1606 "gdbarch_dump: %s # %s\n",
1607 "INTEGER_TO_ADDRESS(type, buf)",
1608 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1610 fprintf_unfiltered (file,
1611 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1612 (long) current_gdbarch->integer_to_address
1613 /*INTEGER_TO_ADDRESS ()*/);
1615 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1616 fprintf_unfiltered (file,
1617 "gdbarch_dump: %s # %s\n",
1618 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1619 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1621 fprintf_unfiltered (file,
1622 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1623 (long) current_gdbarch->in_solib_call_trampoline
1624 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1626 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1627 fprintf_unfiltered (file,
1628 "gdbarch_dump: %s # %s\n",
1629 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1630 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1632 fprintf_unfiltered (file,
1633 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1634 (long) current_gdbarch->in_solib_return_trampoline
1635 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1637 #ifdef MAX_REGISTER_RAW_SIZE
1638 fprintf_unfiltered (file,
1639 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1640 XSTRING (MAX_REGISTER_RAW_SIZE));
1641 fprintf_unfiltered (file,
1642 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1643 MAX_REGISTER_RAW_SIZE);
1645 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1646 fprintf_unfiltered (file,
1647 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1648 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1649 fprintf_unfiltered (file,
1650 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1651 MAX_REGISTER_VIRTUAL_SIZE);
1653 #ifdef MEMORY_INSERT_BREAKPOINT
1654 fprintf_unfiltered (file,
1655 "gdbarch_dump: %s # %s\n",
1656 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1657 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1659 fprintf_unfiltered (file,
1660 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1661 (long) current_gdbarch->memory_insert_breakpoint
1662 /*MEMORY_INSERT_BREAKPOINT ()*/);
1664 #ifdef MEMORY_REMOVE_BREAKPOINT
1665 fprintf_unfiltered (file,
1666 "gdbarch_dump: %s # %s\n",
1667 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1668 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1670 fprintf_unfiltered (file,
1671 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1672 (long) current_gdbarch->memory_remove_breakpoint
1673 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1675 #ifdef NAME_OF_MALLOC
1676 fprintf_unfiltered (file,
1677 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1678 XSTRING (NAME_OF_MALLOC));
1679 fprintf_unfiltered (file,
1680 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1684 fprintf_unfiltered (file,
1685 "gdbarch_dump: NPC_REGNUM # %s\n",
1686 XSTRING (NPC_REGNUM));
1687 fprintf_unfiltered (file,
1688 "gdbarch_dump: NPC_REGNUM = %d\n",
1691 #ifdef NUM_PSEUDO_REGS
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1694 XSTRING (NUM_PSEUDO_REGS));
1695 fprintf_unfiltered (file,
1696 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1700 fprintf_unfiltered (file,
1701 "gdbarch_dump: NUM_REGS # %s\n",
1702 XSTRING (NUM_REGS));
1703 fprintf_unfiltered (file,
1704 "gdbarch_dump: NUM_REGS = %d\n",
1707 #ifdef PARM_BOUNDARY
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1710 XSTRING (PARM_BOUNDARY));
1711 fprintf_unfiltered (file,
1712 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1715 #ifdef PC_IN_SIGTRAMP
1716 fprintf_unfiltered (file,
1717 "gdbarch_dump: %s # %s\n",
1718 "PC_IN_SIGTRAMP(pc, name)",
1719 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1721 fprintf_unfiltered (file,
1722 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1723 (long) current_gdbarch->pc_in_sigtramp
1724 /*PC_IN_SIGTRAMP ()*/);
1727 fprintf_unfiltered (file,
1728 "gdbarch_dump: PC_REGNUM # %s\n",
1729 XSTRING (PC_REGNUM));
1730 fprintf_unfiltered (file,
1731 "gdbarch_dump: PC_REGNUM = %d\n",
1734 #ifdef POINTER_TO_ADDRESS
1735 fprintf_unfiltered (file,
1736 "gdbarch_dump: %s # %s\n",
1737 "POINTER_TO_ADDRESS(type, buf)",
1738 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1740 fprintf_unfiltered (file,
1741 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1742 (long) current_gdbarch->pointer_to_address
1743 /*POINTER_TO_ADDRESS ()*/);
1747 /* Macro might contain `[{}]' when not multi-arch */
1748 fprintf_unfiltered (file,
1749 "gdbarch_dump: %s # %s\n",
1751 XSTRING (POP_FRAME (-)));
1754 fprintf_unfiltered (file,
1755 "gdbarch_dump: POP_FRAME = <0x%08lx>\n",
1756 (long) current_gdbarch->pop_frame
1759 #ifdef PREPARE_TO_PROCEED
1760 fprintf_unfiltered (file,
1761 "gdbarch_dump: %s # %s\n",
1762 "PREPARE_TO_PROCEED(select_it)",
1763 XSTRING (PREPARE_TO_PROCEED (select_it)));
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1767 (long) current_gdbarch->prepare_to_proceed
1768 /*PREPARE_TO_PROCEED ()*/);
1771 fprintf_unfiltered (file,
1772 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1773 gdbarch_print_float_info_p (current_gdbarch));
1775 fprintf_unfiltered (file,
1776 "gdbarch_dump: print_float_info = 0x%08lx\n",
1777 (long) current_gdbarch->print_float_info);
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1781 (long) current_gdbarch->print_registers_info);
1783 fprintf_unfiltered (file,
1784 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1785 gdbarch_print_vector_info_p (current_gdbarch));
1787 fprintf_unfiltered (file,
1788 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1789 (long) current_gdbarch->print_vector_info);
1790 #ifdef PROLOGUE_FRAMELESS_P
1791 fprintf_unfiltered (file,
1792 "gdbarch_dump: %s # %s\n",
1793 "PROLOGUE_FRAMELESS_P(ip)",
1794 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1798 (long) current_gdbarch->prologue_frameless_p
1799 /*PROLOGUE_FRAMELESS_P ()*/);
1802 fprintf_unfiltered (file,
1803 "gdbarch_dump: PS_REGNUM # %s\n",
1804 XSTRING (PS_REGNUM));
1805 fprintf_unfiltered (file,
1806 "gdbarch_dump: PS_REGNUM = %d\n",
1809 #ifdef PUSH_ARGUMENTS
1810 fprintf_unfiltered (file,
1811 "gdbarch_dump: %s # %s\n",
1812 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1813 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
1817 (long) current_gdbarch->push_arguments
1818 /*PUSH_ARGUMENTS ()*/);
1820 #ifdef PUSH_DUMMY_FRAME
1822 /* Macro might contain `[{}]' when not multi-arch */
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: %s # %s\n",
1825 "PUSH_DUMMY_FRAME(-)",
1826 XSTRING (PUSH_DUMMY_FRAME (-)));
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: PUSH_DUMMY_FRAME = <0x%08lx>\n",
1831 (long) current_gdbarch->push_dummy_frame
1832 /*PUSH_DUMMY_FRAME ()*/);
1834 #ifdef PUSH_RETURN_ADDRESS_P
1835 fprintf_unfiltered (file,
1836 "gdbarch_dump: %s # %s\n",
1837 "PUSH_RETURN_ADDRESS_P()",
1838 XSTRING (PUSH_RETURN_ADDRESS_P ()));
1839 fprintf_unfiltered (file,
1840 "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
1841 PUSH_RETURN_ADDRESS_P ());
1843 #ifdef PUSH_RETURN_ADDRESS
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: %s # %s\n",
1846 "PUSH_RETURN_ADDRESS(pc, sp)",
1847 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1849 fprintf_unfiltered (file,
1850 "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1851 (long) current_gdbarch->push_return_address
1852 /*PUSH_RETURN_ADDRESS ()*/);
1854 #ifdef REGISTER_BYTE
1855 fprintf_unfiltered (file,
1856 "gdbarch_dump: %s # %s\n",
1857 "REGISTER_BYTE(reg_nr)",
1858 XSTRING (REGISTER_BYTE (reg_nr)));
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1862 (long) current_gdbarch->register_byte
1863 /*REGISTER_BYTE ()*/);
1865 #ifdef REGISTER_BYTES
1866 fprintf_unfiltered (file,
1867 "gdbarch_dump: REGISTER_BYTES # %s\n",
1868 XSTRING (REGISTER_BYTES));
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: REGISTER_BYTES = %d\n",
1873 #ifdef REGISTER_BYTES_OK_P
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: %s # %s\n",
1876 "REGISTER_BYTES_OK_P()",
1877 XSTRING (REGISTER_BYTES_OK_P ()));
1878 fprintf_unfiltered (file,
1879 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1880 REGISTER_BYTES_OK_P ());
1882 #ifdef REGISTER_BYTES_OK
1883 fprintf_unfiltered (file,
1884 "gdbarch_dump: %s # %s\n",
1885 "REGISTER_BYTES_OK(nr_bytes)",
1886 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1890 (long) current_gdbarch->register_bytes_ok
1891 /*REGISTER_BYTES_OK ()*/);
1893 #ifdef REGISTER_CONVERTIBLE
1894 fprintf_unfiltered (file,
1895 "gdbarch_dump: %s # %s\n",
1896 "REGISTER_CONVERTIBLE(nr)",
1897 XSTRING (REGISTER_CONVERTIBLE (nr)));
1899 fprintf_unfiltered (file,
1900 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1901 (long) current_gdbarch->register_convertible
1902 /*REGISTER_CONVERTIBLE ()*/);
1904 #ifdef REGISTER_CONVERT_TO_RAW
1906 /* Macro might contain `[{}]' when not multi-arch */
1907 fprintf_unfiltered (file,
1908 "gdbarch_dump: %s # %s\n",
1909 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1910 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1915 (long) current_gdbarch->register_convert_to_raw
1916 /*REGISTER_CONVERT_TO_RAW ()*/);
1918 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1920 /* Macro might contain `[{}]' when not multi-arch */
1921 fprintf_unfiltered (file,
1922 "gdbarch_dump: %s # %s\n",
1923 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1924 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1927 fprintf_unfiltered (file,
1928 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1929 (long) current_gdbarch->register_convert_to_virtual
1930 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1932 #ifdef REGISTER_NAME
1933 fprintf_unfiltered (file,
1934 "gdbarch_dump: %s # %s\n",
1935 "REGISTER_NAME(regnr)",
1936 XSTRING (REGISTER_NAME (regnr)));
1938 fprintf_unfiltered (file,
1939 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1940 (long) current_gdbarch->register_name
1941 /*REGISTER_NAME ()*/);
1943 #ifdef REGISTER_RAW_SIZE
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: %s # %s\n",
1946 "REGISTER_RAW_SIZE(reg_nr)",
1947 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
1951 (long) current_gdbarch->register_raw_size
1952 /*REGISTER_RAW_SIZE ()*/);
1954 #ifdef REGISTER_SIM_REGNO
1955 fprintf_unfiltered (file,
1956 "gdbarch_dump: %s # %s\n",
1957 "REGISTER_SIM_REGNO(reg_nr)",
1958 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1962 (long) current_gdbarch->register_sim_regno
1963 /*REGISTER_SIM_REGNO ()*/);
1965 #ifdef REGISTER_SIZE
1966 fprintf_unfiltered (file,
1967 "gdbarch_dump: REGISTER_SIZE # %s\n",
1968 XSTRING (REGISTER_SIZE));
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: REGISTER_SIZE = %d\n",
1973 #ifdef REGISTER_TO_VALUE
1975 /* Macro might contain `[{}]' when not multi-arch */
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: %s # %s\n",
1978 "REGISTER_TO_VALUE(regnum, type, from, to)",
1979 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
1982 fprintf_unfiltered (file,
1983 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1984 (long) current_gdbarch->register_to_value
1985 /*REGISTER_TO_VALUE ()*/);
1987 #ifdef REGISTER_VIRTUAL_SIZE
1988 fprintf_unfiltered (file,
1989 "gdbarch_dump: %s # %s\n",
1990 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1991 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
1993 fprintf_unfiltered (file,
1994 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1995 (long) current_gdbarch->register_virtual_size
1996 /*REGISTER_VIRTUAL_SIZE ()*/);
1998 #ifdef REGISTER_VIRTUAL_TYPE
1999 fprintf_unfiltered (file,
2000 "gdbarch_dump: %s # %s\n",
2001 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2002 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2004 fprintf_unfiltered (file,
2005 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2006 (long) current_gdbarch->register_virtual_type
2007 /*REGISTER_VIRTUAL_TYPE ()*/);
2009 #ifdef REG_STRUCT_HAS_ADDR_P
2010 fprintf_unfiltered (file,
2011 "gdbarch_dump: %s # %s\n",
2012 "REG_STRUCT_HAS_ADDR_P()",
2013 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2014 fprintf_unfiltered (file,
2015 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2016 REG_STRUCT_HAS_ADDR_P ());
2018 #ifdef REG_STRUCT_HAS_ADDR
2019 fprintf_unfiltered (file,
2020 "gdbarch_dump: %s # %s\n",
2021 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2022 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2024 fprintf_unfiltered (file,
2025 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2026 (long) current_gdbarch->reg_struct_has_addr
2027 /*REG_STRUCT_HAS_ADDR ()*/);
2029 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2031 /* Macro might contain `[{}]' when not multi-arch */
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: %s # %s\n",
2034 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2035 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2038 fprintf_unfiltered (file,
2039 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2040 (long) current_gdbarch->remote_translate_xfer_address
2041 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2043 #ifdef RETURN_VALUE_ON_STACK
2044 fprintf_unfiltered (file,
2045 "gdbarch_dump: %s # %s\n",
2046 "RETURN_VALUE_ON_STACK(type)",
2047 XSTRING (RETURN_VALUE_ON_STACK (type)));
2049 fprintf_unfiltered (file,
2050 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2051 (long) current_gdbarch->return_value_on_stack
2052 /*RETURN_VALUE_ON_STACK ()*/);
2054 #ifdef SAVED_PC_AFTER_CALL
2055 fprintf_unfiltered (file,
2056 "gdbarch_dump: %s # %s\n",
2057 "SAVED_PC_AFTER_CALL(frame)",
2058 XSTRING (SAVED_PC_AFTER_CALL (frame)));
2060 fprintf_unfiltered (file,
2061 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2062 (long) current_gdbarch->saved_pc_after_call
2063 /*SAVED_PC_AFTER_CALL ()*/);
2065 #ifdef SAVE_DUMMY_FRAME_TOS_P
2066 fprintf_unfiltered (file,
2067 "gdbarch_dump: %s # %s\n",
2068 "SAVE_DUMMY_FRAME_TOS_P()",
2069 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2070 fprintf_unfiltered (file,
2071 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2072 SAVE_DUMMY_FRAME_TOS_P ());
2074 #ifdef SAVE_DUMMY_FRAME_TOS
2076 /* Macro might contain `[{}]' when not multi-arch */
2077 fprintf_unfiltered (file,
2078 "gdbarch_dump: %s # %s\n",
2079 "SAVE_DUMMY_FRAME_TOS(sp)",
2080 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2083 fprintf_unfiltered (file,
2084 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2085 (long) current_gdbarch->save_dummy_frame_tos
2086 /*SAVE_DUMMY_FRAME_TOS ()*/);
2088 #ifdef SDB_REG_TO_REGNUM
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: %s # %s\n",
2091 "SDB_REG_TO_REGNUM(sdb_regnr)",
2092 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2094 fprintf_unfiltered (file,
2095 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2096 (long) current_gdbarch->sdb_reg_to_regnum
2097 /*SDB_REG_TO_REGNUM ()*/);
2099 #ifdef SIGTRAMP_END_P
2100 fprintf_unfiltered (file,
2101 "gdbarch_dump: %s # %s\n",
2103 XSTRING (SIGTRAMP_END_P ()));
2104 fprintf_unfiltered (file,
2105 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2109 fprintf_unfiltered (file,
2110 "gdbarch_dump: %s # %s\n",
2112 XSTRING (SIGTRAMP_END (pc)));
2114 fprintf_unfiltered (file,
2115 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2116 (long) current_gdbarch->sigtramp_end
2117 /*SIGTRAMP_END ()*/);
2119 #ifdef SIGTRAMP_START_P
2120 fprintf_unfiltered (file,
2121 "gdbarch_dump: %s # %s\n",
2122 "SIGTRAMP_START_P()",
2123 XSTRING (SIGTRAMP_START_P ()));
2124 fprintf_unfiltered (file,
2125 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2126 SIGTRAMP_START_P ());
2128 #ifdef SIGTRAMP_START
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: %s # %s\n",
2131 "SIGTRAMP_START(pc)",
2132 XSTRING (SIGTRAMP_START (pc)));
2134 fprintf_unfiltered (file,
2135 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2136 (long) current_gdbarch->sigtramp_start
2137 /*SIGTRAMP_START ()*/);
2139 #ifdef SIZEOF_CALL_DUMMY_WORDS
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2142 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
2143 fprintf_unfiltered (file,
2144 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
2145 (long) SIZEOF_CALL_DUMMY_WORDS);
2147 #ifdef SKIP_PROLOGUE
2148 fprintf_unfiltered (file,
2149 "gdbarch_dump: %s # %s\n",
2150 "SKIP_PROLOGUE(ip)",
2151 XSTRING (SKIP_PROLOGUE (ip)));
2153 fprintf_unfiltered (file,
2154 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2155 (long) current_gdbarch->skip_prologue
2156 /*SKIP_PROLOGUE ()*/);
2158 #ifdef SKIP_TRAMPOLINE_CODE
2159 fprintf_unfiltered (file,
2160 "gdbarch_dump: %s # %s\n",
2161 "SKIP_TRAMPOLINE_CODE(pc)",
2162 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2164 fprintf_unfiltered (file,
2165 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2166 (long) current_gdbarch->skip_trampoline_code
2167 /*SKIP_TRAMPOLINE_CODE ()*/);
2169 #ifdef SMASH_TEXT_ADDRESS
2170 fprintf_unfiltered (file,
2171 "gdbarch_dump: %s # %s\n",
2172 "SMASH_TEXT_ADDRESS(addr)",
2173 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2175 fprintf_unfiltered (file,
2176 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2177 (long) current_gdbarch->smash_text_address
2178 /*SMASH_TEXT_ADDRESS ()*/);
2180 #ifdef SOFTWARE_SINGLE_STEP_P
2181 fprintf_unfiltered (file,
2182 "gdbarch_dump: %s # %s\n",
2183 "SOFTWARE_SINGLE_STEP_P()",
2184 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2185 fprintf_unfiltered (file,
2186 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2187 SOFTWARE_SINGLE_STEP_P ());
2189 #ifdef SOFTWARE_SINGLE_STEP
2191 /* Macro might contain `[{}]' when not multi-arch */
2192 fprintf_unfiltered (file,
2193 "gdbarch_dump: %s # %s\n",
2194 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2195 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2198 fprintf_unfiltered (file,
2199 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2200 (long) current_gdbarch->software_single_step
2201 /*SOFTWARE_SINGLE_STEP ()*/);
2204 fprintf_unfiltered (file,
2205 "gdbarch_dump: SP_REGNUM # %s\n",
2206 XSTRING (SP_REGNUM));
2207 fprintf_unfiltered (file,
2208 "gdbarch_dump: SP_REGNUM = %d\n",
2211 #ifdef STAB_REG_TO_REGNUM
2212 fprintf_unfiltered (file,
2213 "gdbarch_dump: %s # %s\n",
2214 "STAB_REG_TO_REGNUM(stab_regnr)",
2215 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2217 fprintf_unfiltered (file,
2218 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2219 (long) current_gdbarch->stab_reg_to_regnum
2220 /*STAB_REG_TO_REGNUM ()*/);
2222 #ifdef STACK_ALIGN_P
2223 fprintf_unfiltered (file,
2224 "gdbarch_dump: %s # %s\n",
2226 XSTRING (STACK_ALIGN_P ()));
2227 fprintf_unfiltered (file,
2228 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2232 fprintf_unfiltered (file,
2233 "gdbarch_dump: %s # %s\n",
2235 XSTRING (STACK_ALIGN (sp)));
2237 fprintf_unfiltered (file,
2238 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2239 (long) current_gdbarch->stack_align
2240 /*STACK_ALIGN ()*/);
2242 #ifdef STORE_RETURN_VALUE
2244 /* Macro might contain `[{}]' when not multi-arch */
2245 fprintf_unfiltered (file,
2246 "gdbarch_dump: %s # %s\n",
2247 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2248 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2251 fprintf_unfiltered (file,
2252 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2253 (long) current_gdbarch->store_return_value
2254 /*STORE_RETURN_VALUE ()*/);
2256 #ifdef STORE_STRUCT_RETURN
2258 /* Macro might contain `[{}]' when not multi-arch */
2259 fprintf_unfiltered (file,
2260 "gdbarch_dump: %s # %s\n",
2261 "STORE_STRUCT_RETURN(addr, sp)",
2262 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
2265 fprintf_unfiltered (file,
2266 "gdbarch_dump: STORE_STRUCT_RETURN = <0x%08lx>\n",
2267 (long) current_gdbarch->store_struct_return
2268 /*STORE_STRUCT_RETURN ()*/);
2270 #ifdef TARGET_ADDR_BIT
2271 fprintf_unfiltered (file,
2272 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2273 XSTRING (TARGET_ADDR_BIT));
2274 fprintf_unfiltered (file,
2275 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2278 #ifdef TARGET_ARCHITECTURE
2279 fprintf_unfiltered (file,
2280 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2281 XSTRING (TARGET_ARCHITECTURE));
2282 if (TARGET_ARCHITECTURE != NULL)
2283 fprintf_unfiltered (file,
2284 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2285 TARGET_ARCHITECTURE->printable_name);
2287 #ifdef TARGET_BFD_VMA_BIT
2288 fprintf_unfiltered (file,
2289 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2290 XSTRING (TARGET_BFD_VMA_BIT));
2291 fprintf_unfiltered (file,
2292 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2293 TARGET_BFD_VMA_BIT);
2295 #ifdef TARGET_BYTE_ORDER
2296 fprintf_unfiltered (file,
2297 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2298 XSTRING (TARGET_BYTE_ORDER));
2299 fprintf_unfiltered (file,
2300 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2301 (long) TARGET_BYTE_ORDER);
2303 #ifdef TARGET_CHAR_SIGNED
2304 fprintf_unfiltered (file,
2305 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2306 XSTRING (TARGET_CHAR_SIGNED));
2307 fprintf_unfiltered (file,
2308 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2309 TARGET_CHAR_SIGNED);
2311 #ifdef TARGET_DOUBLE_BIT
2312 fprintf_unfiltered (file,
2313 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2314 XSTRING (TARGET_DOUBLE_BIT));
2315 fprintf_unfiltered (file,
2316 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2319 #ifdef TARGET_DOUBLE_FORMAT
2320 fprintf_unfiltered (file,
2321 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2322 XSTRING (TARGET_DOUBLE_FORMAT));
2323 fprintf_unfiltered (file,
2324 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2325 (TARGET_DOUBLE_FORMAT)->name);
2327 #ifdef TARGET_FLOAT_BIT
2328 fprintf_unfiltered (file,
2329 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2330 XSTRING (TARGET_FLOAT_BIT));
2331 fprintf_unfiltered (file,
2332 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2335 #ifdef TARGET_FLOAT_FORMAT
2336 fprintf_unfiltered (file,
2337 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2338 XSTRING (TARGET_FLOAT_FORMAT));
2339 fprintf_unfiltered (file,
2340 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2341 (TARGET_FLOAT_FORMAT)->name);
2343 #ifdef TARGET_INT_BIT
2344 fprintf_unfiltered (file,
2345 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2346 XSTRING (TARGET_INT_BIT));
2347 fprintf_unfiltered (file,
2348 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2351 #ifdef TARGET_LONG_BIT
2352 fprintf_unfiltered (file,
2353 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2354 XSTRING (TARGET_LONG_BIT));
2355 fprintf_unfiltered (file,
2356 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2359 #ifdef TARGET_LONG_DOUBLE_BIT
2360 fprintf_unfiltered (file,
2361 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2362 XSTRING (TARGET_LONG_DOUBLE_BIT));
2363 fprintf_unfiltered (file,
2364 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2365 TARGET_LONG_DOUBLE_BIT);
2367 #ifdef TARGET_LONG_DOUBLE_FORMAT
2368 fprintf_unfiltered (file,
2369 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2370 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2371 fprintf_unfiltered (file,
2372 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2373 (TARGET_LONG_DOUBLE_FORMAT)->name);
2375 #ifdef TARGET_LONG_LONG_BIT
2376 fprintf_unfiltered (file,
2377 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2378 XSTRING (TARGET_LONG_LONG_BIT));
2379 fprintf_unfiltered (file,
2380 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2381 TARGET_LONG_LONG_BIT);
2383 #ifdef TARGET_PRINT_INSN
2384 fprintf_unfiltered (file,
2385 "gdbarch_dump: %s # %s\n",
2386 "TARGET_PRINT_INSN(vma, info)",
2387 XSTRING (TARGET_PRINT_INSN (vma, info)));
2389 fprintf_unfiltered (file,
2390 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2391 (long) current_gdbarch->print_insn
2392 /*TARGET_PRINT_INSN ()*/);
2394 #ifdef TARGET_PTR_BIT
2395 fprintf_unfiltered (file,
2396 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2397 XSTRING (TARGET_PTR_BIT));
2398 fprintf_unfiltered (file,
2399 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2402 #ifdef TARGET_READ_FP
2403 fprintf_unfiltered (file,
2404 "gdbarch_dump: %s # %s\n",
2406 XSTRING (TARGET_READ_FP ()));
2408 fprintf_unfiltered (file,
2409 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2410 (long) current_gdbarch->read_fp
2411 /*TARGET_READ_FP ()*/);
2413 #ifdef TARGET_READ_PC
2414 fprintf_unfiltered (file,
2415 "gdbarch_dump: %s # %s\n",
2416 "TARGET_READ_PC(ptid)",
2417 XSTRING (TARGET_READ_PC (ptid)));
2419 fprintf_unfiltered (file,
2420 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2421 (long) current_gdbarch->read_pc
2422 /*TARGET_READ_PC ()*/);
2424 #ifdef TARGET_READ_SP
2425 fprintf_unfiltered (file,
2426 "gdbarch_dump: %s # %s\n",
2428 XSTRING (TARGET_READ_SP ()));
2430 fprintf_unfiltered (file,
2431 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2432 (long) current_gdbarch->read_sp
2433 /*TARGET_READ_SP ()*/);
2435 #ifdef TARGET_SHORT_BIT
2436 fprintf_unfiltered (file,
2437 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2438 XSTRING (TARGET_SHORT_BIT));
2439 fprintf_unfiltered (file,
2440 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2443 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2445 /* Macro might contain `[{}]' when not multi-arch */
2446 fprintf_unfiltered (file,
2447 "gdbarch_dump: %s # %s\n",
2448 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2449 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2452 fprintf_unfiltered (file,
2453 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2454 (long) current_gdbarch->virtual_frame_pointer
2455 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2457 #ifdef TARGET_WRITE_PC
2459 /* Macro might contain `[{}]' when not multi-arch */
2460 fprintf_unfiltered (file,
2461 "gdbarch_dump: %s # %s\n",
2462 "TARGET_WRITE_PC(val, ptid)",
2463 XSTRING (TARGET_WRITE_PC (val, ptid)));
2466 fprintf_unfiltered (file,
2467 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2468 (long) current_gdbarch->write_pc
2469 /*TARGET_WRITE_PC ()*/);
2471 #ifdef TARGET_WRITE_SP
2473 /* Macro might contain `[{}]' when not multi-arch */
2474 fprintf_unfiltered (file,
2475 "gdbarch_dump: %s # %s\n",
2476 "TARGET_WRITE_SP(val)",
2477 XSTRING (TARGET_WRITE_SP (val)));
2480 fprintf_unfiltered (file,
2481 "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
2482 (long) current_gdbarch->write_sp
2483 /*TARGET_WRITE_SP ()*/);
2485 #ifdef USE_STRUCT_CONVENTION
2486 fprintf_unfiltered (file,
2487 "gdbarch_dump: %s # %s\n",
2488 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2489 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2491 fprintf_unfiltered (file,
2492 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2493 (long) current_gdbarch->use_struct_convention
2494 /*USE_STRUCT_CONVENTION ()*/);
2496 #ifdef VALUE_TO_REGISTER
2498 /* Macro might contain `[{}]' when not multi-arch */
2499 fprintf_unfiltered (file,
2500 "gdbarch_dump: %s # %s\n",
2501 "VALUE_TO_REGISTER(type, regnum, from, to)",
2502 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2505 fprintf_unfiltered (file,
2506 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2507 (long) current_gdbarch->value_to_register
2508 /*VALUE_TO_REGISTER ()*/);
2510 if (current_gdbarch->dump_tdep != NULL)
2511 current_gdbarch->dump_tdep (current_gdbarch, file);
2514 struct gdbarch_tdep *
2515 gdbarch_tdep (struct gdbarch *gdbarch)
2517 if (gdbarch_debug >= 2)
2518 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2519 return gdbarch->tdep;
2523 const struct bfd_arch_info *
2524 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2526 gdb_assert (gdbarch != NULL);
2527 if (gdbarch_debug >= 2)
2528 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2529 return gdbarch->bfd_arch_info;
2533 gdbarch_byte_order (struct gdbarch *gdbarch)
2535 gdb_assert (gdbarch != NULL);
2536 if (gdbarch_debug >= 2)
2537 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2538 return gdbarch->byte_order;
2542 gdbarch_short_bit (struct gdbarch *gdbarch)
2544 gdb_assert (gdbarch != NULL);
2545 /* Skip verify of short_bit, invalid_p == 0 */
2546 if (gdbarch_debug >= 2)
2547 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2548 return gdbarch->short_bit;
2552 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2555 gdbarch->short_bit = short_bit;
2559 gdbarch_int_bit (struct gdbarch *gdbarch)
2561 gdb_assert (gdbarch != NULL);
2562 /* Skip verify of int_bit, invalid_p == 0 */
2563 if (gdbarch_debug >= 2)
2564 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2565 return gdbarch->int_bit;
2569 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2572 gdbarch->int_bit = int_bit;
2576 gdbarch_long_bit (struct gdbarch *gdbarch)
2578 gdb_assert (gdbarch != NULL);
2579 /* Skip verify of long_bit, invalid_p == 0 */
2580 if (gdbarch_debug >= 2)
2581 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2582 return gdbarch->long_bit;
2586 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2589 gdbarch->long_bit = long_bit;
2593 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2595 gdb_assert (gdbarch != NULL);
2596 /* Skip verify of long_long_bit, invalid_p == 0 */
2597 if (gdbarch_debug >= 2)
2598 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2599 return gdbarch->long_long_bit;
2603 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2606 gdbarch->long_long_bit = long_long_bit;
2610 gdbarch_float_bit (struct gdbarch *gdbarch)
2612 gdb_assert (gdbarch != NULL);
2613 /* Skip verify of float_bit, invalid_p == 0 */
2614 if (gdbarch_debug >= 2)
2615 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2616 return gdbarch->float_bit;
2620 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2623 gdbarch->float_bit = float_bit;
2627 gdbarch_double_bit (struct gdbarch *gdbarch)
2629 gdb_assert (gdbarch != NULL);
2630 /* Skip verify of double_bit, invalid_p == 0 */
2631 if (gdbarch_debug >= 2)
2632 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2633 return gdbarch->double_bit;
2637 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2640 gdbarch->double_bit = double_bit;
2644 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2646 gdb_assert (gdbarch != NULL);
2647 /* Skip verify of long_double_bit, invalid_p == 0 */
2648 if (gdbarch_debug >= 2)
2649 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2650 return gdbarch->long_double_bit;
2654 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2655 int long_double_bit)
2657 gdbarch->long_double_bit = long_double_bit;
2661 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2663 gdb_assert (gdbarch != NULL);
2664 /* Skip verify of ptr_bit, invalid_p == 0 */
2665 if (gdbarch_debug >= 2)
2666 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2667 return gdbarch->ptr_bit;
2671 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2674 gdbarch->ptr_bit = ptr_bit;
2678 gdbarch_addr_bit (struct gdbarch *gdbarch)
2680 gdb_assert (gdbarch != NULL);
2681 if (gdbarch->addr_bit == 0)
2682 internal_error (__FILE__, __LINE__,
2683 "gdbarch: gdbarch_addr_bit invalid");
2684 if (gdbarch_debug >= 2)
2685 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2686 return gdbarch->addr_bit;
2690 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2693 gdbarch->addr_bit = addr_bit;
2697 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2699 gdb_assert (gdbarch != NULL);
2700 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2701 if (gdbarch_debug >= 2)
2702 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2703 return gdbarch->bfd_vma_bit;
2707 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2710 gdbarch->bfd_vma_bit = bfd_vma_bit;
2714 gdbarch_char_signed (struct gdbarch *gdbarch)
2716 gdb_assert (gdbarch != NULL);
2717 if (gdbarch->char_signed == -1)
2718 internal_error (__FILE__, __LINE__,
2719 "gdbarch: gdbarch_char_signed invalid");
2720 if (gdbarch_debug >= 2)
2721 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2722 return gdbarch->char_signed;
2726 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2729 gdbarch->char_signed = char_signed;
2733 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2735 gdb_assert (gdbarch != NULL);
2736 if (gdbarch->read_pc == 0)
2737 internal_error (__FILE__, __LINE__,
2738 "gdbarch: gdbarch_read_pc invalid");
2739 if (gdbarch_debug >= 2)
2740 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2741 return gdbarch->read_pc (ptid);
2745 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2746 gdbarch_read_pc_ftype read_pc)
2748 gdbarch->read_pc = read_pc;
2752 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2754 gdb_assert (gdbarch != NULL);
2755 if (gdbarch->write_pc == 0)
2756 internal_error (__FILE__, __LINE__,
2757 "gdbarch: gdbarch_write_pc invalid");
2758 if (gdbarch_debug >= 2)
2759 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2760 gdbarch->write_pc (val, ptid);
2764 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2765 gdbarch_write_pc_ftype write_pc)
2767 gdbarch->write_pc = write_pc;
2771 gdbarch_read_fp (struct gdbarch *gdbarch)
2773 gdb_assert (gdbarch != NULL);
2774 if (gdbarch->read_fp == 0)
2775 internal_error (__FILE__, __LINE__,
2776 "gdbarch: gdbarch_read_fp invalid");
2777 if (gdbarch_debug >= 2)
2778 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2779 return gdbarch->read_fp ();
2783 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2784 gdbarch_read_fp_ftype read_fp)
2786 gdbarch->read_fp = read_fp;
2790 gdbarch_read_sp (struct gdbarch *gdbarch)
2792 gdb_assert (gdbarch != NULL);
2793 if (gdbarch->read_sp == 0)
2794 internal_error (__FILE__, __LINE__,
2795 "gdbarch: gdbarch_read_sp invalid");
2796 if (gdbarch_debug >= 2)
2797 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2798 return gdbarch->read_sp ();
2802 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2803 gdbarch_read_sp_ftype read_sp)
2805 gdbarch->read_sp = read_sp;
2809 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2811 gdb_assert (gdbarch != NULL);
2812 if (gdbarch->write_sp == 0)
2813 internal_error (__FILE__, __LINE__,
2814 "gdbarch: gdbarch_write_sp invalid");
2815 if (gdbarch_debug >= 2)
2816 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2817 gdbarch->write_sp (val);
2821 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2822 gdbarch_write_sp_ftype write_sp)
2824 gdbarch->write_sp = write_sp;
2828 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2830 gdb_assert (gdbarch != NULL);
2831 if (gdbarch->virtual_frame_pointer == 0)
2832 internal_error (__FILE__, __LINE__,
2833 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2834 if (gdbarch_debug >= 2)
2835 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2836 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2840 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2841 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2843 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2847 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2849 gdb_assert (gdbarch != NULL);
2850 return gdbarch->pseudo_register_read != 0;
2854 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2856 gdb_assert (gdbarch != NULL);
2857 if (gdbarch->pseudo_register_read == 0)
2858 internal_error (__FILE__, __LINE__,
2859 "gdbarch: gdbarch_pseudo_register_read invalid");
2860 if (gdbarch_debug >= 2)
2861 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2862 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2866 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2867 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2869 gdbarch->pseudo_register_read = pseudo_register_read;
2873 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2875 gdb_assert (gdbarch != NULL);
2876 return gdbarch->pseudo_register_write != 0;
2880 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2882 gdb_assert (gdbarch != NULL);
2883 if (gdbarch->pseudo_register_write == 0)
2884 internal_error (__FILE__, __LINE__,
2885 "gdbarch: gdbarch_pseudo_register_write invalid");
2886 if (gdbarch_debug >= 2)
2887 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2888 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2892 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2893 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2895 gdbarch->pseudo_register_write = pseudo_register_write;
2899 gdbarch_num_regs (struct gdbarch *gdbarch)
2901 gdb_assert (gdbarch != NULL);
2902 if (gdbarch->num_regs == -1)
2903 internal_error (__FILE__, __LINE__,
2904 "gdbarch: gdbarch_num_regs invalid");
2905 if (gdbarch_debug >= 2)
2906 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2907 return gdbarch->num_regs;
2911 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2914 gdbarch->num_regs = num_regs;
2918 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2920 gdb_assert (gdbarch != NULL);
2921 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2922 if (gdbarch_debug >= 2)
2923 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2924 return gdbarch->num_pseudo_regs;
2928 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2929 int num_pseudo_regs)
2931 gdbarch->num_pseudo_regs = num_pseudo_regs;
2935 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2937 gdb_assert (gdbarch != NULL);
2938 /* Skip verify of sp_regnum, invalid_p == 0 */
2939 if (gdbarch_debug >= 2)
2940 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2941 return gdbarch->sp_regnum;
2945 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2948 gdbarch->sp_regnum = sp_regnum;
2952 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2954 gdb_assert (gdbarch != NULL);
2955 /* Skip verify of fp_regnum, invalid_p == 0 */
2956 if (gdbarch_debug >= 2)
2957 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2958 return gdbarch->fp_regnum;
2962 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2965 gdbarch->fp_regnum = fp_regnum;
2969 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2971 gdb_assert (gdbarch != NULL);
2972 /* Skip verify of pc_regnum, invalid_p == 0 */
2973 if (gdbarch_debug >= 2)
2974 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2975 return gdbarch->pc_regnum;
2979 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2982 gdbarch->pc_regnum = pc_regnum;
2986 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2988 gdb_assert (gdbarch != NULL);
2989 /* Skip verify of ps_regnum, invalid_p == 0 */
2990 if (gdbarch_debug >= 2)
2991 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2992 return gdbarch->ps_regnum;
2996 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2999 gdbarch->ps_regnum = ps_regnum;
3003 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3005 gdb_assert (gdbarch != NULL);
3006 /* Skip verify of fp0_regnum, invalid_p == 0 */
3007 if (gdbarch_debug >= 2)
3008 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3009 return gdbarch->fp0_regnum;
3013 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3016 gdbarch->fp0_regnum = fp0_regnum;
3020 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3022 gdb_assert (gdbarch != NULL);
3023 /* Skip verify of npc_regnum, invalid_p == 0 */
3024 if (gdbarch_debug >= 2)
3025 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3026 return gdbarch->npc_regnum;
3030 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3033 gdbarch->npc_regnum = npc_regnum;
3037 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3039 gdb_assert (gdbarch != NULL);
3040 if (gdbarch->stab_reg_to_regnum == 0)
3041 internal_error (__FILE__, __LINE__,
3042 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3043 if (gdbarch_debug >= 2)
3044 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3045 return gdbarch->stab_reg_to_regnum (stab_regnr);
3049 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3050 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3052 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3056 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3058 gdb_assert (gdbarch != NULL);
3059 if (gdbarch->ecoff_reg_to_regnum == 0)
3060 internal_error (__FILE__, __LINE__,
3061 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3062 if (gdbarch_debug >= 2)
3063 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3064 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3068 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3069 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3071 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3075 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3077 gdb_assert (gdbarch != NULL);
3078 if (gdbarch->dwarf_reg_to_regnum == 0)
3079 internal_error (__FILE__, __LINE__,
3080 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3081 if (gdbarch_debug >= 2)
3082 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3083 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3087 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3088 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3090 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3094 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3096 gdb_assert (gdbarch != NULL);
3097 if (gdbarch->sdb_reg_to_regnum == 0)
3098 internal_error (__FILE__, __LINE__,
3099 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3102 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3106 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3107 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3109 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3113 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3115 gdb_assert (gdbarch != NULL);
3116 if (gdbarch->dwarf2_reg_to_regnum == 0)
3117 internal_error (__FILE__, __LINE__,
3118 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3119 if (gdbarch_debug >= 2)
3120 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3121 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3125 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3126 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3128 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3132 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3134 gdb_assert (gdbarch != NULL);
3135 if (gdbarch->register_name == 0)
3136 internal_error (__FILE__, __LINE__,
3137 "gdbarch: gdbarch_register_name invalid");
3138 if (gdbarch_debug >= 2)
3139 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3140 return gdbarch->register_name (regnr);
3144 set_gdbarch_register_name (struct gdbarch *gdbarch,
3145 gdbarch_register_name_ftype register_name)
3147 gdbarch->register_name = register_name;
3151 gdbarch_register_size (struct gdbarch *gdbarch)
3153 gdb_assert (gdbarch != NULL);
3154 if (gdbarch->register_size == -1)
3155 internal_error (__FILE__, __LINE__,
3156 "gdbarch: gdbarch_register_size invalid");
3157 if (gdbarch_debug >= 2)
3158 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
3159 return gdbarch->register_size;
3163 set_gdbarch_register_size (struct gdbarch *gdbarch,
3166 gdbarch->register_size = register_size;
3170 gdbarch_register_bytes (struct gdbarch *gdbarch)
3172 gdb_assert (gdbarch != NULL);
3173 if (gdbarch->register_bytes == -1)
3174 internal_error (__FILE__, __LINE__,
3175 "gdbarch: gdbarch_register_bytes invalid");
3176 if (gdbarch_debug >= 2)
3177 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3178 return gdbarch->register_bytes;
3182 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3185 gdbarch->register_bytes = register_bytes;
3189 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3191 gdb_assert (gdbarch != NULL);
3192 if (gdbarch->register_byte == 0)
3193 internal_error (__FILE__, __LINE__,
3194 "gdbarch: gdbarch_register_byte invalid");
3195 if (gdbarch_debug >= 2)
3196 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3197 return gdbarch->register_byte (reg_nr);
3201 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3202 gdbarch_register_byte_ftype register_byte)
3204 gdbarch->register_byte = register_byte;
3208 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3210 gdb_assert (gdbarch != NULL);
3211 if (gdbarch->register_raw_size == 0)
3212 internal_error (__FILE__, __LINE__,
3213 "gdbarch: gdbarch_register_raw_size invalid");
3214 if (gdbarch_debug >= 2)
3215 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3216 return gdbarch->register_raw_size (reg_nr);
3220 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3221 gdbarch_register_raw_size_ftype register_raw_size)
3223 gdbarch->register_raw_size = register_raw_size;
3227 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
3229 gdb_assert (gdbarch != NULL);
3230 if (gdbarch->max_register_raw_size == -1)
3231 internal_error (__FILE__, __LINE__,
3232 "gdbarch: gdbarch_max_register_raw_size invalid");
3233 if (gdbarch_debug >= 2)
3234 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
3235 return gdbarch->max_register_raw_size;
3239 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
3240 int max_register_raw_size)
3242 gdbarch->max_register_raw_size = max_register_raw_size;
3246 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3248 gdb_assert (gdbarch != NULL);
3249 if (gdbarch->register_virtual_size == 0)
3250 internal_error (__FILE__, __LINE__,
3251 "gdbarch: gdbarch_register_virtual_size invalid");
3252 if (gdbarch_debug >= 2)
3253 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3254 return gdbarch->register_virtual_size (reg_nr);
3258 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3259 gdbarch_register_virtual_size_ftype register_virtual_size)
3261 gdbarch->register_virtual_size = register_virtual_size;
3265 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
3267 gdb_assert (gdbarch != NULL);
3268 if (gdbarch->max_register_virtual_size == -1)
3269 internal_error (__FILE__, __LINE__,
3270 "gdbarch: gdbarch_max_register_virtual_size invalid");
3271 if (gdbarch_debug >= 2)
3272 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
3273 return gdbarch->max_register_virtual_size;
3277 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
3278 int max_register_virtual_size)
3280 gdbarch->max_register_virtual_size = max_register_virtual_size;
3284 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3286 gdb_assert (gdbarch != NULL);
3287 if (gdbarch->register_virtual_type == 0)
3288 internal_error (__FILE__, __LINE__,
3289 "gdbarch: gdbarch_register_virtual_type invalid");
3290 if (gdbarch_debug >= 2)
3291 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3292 return gdbarch->register_virtual_type (reg_nr);
3296 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3297 gdbarch_register_virtual_type_ftype register_virtual_type)
3299 gdbarch->register_virtual_type = register_virtual_type;
3303 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3305 gdb_assert (gdbarch != NULL);
3306 return gdbarch->deprecated_do_registers_info != 0;
3310 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3312 gdb_assert (gdbarch != NULL);
3313 if (gdbarch->deprecated_do_registers_info == 0)
3314 internal_error (__FILE__, __LINE__,
3315 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3316 if (gdbarch_debug >= 2)
3317 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3318 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3322 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3323 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3325 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3329 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3331 gdb_assert (gdbarch != NULL);
3332 if (gdbarch->print_registers_info == 0)
3333 internal_error (__FILE__, __LINE__,
3334 "gdbarch: gdbarch_print_registers_info invalid");
3335 if (gdbarch_debug >= 2)
3336 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3337 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3341 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3342 gdbarch_print_registers_info_ftype print_registers_info)
3344 gdbarch->print_registers_info = print_registers_info;
3348 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3350 gdb_assert (gdbarch != NULL);
3351 return gdbarch->print_float_info != 0;
3355 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3357 gdb_assert (gdbarch != NULL);
3358 if (gdbarch->print_float_info == 0)
3359 internal_error (__FILE__, __LINE__,
3360 "gdbarch: gdbarch_print_float_info invalid");
3361 if (gdbarch_debug >= 2)
3362 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3363 gdbarch->print_float_info (gdbarch, file, frame, args);
3367 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3368 gdbarch_print_float_info_ftype print_float_info)
3370 gdbarch->print_float_info = print_float_info;
3374 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3376 gdb_assert (gdbarch != NULL);
3377 return gdbarch->print_vector_info != 0;
3381 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3383 gdb_assert (gdbarch != NULL);
3384 if (gdbarch->print_vector_info == 0)
3385 internal_error (__FILE__, __LINE__,
3386 "gdbarch: gdbarch_print_vector_info invalid");
3387 if (gdbarch_debug >= 2)
3388 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3389 gdbarch->print_vector_info (gdbarch, file, frame, args);
3393 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3394 gdbarch_print_vector_info_ftype print_vector_info)
3396 gdbarch->print_vector_info = print_vector_info;
3400 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3402 gdb_assert (gdbarch != NULL);
3403 if (gdbarch->register_sim_regno == 0)
3404 internal_error (__FILE__, __LINE__,
3405 "gdbarch: gdbarch_register_sim_regno invalid");
3406 if (gdbarch_debug >= 2)
3407 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3408 return gdbarch->register_sim_regno (reg_nr);
3412 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3413 gdbarch_register_sim_regno_ftype register_sim_regno)
3415 gdbarch->register_sim_regno = register_sim_regno;
3419 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3421 gdb_assert (gdbarch != NULL);
3422 return gdbarch->register_bytes_ok != 0;
3426 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3428 gdb_assert (gdbarch != NULL);
3429 if (gdbarch->register_bytes_ok == 0)
3430 internal_error (__FILE__, __LINE__,
3431 "gdbarch: gdbarch_register_bytes_ok invalid");
3432 if (gdbarch_debug >= 2)
3433 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3434 return gdbarch->register_bytes_ok (nr_bytes);
3438 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3439 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3441 gdbarch->register_bytes_ok = register_bytes_ok;
3445 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3447 gdb_assert (gdbarch != NULL);
3448 if (gdbarch->cannot_fetch_register == 0)
3449 internal_error (__FILE__, __LINE__,
3450 "gdbarch: gdbarch_cannot_fetch_register invalid");
3451 if (gdbarch_debug >= 2)
3452 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3453 return gdbarch->cannot_fetch_register (regnum);
3457 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3458 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3460 gdbarch->cannot_fetch_register = cannot_fetch_register;
3464 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3466 gdb_assert (gdbarch != NULL);
3467 if (gdbarch->cannot_store_register == 0)
3468 internal_error (__FILE__, __LINE__,
3469 "gdbarch: gdbarch_cannot_store_register invalid");
3470 if (gdbarch_debug >= 2)
3471 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3472 return gdbarch->cannot_store_register (regnum);
3476 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3477 gdbarch_cannot_store_register_ftype cannot_store_register)
3479 gdbarch->cannot_store_register = cannot_store_register;
3483 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3485 gdb_assert (gdbarch != NULL);
3486 return gdbarch->get_longjmp_target != 0;
3490 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3492 gdb_assert (gdbarch != NULL);
3493 if (gdbarch->get_longjmp_target == 0)
3494 internal_error (__FILE__, __LINE__,
3495 "gdbarch: gdbarch_get_longjmp_target invalid");
3496 if (gdbarch_debug >= 2)
3497 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3498 return gdbarch->get_longjmp_target (pc);
3502 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3503 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3505 gdbarch->get_longjmp_target = get_longjmp_target;
3509 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3511 gdb_assert (gdbarch != NULL);
3512 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3513 if (gdbarch_debug >= 2)
3514 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3515 return gdbarch->deprecated_use_generic_dummy_frames;
3519 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3520 int deprecated_use_generic_dummy_frames)
3522 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3526 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3528 gdb_assert (gdbarch != NULL);
3529 /* Skip verify of call_dummy_location, invalid_p == 0 */
3530 if (gdbarch_debug >= 2)
3531 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3532 return gdbarch->call_dummy_location;
3536 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3537 int call_dummy_location)
3539 gdbarch->call_dummy_location = call_dummy_location;
3543 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3545 gdb_assert (gdbarch != NULL);
3546 if (gdbarch->call_dummy_address == 0)
3547 internal_error (__FILE__, __LINE__,
3548 "gdbarch: gdbarch_call_dummy_address invalid");
3549 if (gdbarch_debug >= 2)
3550 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3551 return gdbarch->call_dummy_address ();
3555 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3556 gdbarch_call_dummy_address_ftype call_dummy_address)
3558 gdbarch->call_dummy_address = call_dummy_address;
3562 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3564 gdb_assert (gdbarch != NULL);
3565 if (gdbarch->call_dummy_start_offset == -1)
3566 internal_error (__FILE__, __LINE__,
3567 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3568 if (gdbarch_debug >= 2)
3569 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3570 return gdbarch->call_dummy_start_offset;
3574 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3575 CORE_ADDR call_dummy_start_offset)
3577 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3581 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3583 gdb_assert (gdbarch != NULL);
3584 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
3585 internal_error (__FILE__, __LINE__,
3586 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3587 if (gdbarch_debug >= 2)
3588 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3589 return gdbarch->call_dummy_breakpoint_offset;
3593 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3594 CORE_ADDR call_dummy_breakpoint_offset)
3596 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3600 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3602 gdb_assert (gdbarch != NULL);
3603 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3604 internal_error (__FILE__, __LINE__,
3605 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3606 if (gdbarch_debug >= 2)
3607 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3608 return gdbarch->call_dummy_breakpoint_offset_p;
3612 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3613 int call_dummy_breakpoint_offset_p)
3615 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3619 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3621 gdb_assert (gdbarch != NULL);
3622 if (gdbarch->call_dummy_length == -1)
3623 internal_error (__FILE__, __LINE__,
3624 "gdbarch: gdbarch_call_dummy_length invalid");
3625 if (gdbarch_debug >= 2)
3626 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3627 return gdbarch->call_dummy_length;
3631 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3632 int call_dummy_length)
3634 gdbarch->call_dummy_length = call_dummy_length;
3638 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3640 gdb_assert (gdbarch != NULL);
3641 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3645 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3647 gdb_assert (gdbarch != NULL);
3648 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3649 internal_error (__FILE__, __LINE__,
3650 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3651 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3652 if (gdbarch_debug >= 2)
3653 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3654 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3658 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3659 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3661 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3665 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3667 gdb_assert (gdbarch != NULL);
3668 if (gdbarch->call_dummy_p == -1)
3669 internal_error (__FILE__, __LINE__,
3670 "gdbarch: gdbarch_call_dummy_p invalid");
3671 if (gdbarch_debug >= 2)
3672 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3673 return gdbarch->call_dummy_p;
3677 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3680 gdbarch->call_dummy_p = call_dummy_p;
3684 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3686 gdb_assert (gdbarch != NULL);
3687 /* Skip verify of call_dummy_words, invalid_p == 0 */
3688 if (gdbarch_debug >= 2)
3689 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3690 return gdbarch->call_dummy_words;
3694 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3695 LONGEST * call_dummy_words)
3697 gdbarch->call_dummy_words = call_dummy_words;
3701 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3703 gdb_assert (gdbarch != NULL);
3704 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3705 if (gdbarch_debug >= 2)
3706 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3707 return gdbarch->sizeof_call_dummy_words;
3711 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3712 int sizeof_call_dummy_words)
3714 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3718 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3720 gdb_assert (gdbarch != NULL);
3721 if (gdbarch->call_dummy_stack_adjust_p == -1)
3722 internal_error (__FILE__, __LINE__,
3723 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3724 if (gdbarch_debug >= 2)
3725 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3726 return gdbarch->call_dummy_stack_adjust_p;
3730 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3731 int call_dummy_stack_adjust_p)
3733 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3737 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3739 gdb_assert (gdbarch != NULL);
3740 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3741 internal_error (__FILE__, __LINE__,
3742 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3743 if (gdbarch_debug >= 2)
3744 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3745 return gdbarch->call_dummy_stack_adjust;
3749 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3750 int call_dummy_stack_adjust)
3752 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3756 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)
3758 gdb_assert (gdbarch != NULL);
3759 if (gdbarch->fix_call_dummy == 0)
3760 internal_error (__FILE__, __LINE__,
3761 "gdbarch: gdbarch_fix_call_dummy invalid");
3762 if (gdbarch_debug >= 2)
3763 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3764 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3768 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3769 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3771 gdbarch->fix_call_dummy = fix_call_dummy;
3775 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3777 gdb_assert (gdbarch != NULL);
3778 return gdbarch->deprecated_init_frame_pc_first != 0;
3782 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3784 gdb_assert (gdbarch != NULL);
3785 if (gdbarch->deprecated_init_frame_pc_first == 0)
3786 internal_error (__FILE__, __LINE__,
3787 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3788 if (gdbarch_debug >= 2)
3789 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3790 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3794 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3795 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3797 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3801 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3803 gdb_assert (gdbarch != NULL);
3804 return gdbarch->deprecated_init_frame_pc != 0;
3808 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3810 gdb_assert (gdbarch != NULL);
3811 if (gdbarch->deprecated_init_frame_pc == 0)
3812 internal_error (__FILE__, __LINE__,
3813 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3814 if (gdbarch_debug >= 2)
3815 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3816 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3820 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3821 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3823 gdbarch->deprecated_init_frame_pc = deprecated_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_get_saved_register_p (struct gdbarch *gdbarch)
3861 gdb_assert (gdbarch != NULL);
3862 return gdbarch->get_saved_register != 0;
3866 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)
3868 gdb_assert (gdbarch != NULL);
3869 if (gdbarch->get_saved_register == 0)
3870 internal_error (__FILE__, __LINE__,
3871 "gdbarch: gdbarch_get_saved_register invalid");
3872 if (gdbarch_debug >= 2)
3873 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3874 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3878 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3879 gdbarch_get_saved_register_ftype get_saved_register)
3881 gdbarch->get_saved_register = get_saved_register;
3885 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3887 gdb_assert (gdbarch != NULL);
3888 if (gdbarch->register_convertible == 0)
3889 internal_error (__FILE__, __LINE__,
3890 "gdbarch: gdbarch_register_convertible invalid");
3891 if (gdbarch_debug >= 2)
3892 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3893 return gdbarch->register_convertible (nr);
3897 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3898 gdbarch_register_convertible_ftype register_convertible)
3900 gdbarch->register_convertible = register_convertible;
3904 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3906 gdb_assert (gdbarch != NULL);
3907 if (gdbarch->register_convert_to_virtual == 0)
3908 internal_error (__FILE__, __LINE__,
3909 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3910 if (gdbarch_debug >= 2)
3911 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3912 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3916 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3917 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3919 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3923 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3925 gdb_assert (gdbarch != NULL);
3926 if (gdbarch->register_convert_to_raw == 0)
3927 internal_error (__FILE__, __LINE__,
3928 "gdbarch: gdbarch_register_convert_to_raw invalid");
3929 if (gdbarch_debug >= 2)
3930 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3931 gdbarch->register_convert_to_raw (type, regnum, from, to);
3935 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3936 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3938 gdbarch->register_convert_to_raw = register_convert_to_raw;
3942 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
3944 gdb_assert (gdbarch != NULL);
3945 if (gdbarch->convert_register_p == 0)
3946 internal_error (__FILE__, __LINE__,
3947 "gdbarch: gdbarch_convert_register_p invalid");
3948 if (gdbarch_debug >= 2)
3949 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3950 return gdbarch->convert_register_p (regnum);
3954 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3955 gdbarch_convert_register_p_ftype convert_register_p)
3957 gdbarch->convert_register_p = convert_register_p;
3961 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3963 gdb_assert (gdbarch != NULL);
3964 if (gdbarch->register_to_value == 0)
3965 internal_error (__FILE__, __LINE__,
3966 "gdbarch: gdbarch_register_to_value invalid");
3967 if (gdbarch_debug >= 2)
3968 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3969 gdbarch->register_to_value (regnum, type, from, to);
3973 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3974 gdbarch_register_to_value_ftype register_to_value)
3976 gdbarch->register_to_value = register_to_value;
3980 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3982 gdb_assert (gdbarch != NULL);
3983 if (gdbarch->value_to_register == 0)
3984 internal_error (__FILE__, __LINE__,
3985 "gdbarch: gdbarch_value_to_register invalid");
3986 if (gdbarch_debug >= 2)
3987 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3988 gdbarch->value_to_register (type, regnum, from, to);
3992 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3993 gdbarch_value_to_register_ftype value_to_register)
3995 gdbarch->value_to_register = value_to_register;
3999 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4001 gdb_assert (gdbarch != NULL);
4002 if (gdbarch->pointer_to_address == 0)
4003 internal_error (__FILE__, __LINE__,
4004 "gdbarch: gdbarch_pointer_to_address invalid");
4005 if (gdbarch_debug >= 2)
4006 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4007 return gdbarch->pointer_to_address (type, buf);
4011 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4012 gdbarch_pointer_to_address_ftype pointer_to_address)
4014 gdbarch->pointer_to_address = pointer_to_address;
4018 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4020 gdb_assert (gdbarch != NULL);
4021 if (gdbarch->address_to_pointer == 0)
4022 internal_error (__FILE__, __LINE__,
4023 "gdbarch: gdbarch_address_to_pointer invalid");
4024 if (gdbarch_debug >= 2)
4025 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4026 gdbarch->address_to_pointer (type, buf, addr);
4030 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4031 gdbarch_address_to_pointer_ftype address_to_pointer)
4033 gdbarch->address_to_pointer = address_to_pointer;
4037 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4039 gdb_assert (gdbarch != NULL);
4040 return gdbarch->integer_to_address != 0;
4044 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4046 gdb_assert (gdbarch != NULL);
4047 if (gdbarch->integer_to_address == 0)
4048 internal_error (__FILE__, __LINE__,
4049 "gdbarch: gdbarch_integer_to_address invalid");
4050 if (gdbarch_debug >= 2)
4051 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4052 return gdbarch->integer_to_address (type, buf);
4056 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4057 gdbarch_integer_to_address_ftype integer_to_address)
4059 gdbarch->integer_to_address = integer_to_address;
4063 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4065 gdb_assert (gdbarch != NULL);
4066 if (gdbarch->return_value_on_stack == 0)
4067 internal_error (__FILE__, __LINE__,
4068 "gdbarch: gdbarch_return_value_on_stack invalid");
4069 if (gdbarch_debug >= 2)
4070 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4071 return gdbarch->return_value_on_stack (type);
4075 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4076 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4078 gdbarch->return_value_on_stack = return_value_on_stack;
4082 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4084 gdb_assert (gdbarch != NULL);
4085 if (gdbarch->push_arguments == 0)
4086 internal_error (__FILE__, __LINE__,
4087 "gdbarch: gdbarch_push_arguments invalid");
4088 if (gdbarch_debug >= 2)
4089 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
4090 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
4094 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
4095 gdbarch_push_arguments_ftype push_arguments)
4097 gdbarch->push_arguments = push_arguments;
4101 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
4103 gdb_assert (gdbarch != NULL);
4104 if (gdbarch->push_dummy_frame == 0)
4105 internal_error (__FILE__, __LINE__,
4106 "gdbarch: gdbarch_push_dummy_frame invalid");
4107 if (gdbarch_debug >= 2)
4108 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
4109 gdbarch->push_dummy_frame ();
4113 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
4114 gdbarch_push_dummy_frame_ftype push_dummy_frame)
4116 gdbarch->push_dummy_frame = push_dummy_frame;
4120 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
4122 gdb_assert (gdbarch != NULL);
4123 return gdbarch->push_return_address != 0;
4127 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4129 gdb_assert (gdbarch != NULL);
4130 if (gdbarch->push_return_address == 0)
4131 internal_error (__FILE__, __LINE__,
4132 "gdbarch: gdbarch_push_return_address invalid");
4133 if (gdbarch_debug >= 2)
4134 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
4135 return gdbarch->push_return_address (pc, sp);
4139 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
4140 gdbarch_push_return_address_ftype push_return_address)
4142 gdbarch->push_return_address = push_return_address;
4146 gdbarch_pop_frame (struct gdbarch *gdbarch)
4148 gdb_assert (gdbarch != NULL);
4149 if (gdbarch->pop_frame == 0)
4150 internal_error (__FILE__, __LINE__,
4151 "gdbarch: gdbarch_pop_frame invalid");
4152 if (gdbarch_debug >= 2)
4153 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
4154 gdbarch->pop_frame ();
4158 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
4159 gdbarch_pop_frame_ftype pop_frame)
4161 gdbarch->pop_frame = pop_frame;
4165 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4167 gdb_assert (gdbarch != NULL);
4168 if (gdbarch->store_struct_return == 0)
4169 internal_error (__FILE__, __LINE__,
4170 "gdbarch: gdbarch_store_struct_return invalid");
4171 if (gdbarch_debug >= 2)
4172 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
4173 gdbarch->store_struct_return (addr, sp);
4177 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
4178 gdbarch_store_struct_return_ftype store_struct_return)
4180 gdbarch->store_struct_return = store_struct_return;
4184 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4186 gdb_assert (gdbarch != NULL);
4187 if (gdbarch->extract_return_value == 0)
4188 internal_error (__FILE__, __LINE__,
4189 "gdbarch: gdbarch_extract_return_value invalid");
4190 if (gdbarch_debug >= 2)
4191 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4192 gdbarch->extract_return_value (type, regcache, valbuf);
4196 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4197 gdbarch_extract_return_value_ftype extract_return_value)
4199 gdbarch->extract_return_value = extract_return_value;
4203 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4205 gdb_assert (gdbarch != NULL);
4206 if (gdbarch->store_return_value == 0)
4207 internal_error (__FILE__, __LINE__,
4208 "gdbarch: gdbarch_store_return_value invalid");
4209 if (gdbarch_debug >= 2)
4210 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4211 gdbarch->store_return_value (type, regcache, valbuf);
4215 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4216 gdbarch_store_return_value_ftype store_return_value)
4218 gdbarch->store_return_value = store_return_value;
4222 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4224 gdb_assert (gdbarch != NULL);
4225 if (gdbarch->deprecated_extract_return_value == 0)
4226 internal_error (__FILE__, __LINE__,
4227 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4228 if (gdbarch_debug >= 2)
4229 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4230 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4234 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4235 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4237 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4241 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4243 gdb_assert (gdbarch != NULL);
4244 if (gdbarch->deprecated_store_return_value == 0)
4245 internal_error (__FILE__, __LINE__,
4246 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4247 if (gdbarch_debug >= 2)
4248 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4249 gdbarch->deprecated_store_return_value (type, valbuf);
4253 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4254 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4256 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4260 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4262 gdb_assert (gdbarch != NULL);
4263 return gdbarch->extract_struct_value_address != 0;
4267 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4269 gdb_assert (gdbarch != NULL);
4270 if (gdbarch->extract_struct_value_address == 0)
4271 internal_error (__FILE__, __LINE__,
4272 "gdbarch: gdbarch_extract_struct_value_address invalid");
4273 if (gdbarch_debug >= 2)
4274 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4275 return gdbarch->extract_struct_value_address (regcache);
4279 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4280 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4282 gdbarch->extract_struct_value_address = extract_struct_value_address;
4286 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4288 gdb_assert (gdbarch != NULL);
4289 return gdbarch->deprecated_extract_struct_value_address != 0;
4293 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4295 gdb_assert (gdbarch != NULL);
4296 if (gdbarch->deprecated_extract_struct_value_address == 0)
4297 internal_error (__FILE__, __LINE__,
4298 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4299 if (gdbarch_debug >= 2)
4300 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4301 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4305 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4306 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4308 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4312 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4314 gdb_assert (gdbarch != NULL);
4315 if (gdbarch->use_struct_convention == 0)
4316 internal_error (__FILE__, __LINE__,
4317 "gdbarch: gdbarch_use_struct_convention invalid");
4318 if (gdbarch_debug >= 2)
4319 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4320 return gdbarch->use_struct_convention (gcc_p, value_type);
4324 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4325 gdbarch_use_struct_convention_ftype use_struct_convention)
4327 gdbarch->use_struct_convention = use_struct_convention;
4331 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4333 gdb_assert (gdbarch != NULL);
4334 if (gdbarch->frame_init_saved_regs == 0)
4335 internal_error (__FILE__, __LINE__,
4336 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4337 if (gdbarch_debug >= 2)
4338 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
4339 gdbarch->frame_init_saved_regs (frame);
4343 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
4344 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
4346 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
4350 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
4352 gdb_assert (gdbarch != NULL);
4353 return gdbarch->init_extra_frame_info != 0;
4357 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4359 gdb_assert (gdbarch != NULL);
4360 if (gdbarch->init_extra_frame_info == 0)
4361 internal_error (__FILE__, __LINE__,
4362 "gdbarch: gdbarch_init_extra_frame_info invalid");
4363 if (gdbarch_debug >= 2)
4364 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
4365 gdbarch->init_extra_frame_info (fromleaf, frame);
4369 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
4370 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
4372 gdbarch->init_extra_frame_info = init_extra_frame_info;
4376 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4378 gdb_assert (gdbarch != NULL);
4379 if (gdbarch->skip_prologue == 0)
4380 internal_error (__FILE__, __LINE__,
4381 "gdbarch: gdbarch_skip_prologue invalid");
4382 if (gdbarch_debug >= 2)
4383 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4384 return gdbarch->skip_prologue (ip);
4388 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4389 gdbarch_skip_prologue_ftype skip_prologue)
4391 gdbarch->skip_prologue = skip_prologue;
4395 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4397 gdb_assert (gdbarch != NULL);
4398 if (gdbarch->prologue_frameless_p == 0)
4399 internal_error (__FILE__, __LINE__,
4400 "gdbarch: gdbarch_prologue_frameless_p invalid");
4401 if (gdbarch_debug >= 2)
4402 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4403 return gdbarch->prologue_frameless_p (ip);
4407 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4408 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4410 gdbarch->prologue_frameless_p = prologue_frameless_p;
4414 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4416 gdb_assert (gdbarch != NULL);
4417 if (gdbarch->inner_than == 0)
4418 internal_error (__FILE__, __LINE__,
4419 "gdbarch: gdbarch_inner_than invalid");
4420 if (gdbarch_debug >= 2)
4421 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4422 return gdbarch->inner_than (lhs, rhs);
4426 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4427 gdbarch_inner_than_ftype inner_than)
4429 gdbarch->inner_than = inner_than;
4432 const unsigned char *
4433 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4435 gdb_assert (gdbarch != NULL);
4436 if (gdbarch->breakpoint_from_pc == 0)
4437 internal_error (__FILE__, __LINE__,
4438 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4439 if (gdbarch_debug >= 2)
4440 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4441 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4445 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4446 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4448 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4452 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4454 gdb_assert (gdbarch != NULL);
4455 if (gdbarch->memory_insert_breakpoint == 0)
4456 internal_error (__FILE__, __LINE__,
4457 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4458 if (gdbarch_debug >= 2)
4459 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4460 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4464 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4465 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4467 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4471 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4473 gdb_assert (gdbarch != NULL);
4474 if (gdbarch->memory_remove_breakpoint == 0)
4475 internal_error (__FILE__, __LINE__,
4476 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4477 if (gdbarch_debug >= 2)
4478 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4479 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4483 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4484 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4486 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4490 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4492 gdb_assert (gdbarch != NULL);
4493 if (gdbarch->decr_pc_after_break == -1)
4494 internal_error (__FILE__, __LINE__,
4495 "gdbarch: gdbarch_decr_pc_after_break invalid");
4496 if (gdbarch_debug >= 2)
4497 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4498 return gdbarch->decr_pc_after_break;
4502 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4503 CORE_ADDR decr_pc_after_break)
4505 gdbarch->decr_pc_after_break = decr_pc_after_break;
4509 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4511 gdb_assert (gdbarch != NULL);
4512 if (gdbarch->prepare_to_proceed == 0)
4513 internal_error (__FILE__, __LINE__,
4514 "gdbarch: gdbarch_prepare_to_proceed invalid");
4515 if (gdbarch_debug >= 2)
4516 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4517 return gdbarch->prepare_to_proceed (select_it);
4521 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4522 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4524 gdbarch->prepare_to_proceed = prepare_to_proceed;
4528 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4530 gdb_assert (gdbarch != NULL);
4531 if (gdbarch->function_start_offset == -1)
4532 internal_error (__FILE__, __LINE__,
4533 "gdbarch: gdbarch_function_start_offset invalid");
4534 if (gdbarch_debug >= 2)
4535 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4536 return gdbarch->function_start_offset;
4540 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4541 CORE_ADDR function_start_offset)
4543 gdbarch->function_start_offset = function_start_offset;
4547 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4549 gdb_assert (gdbarch != NULL);
4550 if (gdbarch->remote_translate_xfer_address == 0)
4551 internal_error (__FILE__, __LINE__,
4552 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4553 if (gdbarch_debug >= 2)
4554 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4555 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4559 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4560 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4562 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4566 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4568 gdb_assert (gdbarch != NULL);
4569 if (gdbarch->frame_args_skip == -1)
4570 internal_error (__FILE__, __LINE__,
4571 "gdbarch: gdbarch_frame_args_skip invalid");
4572 if (gdbarch_debug >= 2)
4573 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4574 return gdbarch->frame_args_skip;
4578 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4579 CORE_ADDR frame_args_skip)
4581 gdbarch->frame_args_skip = frame_args_skip;
4585 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4587 gdb_assert (gdbarch != NULL);
4588 if (gdbarch->frameless_function_invocation == 0)
4589 internal_error (__FILE__, __LINE__,
4590 "gdbarch: gdbarch_frameless_function_invocation invalid");
4591 if (gdbarch_debug >= 2)
4592 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4593 return gdbarch->frameless_function_invocation (fi);
4597 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4598 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4600 gdbarch->frameless_function_invocation = frameless_function_invocation;
4604 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4606 gdb_assert (gdbarch != NULL);
4607 if (gdbarch->frame_chain == 0)
4608 internal_error (__FILE__, __LINE__,
4609 "gdbarch: gdbarch_frame_chain invalid");
4610 if (gdbarch_debug >= 2)
4611 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4612 return gdbarch->frame_chain (frame);
4616 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4617 gdbarch_frame_chain_ftype frame_chain)
4619 gdbarch->frame_chain = frame_chain;
4623 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4625 gdb_assert (gdbarch != NULL);
4626 if (gdbarch->frame_chain_valid == 0)
4627 internal_error (__FILE__, __LINE__,
4628 "gdbarch: gdbarch_frame_chain_valid invalid");
4629 if (gdbarch_debug >= 2)
4630 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4631 return gdbarch->frame_chain_valid (chain, thisframe);
4635 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4636 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4638 gdbarch->frame_chain_valid = frame_chain_valid;
4642 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4644 gdb_assert (gdbarch != NULL);
4645 if (gdbarch->frame_saved_pc == 0)
4646 internal_error (__FILE__, __LINE__,
4647 "gdbarch: gdbarch_frame_saved_pc invalid");
4648 if (gdbarch_debug >= 2)
4649 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4650 return gdbarch->frame_saved_pc (fi);
4654 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4655 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4657 gdbarch->frame_saved_pc = frame_saved_pc;
4661 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4663 gdb_assert (gdbarch != NULL);
4664 if (gdbarch->frame_args_address == 0)
4665 internal_error (__FILE__, __LINE__,
4666 "gdbarch: gdbarch_frame_args_address invalid");
4667 if (gdbarch_debug >= 2)
4668 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4669 return gdbarch->frame_args_address (fi);
4673 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4674 gdbarch_frame_args_address_ftype frame_args_address)
4676 gdbarch->frame_args_address = frame_args_address;
4680 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4682 gdb_assert (gdbarch != NULL);
4683 if (gdbarch->frame_locals_address == 0)
4684 internal_error (__FILE__, __LINE__,
4685 "gdbarch: gdbarch_frame_locals_address invalid");
4686 if (gdbarch_debug >= 2)
4687 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4688 return gdbarch->frame_locals_address (fi);
4692 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4693 gdbarch_frame_locals_address_ftype frame_locals_address)
4695 gdbarch->frame_locals_address = frame_locals_address;
4699 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4701 gdb_assert (gdbarch != NULL);
4702 if (gdbarch->saved_pc_after_call == 0)
4703 internal_error (__FILE__, __LINE__,
4704 "gdbarch: gdbarch_saved_pc_after_call invalid");
4705 if (gdbarch_debug >= 2)
4706 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4707 return gdbarch->saved_pc_after_call (frame);
4711 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4712 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4714 gdbarch->saved_pc_after_call = saved_pc_after_call;
4718 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4720 gdb_assert (gdbarch != NULL);
4721 if (gdbarch->frame_num_args == 0)
4722 internal_error (__FILE__, __LINE__,
4723 "gdbarch: gdbarch_frame_num_args invalid");
4724 if (gdbarch_debug >= 2)
4725 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4726 return gdbarch->frame_num_args (frame);
4730 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4731 gdbarch_frame_num_args_ftype frame_num_args)
4733 gdbarch->frame_num_args = frame_num_args;
4737 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4739 gdb_assert (gdbarch != NULL);
4740 return gdbarch->stack_align != 0;
4744 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4746 gdb_assert (gdbarch != NULL);
4747 if (gdbarch->stack_align == 0)
4748 internal_error (__FILE__, __LINE__,
4749 "gdbarch: gdbarch_stack_align invalid");
4750 if (gdbarch_debug >= 2)
4751 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4752 return gdbarch->stack_align (sp);
4756 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4757 gdbarch_stack_align_ftype stack_align)
4759 gdbarch->stack_align = stack_align;
4763 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4765 gdb_assert (gdbarch != NULL);
4766 return gdbarch->frame_align != 0;
4770 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4772 gdb_assert (gdbarch != NULL);
4773 if (gdbarch->frame_align == 0)
4774 internal_error (__FILE__, __LINE__,
4775 "gdbarch: gdbarch_frame_align invalid");
4776 if (gdbarch_debug >= 2)
4777 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4778 return gdbarch->frame_align (gdbarch, address);
4782 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4783 gdbarch_frame_align_ftype frame_align)
4785 gdbarch->frame_align = frame_align;
4789 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4791 gdb_assert (gdbarch != NULL);
4792 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4793 if (gdbarch_debug >= 2)
4794 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4795 return gdbarch->extra_stack_alignment_needed;
4799 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4800 int extra_stack_alignment_needed)
4802 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4806 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4808 gdb_assert (gdbarch != NULL);
4809 return gdbarch->reg_struct_has_addr != 0;
4813 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4815 gdb_assert (gdbarch != NULL);
4816 if (gdbarch->reg_struct_has_addr == 0)
4817 internal_error (__FILE__, __LINE__,
4818 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4819 if (gdbarch_debug >= 2)
4820 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4821 return gdbarch->reg_struct_has_addr (gcc_p, type);
4825 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4826 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4828 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4832 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4834 gdb_assert (gdbarch != NULL);
4835 return gdbarch->save_dummy_frame_tos != 0;
4839 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4841 gdb_assert (gdbarch != NULL);
4842 if (gdbarch->save_dummy_frame_tos == 0)
4843 internal_error (__FILE__, __LINE__,
4844 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4845 if (gdbarch_debug >= 2)
4846 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4847 gdbarch->save_dummy_frame_tos (sp);
4851 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4852 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4854 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4858 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4860 gdb_assert (gdbarch != NULL);
4861 if (gdbarch_debug >= 2)
4862 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4863 return gdbarch->parm_boundary;
4867 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4870 gdbarch->parm_boundary = parm_boundary;
4873 const struct floatformat *
4874 gdbarch_float_format (struct gdbarch *gdbarch)
4876 gdb_assert (gdbarch != NULL);
4877 if (gdbarch_debug >= 2)
4878 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4879 return gdbarch->float_format;
4883 set_gdbarch_float_format (struct gdbarch *gdbarch,
4884 const struct floatformat * float_format)
4886 gdbarch->float_format = float_format;
4889 const struct floatformat *
4890 gdbarch_double_format (struct gdbarch *gdbarch)
4892 gdb_assert (gdbarch != NULL);
4893 if (gdbarch_debug >= 2)
4894 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4895 return gdbarch->double_format;
4899 set_gdbarch_double_format (struct gdbarch *gdbarch,
4900 const struct floatformat * double_format)
4902 gdbarch->double_format = double_format;
4905 const struct floatformat *
4906 gdbarch_long_double_format (struct gdbarch *gdbarch)
4908 gdb_assert (gdbarch != NULL);
4909 if (gdbarch_debug >= 2)
4910 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4911 return gdbarch->long_double_format;
4915 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4916 const struct floatformat * long_double_format)
4918 gdbarch->long_double_format = long_double_format;
4922 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4924 gdb_assert (gdbarch != NULL);
4925 if (gdbarch->convert_from_func_ptr_addr == 0)
4926 internal_error (__FILE__, __LINE__,
4927 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4928 if (gdbarch_debug >= 2)
4929 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4930 return gdbarch->convert_from_func_ptr_addr (addr);
4934 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4935 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4937 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4941 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4943 gdb_assert (gdbarch != NULL);
4944 if (gdbarch->addr_bits_remove == 0)
4945 internal_error (__FILE__, __LINE__,
4946 "gdbarch: gdbarch_addr_bits_remove invalid");
4947 if (gdbarch_debug >= 2)
4948 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4949 return gdbarch->addr_bits_remove (addr);
4953 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4954 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4956 gdbarch->addr_bits_remove = addr_bits_remove;
4960 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4962 gdb_assert (gdbarch != NULL);
4963 if (gdbarch->smash_text_address == 0)
4964 internal_error (__FILE__, __LINE__,
4965 "gdbarch: gdbarch_smash_text_address invalid");
4966 if (gdbarch_debug >= 2)
4967 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4968 return gdbarch->smash_text_address (addr);
4972 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4973 gdbarch_smash_text_address_ftype smash_text_address)
4975 gdbarch->smash_text_address = smash_text_address;
4979 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4981 gdb_assert (gdbarch != NULL);
4982 return gdbarch->software_single_step != 0;
4986 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4988 gdb_assert (gdbarch != NULL);
4989 if (gdbarch->software_single_step == 0)
4990 internal_error (__FILE__, __LINE__,
4991 "gdbarch: gdbarch_software_single_step invalid");
4992 if (gdbarch_debug >= 2)
4993 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4994 gdbarch->software_single_step (sig, insert_breakpoints_p);
4998 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4999 gdbarch_software_single_step_ftype software_single_step)
5001 gdbarch->software_single_step = software_single_step;
5005 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5007 gdb_assert (gdbarch != NULL);
5008 if (gdbarch->print_insn == 0)
5009 internal_error (__FILE__, __LINE__,
5010 "gdbarch: gdbarch_print_insn invalid");
5011 if (gdbarch_debug >= 2)
5012 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5013 return gdbarch->print_insn (vma, info);
5017 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5018 gdbarch_print_insn_ftype print_insn)
5020 gdbarch->print_insn = print_insn;
5024 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5026 gdb_assert (gdbarch != NULL);
5027 if (gdbarch->skip_trampoline_code == 0)
5028 internal_error (__FILE__, __LINE__,
5029 "gdbarch: gdbarch_skip_trampoline_code invalid");
5030 if (gdbarch_debug >= 2)
5031 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5032 return gdbarch->skip_trampoline_code (pc);
5036 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5037 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5039 gdbarch->skip_trampoline_code = skip_trampoline_code;
5043 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5045 gdb_assert (gdbarch != NULL);
5046 if (gdbarch->in_solib_call_trampoline == 0)
5047 internal_error (__FILE__, __LINE__,
5048 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5049 if (gdbarch_debug >= 2)
5050 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5051 return gdbarch->in_solib_call_trampoline (pc, name);
5055 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5056 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5058 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5062 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5064 gdb_assert (gdbarch != NULL);
5065 if (gdbarch->in_solib_return_trampoline == 0)
5066 internal_error (__FILE__, __LINE__,
5067 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5068 if (gdbarch_debug >= 2)
5069 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5070 return gdbarch->in_solib_return_trampoline (pc, name);
5074 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5075 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5077 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5081 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5083 gdb_assert (gdbarch != NULL);
5084 if (gdbarch->pc_in_sigtramp == 0)
5085 internal_error (__FILE__, __LINE__,
5086 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5087 if (gdbarch_debug >= 2)
5088 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5089 return gdbarch->pc_in_sigtramp (pc, name);
5093 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5094 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5096 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5100 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5102 gdb_assert (gdbarch != NULL);
5103 return gdbarch->sigtramp_start != 0;
5107 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5109 gdb_assert (gdbarch != NULL);
5110 if (gdbarch->sigtramp_start == 0)
5111 internal_error (__FILE__, __LINE__,
5112 "gdbarch: gdbarch_sigtramp_start invalid");
5113 if (gdbarch_debug >= 2)
5114 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5115 return gdbarch->sigtramp_start (pc);
5119 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5120 gdbarch_sigtramp_start_ftype sigtramp_start)
5122 gdbarch->sigtramp_start = sigtramp_start;
5126 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5128 gdb_assert (gdbarch != NULL);
5129 return gdbarch->sigtramp_end != 0;
5133 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5135 gdb_assert (gdbarch != NULL);
5136 if (gdbarch->sigtramp_end == 0)
5137 internal_error (__FILE__, __LINE__,
5138 "gdbarch: gdbarch_sigtramp_end invalid");
5139 if (gdbarch_debug >= 2)
5140 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5141 return gdbarch->sigtramp_end (pc);
5145 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5146 gdbarch_sigtramp_end_ftype sigtramp_end)
5148 gdbarch->sigtramp_end = sigtramp_end;
5152 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5154 gdb_assert (gdbarch != NULL);
5155 if (gdbarch->in_function_epilogue_p == 0)
5156 internal_error (__FILE__, __LINE__,
5157 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5158 if (gdbarch_debug >= 2)
5159 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5160 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5164 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5165 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5167 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5171 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5173 gdb_assert (gdbarch != NULL);
5174 if (gdbarch->construct_inferior_arguments == 0)
5175 internal_error (__FILE__, __LINE__,
5176 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5177 if (gdbarch_debug >= 2)
5178 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5179 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5183 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5184 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5186 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5190 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5192 gdb_assert (gdbarch != NULL);
5193 return gdbarch->dwarf2_build_frame_info != 0;
5197 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5199 gdb_assert (gdbarch != NULL);
5200 if (gdbarch->dwarf2_build_frame_info == 0)
5201 internal_error (__FILE__, __LINE__,
5202 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5203 if (gdbarch_debug >= 2)
5204 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5205 gdbarch->dwarf2_build_frame_info (objfile);
5209 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5210 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5212 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5216 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5218 gdb_assert (gdbarch != NULL);
5219 if (gdbarch->elf_make_msymbol_special == 0)
5220 internal_error (__FILE__, __LINE__,
5221 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5222 if (gdbarch_debug >= 2)
5223 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5224 gdbarch->elf_make_msymbol_special (sym, msym);
5228 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5229 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5231 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5235 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5237 gdb_assert (gdbarch != NULL);
5238 if (gdbarch->coff_make_msymbol_special == 0)
5239 internal_error (__FILE__, __LINE__,
5240 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5241 if (gdbarch_debug >= 2)
5242 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5243 gdbarch->coff_make_msymbol_special (val, msym);
5247 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5248 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5250 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5254 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5256 gdb_assert (gdbarch != NULL);
5257 /* Skip verify of name_of_malloc, invalid_p == 0 */
5258 if (gdbarch_debug >= 2)
5259 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5260 return gdbarch->name_of_malloc;
5264 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5265 const char * name_of_malloc)
5267 gdbarch->name_of_malloc = name_of_malloc;
5271 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5273 gdb_assert (gdbarch != NULL);
5274 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5275 if (gdbarch_debug >= 2)
5276 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5277 return gdbarch->cannot_step_breakpoint;
5281 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5282 int cannot_step_breakpoint)
5284 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5288 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5290 gdb_assert (gdbarch != NULL);
5291 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5292 if (gdbarch_debug >= 2)
5293 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5294 return gdbarch->have_nonsteppable_watchpoint;
5298 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5299 int have_nonsteppable_watchpoint)
5301 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5305 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5307 gdb_assert (gdbarch != NULL);
5308 return gdbarch->address_class_type_flags != 0;
5312 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5314 gdb_assert (gdbarch != NULL);
5315 if (gdbarch->address_class_type_flags == 0)
5316 internal_error (__FILE__, __LINE__,
5317 "gdbarch: gdbarch_address_class_type_flags invalid");
5318 if (gdbarch_debug >= 2)
5319 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5320 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5324 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5325 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5327 gdbarch->address_class_type_flags = address_class_type_flags;
5331 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5333 gdb_assert (gdbarch != NULL);
5334 return gdbarch->address_class_type_flags_to_name != 0;
5338 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5340 gdb_assert (gdbarch != NULL);
5341 if (gdbarch->address_class_type_flags_to_name == 0)
5342 internal_error (__FILE__, __LINE__,
5343 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5344 if (gdbarch_debug >= 2)
5345 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5346 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5350 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5351 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5353 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5357 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5359 gdb_assert (gdbarch != NULL);
5360 return gdbarch->address_class_name_to_type_flags != 0;
5364 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5366 gdb_assert (gdbarch != NULL);
5367 if (gdbarch->address_class_name_to_type_flags == 0)
5368 internal_error (__FILE__, __LINE__,
5369 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5370 if (gdbarch_debug >= 2)
5371 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5372 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5376 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5377 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5379 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5383 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5385 gdb_assert (gdbarch != NULL);
5386 if (gdbarch->register_reggroup_p == 0)
5387 internal_error (__FILE__, __LINE__,
5388 "gdbarch: gdbarch_register_reggroup_p invalid");
5389 if (gdbarch_debug >= 2)
5390 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5391 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5395 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5396 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5398 gdbarch->register_reggroup_p = register_reggroup_p;
5402 /* Keep a registry of per-architecture data-pointers required by GDB
5409 gdbarch_data_init_ftype *init;
5410 gdbarch_data_free_ftype *free;
5413 struct gdbarch_data_registration
5415 struct gdbarch_data *data;
5416 struct gdbarch_data_registration *next;
5419 struct gdbarch_data_registry
5422 struct gdbarch_data_registration *registrations;
5425 struct gdbarch_data_registry gdbarch_data_registry =
5430 struct gdbarch_data *
5431 register_gdbarch_data (gdbarch_data_init_ftype *init,
5432 gdbarch_data_free_ftype *free)
5434 struct gdbarch_data_registration **curr;
5435 /* Append the new registraration. */
5436 for (curr = &gdbarch_data_registry.registrations;
5438 curr = &(*curr)->next);
5439 (*curr) = XMALLOC (struct gdbarch_data_registration);
5440 (*curr)->next = NULL;
5441 (*curr)->data = XMALLOC (struct gdbarch_data);
5442 (*curr)->data->index = gdbarch_data_registry.nr++;
5443 (*curr)->data->init = init;
5444 (*curr)->data->init_p = 1;
5445 (*curr)->data->free = free;
5446 return (*curr)->data;
5450 /* Create/delete the gdbarch data vector. */
5453 alloc_gdbarch_data (struct gdbarch *gdbarch)
5455 gdb_assert (gdbarch->data == NULL);
5456 gdbarch->nr_data = gdbarch_data_registry.nr;
5457 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5461 free_gdbarch_data (struct gdbarch *gdbarch)
5463 struct gdbarch_data_registration *rego;
5464 gdb_assert (gdbarch->data != NULL);
5465 for (rego = gdbarch_data_registry.registrations;
5469 struct gdbarch_data *data = rego->data;
5470 gdb_assert (data->index < gdbarch->nr_data);
5471 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5473 data->free (gdbarch, gdbarch->data[data->index]);
5474 gdbarch->data[data->index] = NULL;
5477 xfree (gdbarch->data);
5478 gdbarch->data = NULL;
5482 /* Initialize the current value of the specified per-architecture
5486 set_gdbarch_data (struct gdbarch *gdbarch,
5487 struct gdbarch_data *data,
5490 gdb_assert (data->index < gdbarch->nr_data);
5491 if (gdbarch->data[data->index] != NULL)
5493 gdb_assert (data->free != NULL);
5494 data->free (gdbarch, gdbarch->data[data->index]);
5496 gdbarch->data[data->index] = pointer;
5499 /* Return the current value of the specified per-architecture
5503 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5505 gdb_assert (data->index < gdbarch->nr_data);
5506 /* The data-pointer isn't initialized, call init() to get a value but
5507 only if the architecture initializaiton has completed. Otherwise
5508 punt - hope that the caller knows what they are doing. */
5509 if (gdbarch->data[data->index] == NULL
5510 && gdbarch->initialized_p)
5512 /* Be careful to detect an initialization cycle. */
5513 gdb_assert (data->init_p);
5515 gdb_assert (data->init != NULL);
5516 gdbarch->data[data->index] = data->init (gdbarch);
5518 gdb_assert (gdbarch->data[data->index] != NULL);
5520 return gdbarch->data[data->index];
5525 /* Keep a registry of swapped data required by GDB modules. */
5530 struct gdbarch_swap_registration *source;
5531 struct gdbarch_swap *next;
5534 struct gdbarch_swap_registration
5537 unsigned long sizeof_data;
5538 gdbarch_swap_ftype *init;
5539 struct gdbarch_swap_registration *next;
5542 struct gdbarch_swap_registry
5545 struct gdbarch_swap_registration *registrations;
5548 struct gdbarch_swap_registry gdbarch_swap_registry =
5554 register_gdbarch_swap (void *data,
5555 unsigned long sizeof_data,
5556 gdbarch_swap_ftype *init)
5558 struct gdbarch_swap_registration **rego;
5559 for (rego = &gdbarch_swap_registry.registrations;
5561 rego = &(*rego)->next);
5562 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5563 (*rego)->next = NULL;
5564 (*rego)->init = init;
5565 (*rego)->data = data;
5566 (*rego)->sizeof_data = sizeof_data;
5570 clear_gdbarch_swap (struct gdbarch *gdbarch)
5572 struct gdbarch_swap *curr;
5573 for (curr = gdbarch->swap;
5577 memset (curr->source->data, 0, curr->source->sizeof_data);
5582 init_gdbarch_swap (struct gdbarch *gdbarch)
5584 struct gdbarch_swap_registration *rego;
5585 struct gdbarch_swap **curr = &gdbarch->swap;
5586 for (rego = gdbarch_swap_registry.registrations;
5590 if (rego->data != NULL)
5592 (*curr) = XMALLOC (struct gdbarch_swap);
5593 (*curr)->source = rego;
5594 (*curr)->swap = xmalloc (rego->sizeof_data);
5595 (*curr)->next = NULL;
5596 curr = &(*curr)->next;
5598 if (rego->init != NULL)
5604 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5606 struct gdbarch_swap *curr;
5607 for (curr = gdbarch->swap;
5610 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5614 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5616 struct gdbarch_swap *curr;
5617 for (curr = gdbarch->swap;
5620 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5624 /* Keep a registry of the architectures known by GDB. */
5626 struct gdbarch_registration
5628 enum bfd_architecture bfd_architecture;
5629 gdbarch_init_ftype *init;
5630 gdbarch_dump_tdep_ftype *dump_tdep;
5631 struct gdbarch_list *arches;
5632 struct gdbarch_registration *next;
5635 static struct gdbarch_registration *gdbarch_registry = NULL;
5638 append_name (const char ***buf, int *nr, const char *name)
5640 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5646 gdbarch_printable_names (void)
5650 /* Accumulate a list of names based on the registed list of
5652 enum bfd_architecture a;
5654 const char **arches = NULL;
5655 struct gdbarch_registration *rego;
5656 for (rego = gdbarch_registry;
5660 const struct bfd_arch_info *ap;
5661 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5663 internal_error (__FILE__, __LINE__,
5664 "gdbarch_architecture_names: multi-arch unknown");
5667 append_name (&arches, &nr_arches, ap->printable_name);
5672 append_name (&arches, &nr_arches, NULL);
5676 /* Just return all the architectures that BFD knows. Assume that
5677 the legacy architecture framework supports them. */
5678 return bfd_arch_list ();
5683 gdbarch_register (enum bfd_architecture bfd_architecture,
5684 gdbarch_init_ftype *init,
5685 gdbarch_dump_tdep_ftype *dump_tdep)
5687 struct gdbarch_registration **curr;
5688 const struct bfd_arch_info *bfd_arch_info;
5689 /* Check that BFD recognizes this architecture */
5690 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5691 if (bfd_arch_info == NULL)
5693 internal_error (__FILE__, __LINE__,
5694 "gdbarch: Attempt to register unknown architecture (%d)",
5697 /* Check that we haven't seen this architecture before */
5698 for (curr = &gdbarch_registry;
5700 curr = &(*curr)->next)
5702 if (bfd_architecture == (*curr)->bfd_architecture)
5703 internal_error (__FILE__, __LINE__,
5704 "gdbarch: Duplicate registraration of architecture (%s)",
5705 bfd_arch_info->printable_name);
5709 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5710 bfd_arch_info->printable_name,
5713 (*curr) = XMALLOC (struct gdbarch_registration);
5714 (*curr)->bfd_architecture = bfd_architecture;
5715 (*curr)->init = init;
5716 (*curr)->dump_tdep = dump_tdep;
5717 (*curr)->arches = NULL;
5718 (*curr)->next = NULL;
5719 /* When non- multi-arch, install whatever target dump routine we've
5720 been provided - hopefully that routine has been written correctly
5721 and works regardless of multi-arch. */
5722 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5723 && startup_gdbarch.dump_tdep == NULL)
5724 startup_gdbarch.dump_tdep = dump_tdep;
5728 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5729 gdbarch_init_ftype *init)
5731 gdbarch_register (bfd_architecture, init, NULL);
5735 /* Look for an architecture using gdbarch_info. Base search on only
5736 BFD_ARCH_INFO and BYTE_ORDER. */
5738 struct gdbarch_list *
5739 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5740 const struct gdbarch_info *info)
5742 for (; arches != NULL; arches = arches->next)
5744 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5746 if (info->byte_order != arches->gdbarch->byte_order)
5754 /* Update the current architecture. Return ZERO if the update request
5758 gdbarch_update_p (struct gdbarch_info info)
5760 struct gdbarch *new_gdbarch;
5761 struct gdbarch *old_gdbarch;
5762 struct gdbarch_registration *rego;
5764 /* Fill in missing parts of the INFO struct using a number of
5765 sources: ``set ...''; INFOabfd supplied; existing target. */
5767 /* ``(gdb) set architecture ...'' */
5768 if (info.bfd_arch_info == NULL
5769 && !TARGET_ARCHITECTURE_AUTO)
5770 info.bfd_arch_info = TARGET_ARCHITECTURE;
5771 if (info.bfd_arch_info == NULL
5772 && info.abfd != NULL
5773 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5774 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5775 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5776 if (info.bfd_arch_info == NULL)
5777 info.bfd_arch_info = TARGET_ARCHITECTURE;
5779 /* ``(gdb) set byte-order ...'' */
5780 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5781 && !TARGET_BYTE_ORDER_AUTO)
5782 info.byte_order = TARGET_BYTE_ORDER;
5783 /* From the INFO struct. */
5784 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5785 && info.abfd != NULL)
5786 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5787 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5788 : BFD_ENDIAN_UNKNOWN);
5789 /* From the current target. */
5790 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5791 info.byte_order = TARGET_BYTE_ORDER;
5793 /* Must have found some sort of architecture. */
5794 gdb_assert (info.bfd_arch_info != NULL);
5798 fprintf_unfiltered (gdb_stdlog,
5799 "gdbarch_update: info.bfd_arch_info %s\n",
5800 (info.bfd_arch_info != NULL
5801 ? info.bfd_arch_info->printable_name
5803 fprintf_unfiltered (gdb_stdlog,
5804 "gdbarch_update: info.byte_order %d (%s)\n",
5806 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5807 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5809 fprintf_unfiltered (gdb_stdlog,
5810 "gdbarch_update: info.abfd 0x%lx\n",
5812 fprintf_unfiltered (gdb_stdlog,
5813 "gdbarch_update: info.tdep_info 0x%lx\n",
5814 (long) info.tdep_info);
5817 /* Find the target that knows about this architecture. */
5818 for (rego = gdbarch_registry;
5821 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5826 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
5830 /* Swap the data belonging to the old target out setting the
5831 installed data to zero. This stops the ->init() function trying
5832 to refer to the previous architecture's global data structures. */
5833 swapout_gdbarch_swap (current_gdbarch);
5834 clear_gdbarch_swap (current_gdbarch);
5836 /* Save the previously selected architecture, setting the global to
5837 NULL. This stops ->init() trying to use the previous
5838 architecture's configuration. The previous architecture may not
5839 even be of the same architecture family. The most recent
5840 architecture of the same family is found at the head of the
5841 rego->arches list. */
5842 old_gdbarch = current_gdbarch;
5843 current_gdbarch = NULL;
5845 /* Ask the target for a replacement architecture. */
5846 new_gdbarch = rego->init (info, rego->arches);
5848 /* Did the target like it? No. Reject the change and revert to the
5849 old architecture. */
5850 if (new_gdbarch == NULL)
5853 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
5854 swapin_gdbarch_swap (old_gdbarch);
5855 current_gdbarch = old_gdbarch;
5859 /* Did the architecture change? No. Oops, put the old architecture
5861 if (old_gdbarch == new_gdbarch)
5864 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5866 new_gdbarch->bfd_arch_info->printable_name);
5867 swapin_gdbarch_swap (old_gdbarch);
5868 current_gdbarch = old_gdbarch;
5872 /* Is this a pre-existing architecture? Yes. Move it to the front
5873 of the list of architectures (keeping the list sorted Most
5874 Recently Used) and then copy it in. */
5876 struct gdbarch_list **list;
5877 for (list = ®o->arches;
5879 list = &(*list)->next)
5881 if ((*list)->gdbarch == new_gdbarch)
5883 struct gdbarch_list *this;
5885 fprintf_unfiltered (gdb_stdlog,
5886 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5888 new_gdbarch->bfd_arch_info->printable_name);
5891 (*list) = this->next;
5892 /* Insert in the front. */
5893 this->next = rego->arches;
5894 rego->arches = this;
5895 /* Copy the new architecture in. */
5896 current_gdbarch = new_gdbarch;
5897 swapin_gdbarch_swap (new_gdbarch);
5898 architecture_changed_event ();
5904 /* Prepend this new architecture to the architecture list (keep the
5905 list sorted Most Recently Used). */
5907 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5908 this->next = rego->arches;
5909 this->gdbarch = new_gdbarch;
5910 rego->arches = this;
5913 /* Switch to this new architecture marking it initialized. */
5914 current_gdbarch = new_gdbarch;
5915 current_gdbarch->initialized_p = 1;
5918 fprintf_unfiltered (gdb_stdlog,
5919 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5921 new_gdbarch->bfd_arch_info->printable_name);
5924 /* Check that the newly installed architecture is valid. Plug in
5925 any post init values. */
5926 new_gdbarch->dump_tdep = rego->dump_tdep;
5927 verify_gdbarch (new_gdbarch);
5929 /* Initialize the per-architecture memory (swap) areas.
5930 CURRENT_GDBARCH must be update before these modules are
5932 init_gdbarch_swap (new_gdbarch);
5934 /* Initialize the per-architecture data. CURRENT_GDBARCH
5935 must be updated before these modules are called. */
5936 architecture_changed_event ();
5939 gdbarch_dump (current_gdbarch, gdb_stdlog);
5947 /* Pointer to the target-dependent disassembly function. */
5948 int (*tm_print_insn) (bfd_vma, disassemble_info *);
5949 disassemble_info tm_print_insn_info;
5952 extern void _initialize_gdbarch (void);
5955 _initialize_gdbarch (void)
5957 struct cmd_list_element *c;
5959 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
5960 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
5961 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
5962 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
5963 tm_print_insn_info.print_address_func = dis_asm_print_address;
5965 add_show_from_set (add_set_cmd ("arch",
5968 (char *)&gdbarch_debug,
5969 "Set architecture debugging.\n\
5970 When non-zero, architecture debugging is enabled.", &setdebuglist),
5972 c = add_set_cmd ("archdebug",
5975 (char *)&gdbarch_debug,
5976 "Set architecture debugging.\n\
5977 When non-zero, architecture debugging is enabled.", &setlist);
5979 deprecate_cmd (c, "set debug arch");
5980 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");