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"
70 /* Static function declarations */
72 static void verify_gdbarch (struct gdbarch *gdbarch);
73 static void alloc_gdbarch_data (struct gdbarch *);
74 static void free_gdbarch_data (struct gdbarch *);
75 static void init_gdbarch_swap (struct gdbarch *);
76 static void clear_gdbarch_swap (struct gdbarch *);
77 static void swapout_gdbarch_swap (struct gdbarch *);
78 static void swapin_gdbarch_swap (struct gdbarch *);
80 /* Non-zero if we want to trace architecture code. */
83 #define GDBARCH_DEBUG 0
85 int gdbarch_debug = GDBARCH_DEBUG;
88 /* Maintain the struct gdbarch object */
92 /* Has this architecture been fully initialized? */
94 /* basic architectural information */
95 const struct bfd_arch_info * bfd_arch_info;
99 /* target specific vector. */
100 struct gdbarch_tdep *tdep;
101 gdbarch_dump_tdep_ftype *dump_tdep;
103 /* per-architecture data-pointers */
107 /* per-architecture swap-regions */
108 struct gdbarch_swap *swap;
110 /* Multi-arch values.
112 When extending this structure you must:
116 Declare set/get functions and define the corresponding
119 gdbarch_alloc(): If zero/NULL is not a suitable default,
120 initialize the new field.
122 verify_gdbarch(): Confirm that the target updated the field
125 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
128 ``startup_gdbarch()'': Append an initial value to the static
129 variable (base values on the host's c-type system).
131 get_gdbarch(): Implement the set/get functions (probably using
132 the macro's as shortcuts).
147 gdbarch_read_pc_ftype *read_pc;
148 gdbarch_write_pc_ftype *write_pc;
149 gdbarch_read_fp_ftype *read_fp;
150 gdbarch_read_sp_ftype *read_sp;
151 gdbarch_write_sp_ftype *write_sp;
152 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
153 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
154 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
163 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
164 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
165 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
166 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
167 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
168 gdbarch_register_name_ftype *register_name;
171 gdbarch_register_byte_ftype *register_byte;
172 gdbarch_register_raw_size_ftype *register_raw_size;
173 int max_register_raw_size;
174 gdbarch_register_virtual_size_ftype *register_virtual_size;
175 int max_register_virtual_size;
176 gdbarch_register_virtual_type_ftype *register_virtual_type;
177 gdbarch_register_type_ftype *register_type;
178 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
179 gdbarch_print_registers_info_ftype *print_registers_info;
180 gdbarch_print_float_info_ftype *print_float_info;
181 gdbarch_print_vector_info_ftype *print_vector_info;
182 gdbarch_register_sim_regno_ftype *register_sim_regno;
183 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
184 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
185 gdbarch_cannot_store_register_ftype *cannot_store_register;
186 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
187 int deprecated_use_generic_dummy_frames;
188 int call_dummy_location;
189 gdbarch_call_dummy_address_ftype *call_dummy_address;
190 CORE_ADDR call_dummy_start_offset;
191 CORE_ADDR call_dummy_breakpoint_offset;
192 int call_dummy_breakpoint_offset_p;
193 int call_dummy_length;
194 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
196 LONGEST * call_dummy_words;
197 int sizeof_call_dummy_words;
198 int call_dummy_stack_adjust_p;
199 int call_dummy_stack_adjust;
200 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
201 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
202 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
203 int believe_pcc_promotion;
204 int believe_pcc_promotion_type;
205 gdbarch_get_saved_register_ftype *get_saved_register;
206 gdbarch_register_convertible_ftype *register_convertible;
207 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
208 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
209 gdbarch_convert_register_p_ftype *convert_register_p;
210 gdbarch_register_to_value_ftype *register_to_value;
211 gdbarch_value_to_register_ftype *value_to_register;
212 gdbarch_pointer_to_address_ftype *pointer_to_address;
213 gdbarch_address_to_pointer_ftype *address_to_pointer;
214 gdbarch_integer_to_address_ftype *integer_to_address;
215 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
216 gdbarch_push_arguments_ftype *push_arguments;
217 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
218 gdbarch_push_return_address_ftype *push_return_address;
219 gdbarch_pop_frame_ftype *pop_frame;
220 gdbarch_store_struct_return_ftype *store_struct_return;
221 gdbarch_extract_return_value_ftype *extract_return_value;
222 gdbarch_store_return_value_ftype *store_return_value;
223 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
224 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
225 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
226 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
227 gdbarch_use_struct_convention_ftype *use_struct_convention;
228 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
229 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
230 gdbarch_skip_prologue_ftype *skip_prologue;
231 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
232 gdbarch_inner_than_ftype *inner_than;
233 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
234 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
235 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
236 CORE_ADDR decr_pc_after_break;
237 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
238 CORE_ADDR function_start_offset;
239 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
240 CORE_ADDR frame_args_skip;
241 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
242 gdbarch_frame_chain_ftype *frame_chain;
243 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
244 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
245 gdbarch_frame_args_address_ftype *frame_args_address;
246 gdbarch_frame_locals_address_ftype *frame_locals_address;
247 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
248 gdbarch_frame_num_args_ftype *frame_num_args;
249 gdbarch_stack_align_ftype *stack_align;
250 gdbarch_frame_align_ftype *frame_align;
251 int extra_stack_alignment_needed;
252 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
253 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
255 const struct floatformat * float_format;
256 const struct floatformat * double_format;
257 const struct floatformat * long_double_format;
258 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
259 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
260 gdbarch_smash_text_address_ftype *smash_text_address;
261 gdbarch_software_single_step_ftype *software_single_step;
262 gdbarch_print_insn_ftype *print_insn;
263 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
264 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
265 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
266 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
267 gdbarch_sigtramp_start_ftype *sigtramp_start;
268 gdbarch_sigtramp_end_ftype *sigtramp_end;
269 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
270 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
271 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
272 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
273 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
274 const char * name_of_malloc;
275 int cannot_step_breakpoint;
276 int have_nonsteppable_watchpoint;
277 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
278 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
279 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
280 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
284 /* The default architecture uses host values (for want of a better
287 extern const struct bfd_arch_info bfd_default_arch_struct;
289 struct gdbarch startup_gdbarch =
291 1, /* Always initialized. */
292 /* basic architecture information */
293 &bfd_default_arch_struct,
296 /* target specific vector and its dump routine */
298 /*per-architecture data-pointers and swap regions */
300 /* Multi-arch values */
304 8 * sizeof (LONGEST),
307 8 * sizeof (long double),
336 generic_register_byte,
337 generic_register_size,
339 generic_register_size,
344 default_print_registers_info,
359 generic_pc_in_call_dummy,
434 generic_in_function_epilogue_p,
435 construct_inferior_arguments,
445 default_register_reggroup_p,
446 /* startup_gdbarch() */
449 struct gdbarch *current_gdbarch = &startup_gdbarch;
451 /* Do any initialization needed for a non-multiarch configuration
452 after the _initialize_MODULE functions have been run. */
454 initialize_non_multiarch (void)
456 alloc_gdbarch_data (&startup_gdbarch);
457 /* Ensure that all swap areas are zeroed so that they again think
458 they are starting from scratch. */
459 clear_gdbarch_swap (&startup_gdbarch);
460 init_gdbarch_swap (&startup_gdbarch);
464 /* Create a new ``struct gdbarch'' based on information provided by
465 ``struct gdbarch_info''. */
468 gdbarch_alloc (const struct gdbarch_info *info,
469 struct gdbarch_tdep *tdep)
471 /* NOTE: The new architecture variable is named ``current_gdbarch''
472 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
473 the current local architecture and not the previous global
474 architecture. This ensures that the new architectures initial
475 values are not influenced by the previous architecture. Once
476 everything is parameterised with gdbarch, this will go away. */
477 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
478 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
480 alloc_gdbarch_data (current_gdbarch);
482 current_gdbarch->tdep = tdep;
484 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
485 current_gdbarch->byte_order = info->byte_order;
486 current_gdbarch->osabi = info->osabi;
488 /* Force the explicit initialization of these. */
489 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
490 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
491 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
492 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
493 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
494 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
495 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
496 current_gdbarch->ptr_bit = TARGET_INT_BIT;
497 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
498 current_gdbarch->char_signed = -1;
499 current_gdbarch->read_pc = generic_target_read_pc;
500 current_gdbarch->write_pc = generic_target_write_pc;
501 current_gdbarch->read_fp = generic_target_read_fp;
502 current_gdbarch->read_sp = generic_target_read_sp;
503 current_gdbarch->write_sp = generic_target_write_sp;
504 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
505 current_gdbarch->num_regs = -1;
506 current_gdbarch->sp_regnum = -1;
507 current_gdbarch->fp_regnum = -1;
508 current_gdbarch->pc_regnum = -1;
509 current_gdbarch->ps_regnum = -1;
510 current_gdbarch->fp0_regnum = -1;
511 current_gdbarch->npc_regnum = -1;
512 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
513 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
514 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
515 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
516 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
517 current_gdbarch->register_name = legacy_register_name;
518 current_gdbarch->register_size = -1;
519 current_gdbarch->register_bytes = -1;
520 current_gdbarch->register_byte = generic_register_byte;
521 current_gdbarch->register_raw_size = generic_register_size;
522 current_gdbarch->max_register_raw_size = -1;
523 current_gdbarch->register_virtual_size = generic_register_size;
524 current_gdbarch->max_register_virtual_size = -1;
525 current_gdbarch->print_registers_info = default_print_registers_info;
526 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
527 current_gdbarch->cannot_fetch_register = cannot_register_not;
528 current_gdbarch->cannot_store_register = cannot_register_not;
529 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
530 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
531 current_gdbarch->call_dummy_start_offset = -1;
532 current_gdbarch->call_dummy_breakpoint_offset = -1;
533 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
534 current_gdbarch->call_dummy_length = -1;
535 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
536 current_gdbarch->call_dummy_p = -1;
537 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
538 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
539 current_gdbarch->call_dummy_stack_adjust_p = -1;
540 current_gdbarch->register_convertible = generic_register_convertible_not;
541 current_gdbarch->convert_register_p = legacy_convert_register_p;
542 current_gdbarch->register_to_value = legacy_register_to_value;
543 current_gdbarch->value_to_register = legacy_value_to_register;
544 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
545 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
546 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
547 current_gdbarch->push_arguments = default_push_arguments;
548 current_gdbarch->extract_return_value = legacy_extract_return_value;
549 current_gdbarch->store_return_value = legacy_store_return_value;
550 current_gdbarch->use_struct_convention = generic_use_struct_convention;
551 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
552 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
553 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
554 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
555 current_gdbarch->decr_pc_after_break = -1;
556 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
557 current_gdbarch->function_start_offset = -1;
558 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
559 current_gdbarch->frame_args_skip = -1;
560 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
561 current_gdbarch->frame_args_address = get_frame_base;
562 current_gdbarch->frame_locals_address = get_frame_base;
563 current_gdbarch->extra_stack_alignment_needed = 1;
564 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
565 current_gdbarch->addr_bits_remove = core_addr_identity;
566 current_gdbarch->smash_text_address = core_addr_identity;
567 current_gdbarch->print_insn = legacy_print_insn;
568 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
569 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
570 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
571 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
572 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
573 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
574 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
575 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
576 current_gdbarch->name_of_malloc = "malloc";
577 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
578 /* gdbarch_alloc() */
580 return current_gdbarch;
584 /* Free a gdbarch struct. This should never happen in normal
585 operation --- once you've created a gdbarch, you keep it around.
586 However, if an architecture's init function encounters an error
587 building the structure, it may need to clean up a partially
588 constructed gdbarch. */
591 gdbarch_free (struct gdbarch *arch)
593 gdb_assert (arch != NULL);
594 free_gdbarch_data (arch);
599 /* Ensure that all values in a GDBARCH are reasonable. */
602 verify_gdbarch (struct gdbarch *gdbarch)
605 struct cleanup *cleanups;
608 /* Only perform sanity checks on a multi-arch target. */
611 log = mem_fileopen ();
612 cleanups = make_cleanup_ui_file_delete (log);
614 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
615 fprintf_unfiltered (log, "\n\tbyte-order");
616 if (gdbarch->bfd_arch_info == NULL)
617 fprintf_unfiltered (log, "\n\tbfd_arch_info");
618 /* Check those that need to be defined for the given multi-arch level. */
619 /* Skip verify of short_bit, invalid_p == 0 */
620 /* Skip verify of int_bit, invalid_p == 0 */
621 /* Skip verify of long_bit, invalid_p == 0 */
622 /* Skip verify of long_long_bit, invalid_p == 0 */
623 /* Skip verify of float_bit, invalid_p == 0 */
624 /* Skip verify of double_bit, invalid_p == 0 */
625 /* Skip verify of long_double_bit, invalid_p == 0 */
626 /* Skip verify of ptr_bit, invalid_p == 0 */
627 if (gdbarch->addr_bit == 0)
628 gdbarch->addr_bit = TARGET_PTR_BIT;
629 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
630 if (gdbarch->char_signed == -1)
631 gdbarch->char_signed = 1;
632 /* Skip verify of read_pc, invalid_p == 0 */
633 /* Skip verify of write_pc, invalid_p == 0 */
634 /* Skip verify of read_fp, invalid_p == 0 */
635 /* Skip verify of read_sp, invalid_p == 0 */
636 /* Skip verify of write_sp, invalid_p == 0 */
637 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
638 /* Skip verify of pseudo_register_read, has predicate */
639 /* Skip verify of pseudo_register_write, has predicate */
640 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
641 && (gdbarch->num_regs == -1))
642 fprintf_unfiltered (log, "\n\tnum_regs");
643 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
644 /* Skip verify of sp_regnum, invalid_p == 0 */
645 /* Skip verify of fp_regnum, invalid_p == 0 */
646 /* Skip verify of pc_regnum, invalid_p == 0 */
647 /* Skip verify of ps_regnum, invalid_p == 0 */
648 /* Skip verify of fp0_regnum, invalid_p == 0 */
649 /* Skip verify of npc_regnum, invalid_p == 0 */
650 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
651 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
652 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
653 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
654 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
655 /* Skip verify of register_name, invalid_p == 0 */
656 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
657 && (gdbarch->register_size == -1))
658 fprintf_unfiltered (log, "\n\tregister_size");
659 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
660 && (gdbarch->register_bytes == -1))
661 fprintf_unfiltered (log, "\n\tregister_bytes");
662 /* Skip verify of register_byte, invalid_p == 0 */
663 /* Skip verify of register_raw_size, invalid_p == 0 */
664 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
665 && (gdbarch->max_register_raw_size == -1))
666 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
667 /* Skip verify of register_virtual_size, invalid_p == 0 */
668 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
669 && (gdbarch->max_register_virtual_size == -1))
670 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
671 /* Skip verify of register_virtual_type, has predicate */
672 /* Skip verify of register_type, has predicate */
673 /* Skip verify of deprecated_do_registers_info, has predicate */
674 /* Skip verify of print_registers_info, invalid_p == 0 */
675 /* Skip verify of print_float_info, has predicate */
676 /* Skip verify of print_vector_info, has predicate */
677 /* Skip verify of register_sim_regno, invalid_p == 0 */
678 /* Skip verify of register_bytes_ok, has predicate */
679 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
680 /* Skip verify of cannot_store_register, invalid_p == 0 */
681 /* Skip verify of get_longjmp_target, has predicate */
682 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
683 /* Skip verify of call_dummy_location, invalid_p == 0 */
684 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
685 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
686 fprintf_unfiltered (log, "\n\tcall_dummy_address");
687 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
688 && (gdbarch->call_dummy_start_offset == -1))
689 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
690 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
691 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
692 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
693 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
694 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
695 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
696 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
697 && (gdbarch->call_dummy_length == -1))
698 fprintf_unfiltered (log, "\n\tcall_dummy_length");
699 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
700 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
701 && (gdbarch->call_dummy_p == -1))
702 fprintf_unfiltered (log, "\n\tcall_dummy_p");
703 /* Skip verify of call_dummy_words, invalid_p == 0 */
704 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
705 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
706 && (gdbarch->call_dummy_stack_adjust_p == -1))
707 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
708 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
709 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
710 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
711 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
712 && (gdbarch->fix_call_dummy == 0))
713 fprintf_unfiltered (log, "\n\tfix_call_dummy");
714 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
715 /* Skip verify of deprecated_init_frame_pc, has predicate */
716 /* Skip verify of get_saved_register, has predicate */
717 /* Skip verify of register_convertible, invalid_p == 0 */
718 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
719 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
720 /* Skip verify of convert_register_p, invalid_p == 0 */
721 /* Skip verify of register_to_value, invalid_p == 0 */
722 /* Skip verify of value_to_register, invalid_p == 0 */
723 /* Skip verify of pointer_to_address, invalid_p == 0 */
724 /* Skip verify of address_to_pointer, invalid_p == 0 */
725 /* Skip verify of integer_to_address, has predicate */
726 /* Skip verify of return_value_on_stack, invalid_p == 0 */
727 /* Skip verify of push_arguments, invalid_p == 0 */
728 /* Skip verify of deprecated_push_dummy_frame, has predicate */
729 /* Skip verify of push_return_address, has predicate */
730 /* Skip verify of pop_frame, has predicate */
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 /* Skip verify of frame_init_saved_regs, has predicate */
740 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
741 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
742 && (gdbarch->skip_prologue == 0))
743 fprintf_unfiltered (log, "\n\tskip_prologue");
744 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
745 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
746 && (gdbarch->inner_than == 0))
747 fprintf_unfiltered (log, "\n\tinner_than");
748 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
749 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
750 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
751 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
752 && (gdbarch->decr_pc_after_break == -1))
753 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
754 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
755 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
756 && (gdbarch->function_start_offset == -1))
757 fprintf_unfiltered (log, "\n\tfunction_start_offset");
758 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
759 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
760 && (gdbarch->frame_args_skip == -1))
761 fprintf_unfiltered (log, "\n\tframe_args_skip");
762 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
763 /* Skip verify of frame_chain, has predicate */
764 /* Skip verify of frame_chain_valid, has predicate */
765 /* Skip verify of frame_saved_pc, has predicate */
766 /* Skip verify of frame_args_address, invalid_p == 0 */
767 /* Skip verify of frame_locals_address, invalid_p == 0 */
768 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
769 && (gdbarch->saved_pc_after_call == 0))
770 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
771 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
772 && (gdbarch->frame_num_args == 0))
773 fprintf_unfiltered (log, "\n\tframe_num_args");
774 /* Skip verify of stack_align, has predicate */
775 /* Skip verify of frame_align, has predicate */
776 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
777 /* Skip verify of reg_struct_has_addr, has predicate */
778 /* Skip verify of save_dummy_frame_tos, has predicate */
779 if (gdbarch->float_format == 0)
780 gdbarch->float_format = default_float_format (gdbarch);
781 if (gdbarch->double_format == 0)
782 gdbarch->double_format = default_double_format (gdbarch);
783 if (gdbarch->long_double_format == 0)
784 gdbarch->long_double_format = default_double_format (gdbarch);
785 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
786 /* Skip verify of addr_bits_remove, invalid_p == 0 */
787 /* Skip verify of smash_text_address, invalid_p == 0 */
788 /* Skip verify of software_single_step, has predicate */
789 /* Skip verify of print_insn, invalid_p == 0 */
790 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
791 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
792 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
793 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
794 /* Skip verify of sigtramp_start, has predicate */
795 /* Skip verify of sigtramp_end, has predicate */
796 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
797 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
798 /* Skip verify of dwarf2_build_frame_info, has predicate */
799 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
800 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
801 /* Skip verify of name_of_malloc, invalid_p == 0 */
802 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
803 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
804 /* Skip verify of address_class_type_flags, has predicate */
805 /* Skip verify of address_class_type_flags_to_name, has predicate */
806 /* Skip verify of address_class_name_to_type_flags, has predicate */
807 /* Skip verify of register_reggroup_p, invalid_p == 0 */
808 buf = ui_file_xstrdup (log, &dummy);
809 make_cleanup (xfree, buf);
810 if (strlen (buf) > 0)
811 internal_error (__FILE__, __LINE__,
812 "verify_gdbarch: the following are invalid ...%s",
814 do_cleanups (cleanups);
818 /* Print out the details of the current architecture. */
820 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
821 just happens to match the global variable ``current_gdbarch''. That
822 way macros refering to that variable get the local and not the global
823 version - ulgh. Once everything is parameterised with gdbarch, this
827 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
829 fprintf_unfiltered (file,
830 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
833 fprintf_unfiltered (file,
834 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
835 gdbarch_frame_align_p (current_gdbarch));
837 fprintf_unfiltered (file,
838 "gdbarch_dump: frame_align = 0x%08lx\n",
839 (long) current_gdbarch->frame_align);
841 fprintf_unfiltered (file,
842 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
843 (long) current_gdbarch->in_function_epilogue_p);
845 fprintf_unfiltered (file,
846 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
847 (long) current_gdbarch->register_reggroup_p);
849 fprintf_unfiltered (file,
850 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
851 gdbarch_pseudo_register_read_p (current_gdbarch));
853 fprintf_unfiltered (file,
854 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
855 (long) current_gdbarch->pseudo_register_read);
857 fprintf_unfiltered (file,
858 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
859 gdbarch_pseudo_register_write_p (current_gdbarch));
861 fprintf_unfiltered (file,
862 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
863 (long) current_gdbarch->pseudo_register_write);
865 fprintf_unfiltered (file,
866 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
867 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
871 (long) current_gdbarch->address_class_name_to_type_flags);
872 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
873 fprintf_unfiltered (file,
874 "gdbarch_dump: %s # %s\n",
875 "ADDRESS_CLASS_TYPE_FLAGS_P()",
876 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
877 fprintf_unfiltered (file,
878 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
879 ADDRESS_CLASS_TYPE_FLAGS_P ());
881 #ifdef ADDRESS_CLASS_TYPE_FLAGS
882 fprintf_unfiltered (file,
883 "gdbarch_dump: %s # %s\n",
884 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
885 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
889 (long) current_gdbarch->address_class_type_flags
890 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
893 fprintf_unfiltered (file,
894 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
895 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
897 fprintf_unfiltered (file,
898 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
899 (long) current_gdbarch->address_class_type_flags_to_name);
900 #ifdef ADDRESS_TO_POINTER
902 /* Macro might contain `[{}]' when not multi-arch */
903 fprintf_unfiltered (file,
904 "gdbarch_dump: %s # %s\n",
905 "ADDRESS_TO_POINTER(type, buf, addr)",
906 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
909 fprintf_unfiltered (file,
910 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
911 (long) current_gdbarch->address_to_pointer
912 /*ADDRESS_TO_POINTER ()*/);
914 #ifdef ADDR_BITS_REMOVE
915 fprintf_unfiltered (file,
916 "gdbarch_dump: %s # %s\n",
917 "ADDR_BITS_REMOVE(addr)",
918 XSTRING (ADDR_BITS_REMOVE (addr)));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
922 (long) current_gdbarch->addr_bits_remove
923 /*ADDR_BITS_REMOVE ()*/);
925 #ifdef BELIEVE_PCC_PROMOTION
926 fprintf_unfiltered (file,
927 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
928 XSTRING (BELIEVE_PCC_PROMOTION));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
931 BELIEVE_PCC_PROMOTION);
933 #ifdef BELIEVE_PCC_PROMOTION_TYPE
934 fprintf_unfiltered (file,
935 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
936 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
937 fprintf_unfiltered (file,
938 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
939 BELIEVE_PCC_PROMOTION_TYPE);
941 #ifdef BREAKPOINT_FROM_PC
942 fprintf_unfiltered (file,
943 "gdbarch_dump: %s # %s\n",
944 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
945 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
949 (long) current_gdbarch->breakpoint_from_pc
950 /*BREAKPOINT_FROM_PC ()*/);
952 #ifdef CALL_DUMMY_ADDRESS
953 fprintf_unfiltered (file,
954 "gdbarch_dump: %s # %s\n",
955 "CALL_DUMMY_ADDRESS()",
956 XSTRING (CALL_DUMMY_ADDRESS ()));
958 fprintf_unfiltered (file,
959 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
960 (long) current_gdbarch->call_dummy_address
961 /*CALL_DUMMY_ADDRESS ()*/);
963 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
964 fprintf_unfiltered (file,
965 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
966 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
967 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
968 fprintf_unfiltered (file,
969 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
970 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
972 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
973 fprintf_unfiltered (file,
974 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
975 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
976 fprintf_unfiltered (file,
977 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
978 CALL_DUMMY_BREAKPOINT_OFFSET_P);
980 #ifdef CALL_DUMMY_LENGTH
981 fprintf_unfiltered (file,
982 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
983 XSTRING (CALL_DUMMY_LENGTH));
984 if (gdbarch->call_dummy_length >= 0)
985 fprintf_unfiltered (file,
986 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
989 #ifdef CALL_DUMMY_LOCATION
990 fprintf_unfiltered (file,
991 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
992 XSTRING (CALL_DUMMY_LOCATION));
993 fprintf_unfiltered (file,
994 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
995 CALL_DUMMY_LOCATION);
998 fprintf_unfiltered (file,
999 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1000 XSTRING (CALL_DUMMY_P));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: CALL_DUMMY_P = %d\n",
1005 #ifdef CALL_DUMMY_STACK_ADJUST
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1008 XSTRING (CALL_DUMMY_STACK_ADJUST));
1009 if (CALL_DUMMY_STACK_ADJUST_P)
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1012 (long) CALL_DUMMY_STACK_ADJUST);
1014 #ifdef CALL_DUMMY_STACK_ADJUST_P
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1017 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
1018 fprintf_unfiltered (file,
1019 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1020 (long) CALL_DUMMY_STACK_ADJUST_P);
1022 #ifdef CALL_DUMMY_START_OFFSET
1023 fprintf_unfiltered (file,
1024 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1025 XSTRING (CALL_DUMMY_START_OFFSET));
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1028 (long) CALL_DUMMY_START_OFFSET);
1030 #ifdef CALL_DUMMY_WORDS
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1033 XSTRING (CALL_DUMMY_WORDS));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1036 (long) CALL_DUMMY_WORDS);
1038 #ifdef CANNOT_FETCH_REGISTER
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: %s # %s\n",
1041 "CANNOT_FETCH_REGISTER(regnum)",
1042 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
1046 (long) current_gdbarch->cannot_fetch_register
1047 /*CANNOT_FETCH_REGISTER ()*/);
1049 #ifdef CANNOT_STEP_BREAKPOINT
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1052 XSTRING (CANNOT_STEP_BREAKPOINT));
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1055 CANNOT_STEP_BREAKPOINT);
1057 #ifdef CANNOT_STORE_REGISTER
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: %s # %s\n",
1060 "CANNOT_STORE_REGISTER(regnum)",
1061 XSTRING (CANNOT_STORE_REGISTER (regnum)));
1063 fprintf_unfiltered (file,
1064 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1065 (long) current_gdbarch->cannot_store_register
1066 /*CANNOT_STORE_REGISTER ()*/);
1068 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1070 /* Macro might contain `[{}]' when not multi-arch */
1071 fprintf_unfiltered (file,
1072 "gdbarch_dump: %s # %s\n",
1073 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1074 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1079 (long) current_gdbarch->coff_make_msymbol_special
1080 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1085 (long) current_gdbarch->construct_inferior_arguments);
1086 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1087 fprintf_unfiltered (file,
1088 "gdbarch_dump: %s # %s\n",
1089 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1090 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1094 (long) current_gdbarch->convert_from_func_ptr_addr
1095 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1097 #ifdef CONVERT_REGISTER_P
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: %s # %s\n",
1100 "CONVERT_REGISTER_P(regnum)",
1101 XSTRING (CONVERT_REGISTER_P (regnum)));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1105 (long) current_gdbarch->convert_register_p
1106 /*CONVERT_REGISTER_P ()*/);
1108 #ifdef DECR_PC_AFTER_BREAK
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1111 XSTRING (DECR_PC_AFTER_BREAK));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1114 (long) DECR_PC_AFTER_BREAK);
1116 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: %s # %s\n",
1119 "DEPRECATED_DO_REGISTERS_INFO_P()",
1120 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1123 DEPRECATED_DO_REGISTERS_INFO_P ());
1125 #ifdef DEPRECATED_DO_REGISTERS_INFO
1127 /* Macro might contain `[{}]' when not multi-arch */
1128 fprintf_unfiltered (file,
1129 "gdbarch_dump: %s # %s\n",
1130 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1131 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1136 (long) current_gdbarch->deprecated_do_registers_info
1137 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1139 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1141 /* Macro might contain `[{}]' when not multi-arch */
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: %s # %s\n",
1144 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1145 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1150 (long) current_gdbarch->deprecated_extract_return_value
1151 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1153 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: %s # %s\n",
1156 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1157 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1160 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1162 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: %s # %s\n",
1165 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1166 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1170 (long) current_gdbarch->deprecated_extract_struct_value_address
1171 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1173 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: %s # %s\n",
1176 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1177 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1180 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1182 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1184 /* Macro might contain `[{}]' when not multi-arch */
1185 fprintf_unfiltered (file,
1186 "gdbarch_dump: %s # %s\n",
1187 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1188 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1193 (long) current_gdbarch->deprecated_init_extra_frame_info
1194 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1196 #ifdef DEPRECATED_INIT_FRAME_PC_P
1197 fprintf_unfiltered (file,
1198 "gdbarch_dump: %s # %s\n",
1199 "DEPRECATED_INIT_FRAME_PC_P()",
1200 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1203 DEPRECATED_INIT_FRAME_PC_P ());
1205 #ifdef DEPRECATED_INIT_FRAME_PC
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: %s # %s\n",
1208 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1209 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1213 (long) current_gdbarch->deprecated_init_frame_pc
1214 /*DEPRECATED_INIT_FRAME_PC ()*/);
1216 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: %s # %s\n",
1219 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1220 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1221 fprintf_unfiltered (file,
1222 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1223 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1225 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: %s # %s\n",
1228 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1229 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1233 (long) current_gdbarch->deprecated_init_frame_pc_first
1234 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1236 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: %s # %s\n",
1239 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1240 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1243 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1245 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: %s # %s\n",
1248 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1249 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1253 (long) current_gdbarch->deprecated_pc_in_call_dummy
1254 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1256 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: %s # %s\n",
1259 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1260 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1261 fprintf_unfiltered (file,
1262 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1263 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1265 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1267 /* Macro might contain `[{}]' when not multi-arch */
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: %s # %s\n",
1270 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1271 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1276 (long) current_gdbarch->deprecated_push_dummy_frame
1277 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1279 #ifdef DEPRECATED_STORE_RETURN_VALUE
1281 /* Macro might contain `[{}]' when not multi-arch */
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: %s # %s\n",
1284 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1285 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1290 (long) current_gdbarch->deprecated_store_return_value
1291 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1293 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1296 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1299 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1301 #ifdef DWARF2_BUILD_FRAME_INFO_P
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: %s # %s\n",
1304 "DWARF2_BUILD_FRAME_INFO_P()",
1305 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1308 DWARF2_BUILD_FRAME_INFO_P ());
1310 #ifdef DWARF2_BUILD_FRAME_INFO
1312 /* Macro might contain `[{}]' when not multi-arch */
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: %s # %s\n",
1315 "DWARF2_BUILD_FRAME_INFO(objfile)",
1316 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1321 (long) current_gdbarch->dwarf2_build_frame_info
1322 /*DWARF2_BUILD_FRAME_INFO ()*/);
1324 #ifdef DWARF2_REG_TO_REGNUM
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: %s # %s\n",
1327 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1328 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1332 (long) current_gdbarch->dwarf2_reg_to_regnum
1333 /*DWARF2_REG_TO_REGNUM ()*/);
1335 #ifdef DWARF_REG_TO_REGNUM
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: %s # %s\n",
1338 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1339 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1343 (long) current_gdbarch->dwarf_reg_to_regnum
1344 /*DWARF_REG_TO_REGNUM ()*/);
1346 #ifdef ECOFF_REG_TO_REGNUM
1347 fprintf_unfiltered (file,
1348 "gdbarch_dump: %s # %s\n",
1349 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1350 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1354 (long) current_gdbarch->ecoff_reg_to_regnum
1355 /*ECOFF_REG_TO_REGNUM ()*/);
1357 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1359 /* Macro might contain `[{}]' when not multi-arch */
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: %s # %s\n",
1362 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1363 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1368 (long) current_gdbarch->elf_make_msymbol_special
1369 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1371 #ifdef EXTRACT_RETURN_VALUE
1373 /* Macro might contain `[{}]' when not multi-arch */
1374 fprintf_unfiltered (file,
1375 "gdbarch_dump: %s # %s\n",
1376 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1377 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1380 fprintf_unfiltered (file,
1381 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1382 (long) current_gdbarch->extract_return_value
1383 /*EXTRACT_RETURN_VALUE ()*/);
1385 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1386 fprintf_unfiltered (file,
1387 "gdbarch_dump: %s # %s\n",
1388 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1389 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1392 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1394 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: %s # %s\n",
1397 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1398 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1402 (long) current_gdbarch->extract_struct_value_address
1403 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1405 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1408 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1411 EXTRA_STACK_ALIGNMENT_NEEDED);
1413 #ifdef FIX_CALL_DUMMY
1415 /* Macro might contain `[{}]' when not multi-arch */
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: %s # %s\n",
1418 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1419 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1424 (long) current_gdbarch->fix_call_dummy
1425 /*FIX_CALL_DUMMY ()*/);
1428 fprintf_unfiltered (file,
1429 "gdbarch_dump: FP0_REGNUM # %s\n",
1430 XSTRING (FP0_REGNUM));
1431 fprintf_unfiltered (file,
1432 "gdbarch_dump: FP0_REGNUM = %d\n",
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: FP_REGNUM # %s\n",
1438 XSTRING (FP_REGNUM));
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: FP_REGNUM = %d\n",
1443 #ifdef FRAMELESS_FUNCTION_INVOCATION
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: %s # %s\n",
1446 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1447 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1449 fprintf_unfiltered (file,
1450 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1451 (long) current_gdbarch->frameless_function_invocation
1452 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1454 #ifdef FRAME_ARGS_ADDRESS
1455 fprintf_unfiltered (file,
1456 "gdbarch_dump: %s # %s\n",
1457 "FRAME_ARGS_ADDRESS(fi)",
1458 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1462 (long) current_gdbarch->frame_args_address
1463 /*FRAME_ARGS_ADDRESS ()*/);
1465 #ifdef FRAME_ARGS_SKIP
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1468 XSTRING (FRAME_ARGS_SKIP));
1469 fprintf_unfiltered (file,
1470 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1471 (long) FRAME_ARGS_SKIP);
1473 #ifdef FRAME_CHAIN_P
1474 fprintf_unfiltered (file,
1475 "gdbarch_dump: %s # %s\n",
1477 XSTRING (FRAME_CHAIN_P ()));
1478 fprintf_unfiltered (file,
1479 "gdbarch_dump: FRAME_CHAIN_P() = %d\n",
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: %s # %s\n",
1485 "FRAME_CHAIN(frame)",
1486 XSTRING (FRAME_CHAIN (frame)));
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: FRAME_CHAIN = <0x%08lx>\n",
1490 (long) current_gdbarch->frame_chain
1491 /*FRAME_CHAIN ()*/);
1493 #ifdef FRAME_CHAIN_VALID_P
1494 fprintf_unfiltered (file,
1495 "gdbarch_dump: %s # %s\n",
1496 "FRAME_CHAIN_VALID_P()",
1497 XSTRING (FRAME_CHAIN_VALID_P ()));
1498 fprintf_unfiltered (file,
1499 "gdbarch_dump: FRAME_CHAIN_VALID_P() = %d\n",
1500 FRAME_CHAIN_VALID_P ());
1502 #ifdef FRAME_CHAIN_VALID
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: %s # %s\n",
1505 "FRAME_CHAIN_VALID(chain, thisframe)",
1506 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: FRAME_CHAIN_VALID = <0x%08lx>\n",
1510 (long) current_gdbarch->frame_chain_valid
1511 /*FRAME_CHAIN_VALID ()*/);
1513 #ifdef FRAME_INIT_SAVED_REGS_P
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: %s # %s\n",
1516 "FRAME_INIT_SAVED_REGS_P()",
1517 XSTRING (FRAME_INIT_SAVED_REGS_P ()));
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: FRAME_INIT_SAVED_REGS_P() = %d\n",
1520 FRAME_INIT_SAVED_REGS_P ());
1522 #ifdef FRAME_INIT_SAVED_REGS
1524 /* Macro might contain `[{}]' when not multi-arch */
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: %s # %s\n",
1527 "FRAME_INIT_SAVED_REGS(frame)",
1528 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1533 (long) current_gdbarch->frame_init_saved_regs
1534 /*FRAME_INIT_SAVED_REGS ()*/);
1536 #ifdef FRAME_LOCALS_ADDRESS
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: %s # %s\n",
1539 "FRAME_LOCALS_ADDRESS(fi)",
1540 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1544 (long) current_gdbarch->frame_locals_address
1545 /*FRAME_LOCALS_ADDRESS ()*/);
1547 #ifdef FRAME_NUM_ARGS
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: %s # %s\n",
1550 "FRAME_NUM_ARGS(frame)",
1551 XSTRING (FRAME_NUM_ARGS (frame)));
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1555 (long) current_gdbarch->frame_num_args
1556 /*FRAME_NUM_ARGS ()*/);
1558 #ifdef FRAME_SAVED_PC_P
1559 fprintf_unfiltered (file,
1560 "gdbarch_dump: %s # %s\n",
1561 "FRAME_SAVED_PC_P()",
1562 XSTRING (FRAME_SAVED_PC_P ()));
1563 fprintf_unfiltered (file,
1564 "gdbarch_dump: FRAME_SAVED_PC_P() = %d\n",
1565 FRAME_SAVED_PC_P ());
1567 #ifdef FRAME_SAVED_PC
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: %s # %s\n",
1570 "FRAME_SAVED_PC(fi)",
1571 XSTRING (FRAME_SAVED_PC (fi)));
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: FRAME_SAVED_PC = <0x%08lx>\n",
1575 (long) current_gdbarch->frame_saved_pc
1576 /*FRAME_SAVED_PC ()*/);
1578 #ifdef FUNCTION_START_OFFSET
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1581 XSTRING (FUNCTION_START_OFFSET));
1582 fprintf_unfiltered (file,
1583 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1584 (long) FUNCTION_START_OFFSET);
1586 #ifdef GET_LONGJMP_TARGET_P
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: %s # %s\n",
1589 "GET_LONGJMP_TARGET_P()",
1590 XSTRING (GET_LONGJMP_TARGET_P ()));
1591 fprintf_unfiltered (file,
1592 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1593 GET_LONGJMP_TARGET_P ());
1595 #ifdef GET_LONGJMP_TARGET
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: %s # %s\n",
1598 "GET_LONGJMP_TARGET(pc)",
1599 XSTRING (GET_LONGJMP_TARGET (pc)));
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1603 (long) current_gdbarch->get_longjmp_target
1604 /*GET_LONGJMP_TARGET ()*/);
1606 #ifdef GET_SAVED_REGISTER_P
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: %s # %s\n",
1609 "GET_SAVED_REGISTER_P()",
1610 XSTRING (GET_SAVED_REGISTER_P ()));
1611 fprintf_unfiltered (file,
1612 "gdbarch_dump: GET_SAVED_REGISTER_P() = %d\n",
1613 GET_SAVED_REGISTER_P ());
1615 #ifdef GET_SAVED_REGISTER
1617 /* Macro might contain `[{}]' when not multi-arch */
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: %s # %s\n",
1620 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1621 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1624 fprintf_unfiltered (file,
1625 "gdbarch_dump: GET_SAVED_REGISTER = <0x%08lx>\n",
1626 (long) current_gdbarch->get_saved_register
1627 /*GET_SAVED_REGISTER ()*/);
1629 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1630 fprintf_unfiltered (file,
1631 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1632 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1633 fprintf_unfiltered (file,
1634 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1635 HAVE_NONSTEPPABLE_WATCHPOINT);
1638 fprintf_unfiltered (file,
1639 "gdbarch_dump: %s # %s\n",
1640 "INNER_THAN(lhs, rhs)",
1641 XSTRING (INNER_THAN (lhs, rhs)));
1643 fprintf_unfiltered (file,
1644 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1645 (long) current_gdbarch->inner_than
1648 #ifdef INTEGER_TO_ADDRESS_P
1649 fprintf_unfiltered (file,
1650 "gdbarch_dump: %s # %s\n",
1651 "INTEGER_TO_ADDRESS_P()",
1652 XSTRING (INTEGER_TO_ADDRESS_P ()));
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1655 INTEGER_TO_ADDRESS_P ());
1657 #ifdef INTEGER_TO_ADDRESS
1658 fprintf_unfiltered (file,
1659 "gdbarch_dump: %s # %s\n",
1660 "INTEGER_TO_ADDRESS(type, buf)",
1661 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1663 fprintf_unfiltered (file,
1664 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1665 (long) current_gdbarch->integer_to_address
1666 /*INTEGER_TO_ADDRESS ()*/);
1668 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: %s # %s\n",
1671 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1672 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1674 fprintf_unfiltered (file,
1675 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1676 (long) current_gdbarch->in_solib_call_trampoline
1677 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1679 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1680 fprintf_unfiltered (file,
1681 "gdbarch_dump: %s # %s\n",
1682 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1683 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1687 (long) current_gdbarch->in_solib_return_trampoline
1688 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1690 #ifdef MAX_REGISTER_RAW_SIZE
1691 fprintf_unfiltered (file,
1692 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1693 XSTRING (MAX_REGISTER_RAW_SIZE));
1694 fprintf_unfiltered (file,
1695 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1696 MAX_REGISTER_RAW_SIZE);
1698 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1701 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1702 fprintf_unfiltered (file,
1703 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1704 MAX_REGISTER_VIRTUAL_SIZE);
1706 #ifdef MEMORY_INSERT_BREAKPOINT
1707 fprintf_unfiltered (file,
1708 "gdbarch_dump: %s # %s\n",
1709 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1710 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1712 fprintf_unfiltered (file,
1713 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1714 (long) current_gdbarch->memory_insert_breakpoint
1715 /*MEMORY_INSERT_BREAKPOINT ()*/);
1717 #ifdef MEMORY_REMOVE_BREAKPOINT
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: %s # %s\n",
1720 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1721 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1723 fprintf_unfiltered (file,
1724 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1725 (long) current_gdbarch->memory_remove_breakpoint
1726 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1728 #ifdef NAME_OF_MALLOC
1729 fprintf_unfiltered (file,
1730 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1731 XSTRING (NAME_OF_MALLOC));
1732 fprintf_unfiltered (file,
1733 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: NPC_REGNUM # %s\n",
1739 XSTRING (NPC_REGNUM));
1740 fprintf_unfiltered (file,
1741 "gdbarch_dump: NPC_REGNUM = %d\n",
1744 #ifdef NUM_PSEUDO_REGS
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1747 XSTRING (NUM_PSEUDO_REGS));
1748 fprintf_unfiltered (file,
1749 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1753 fprintf_unfiltered (file,
1754 "gdbarch_dump: NUM_REGS # %s\n",
1755 XSTRING (NUM_REGS));
1756 fprintf_unfiltered (file,
1757 "gdbarch_dump: NUM_REGS = %d\n",
1760 #ifdef PARM_BOUNDARY
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1763 XSTRING (PARM_BOUNDARY));
1764 fprintf_unfiltered (file,
1765 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1768 #ifdef PC_IN_SIGTRAMP
1769 fprintf_unfiltered (file,
1770 "gdbarch_dump: %s # %s\n",
1771 "PC_IN_SIGTRAMP(pc, name)",
1772 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1774 fprintf_unfiltered (file,
1775 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1776 (long) current_gdbarch->pc_in_sigtramp
1777 /*PC_IN_SIGTRAMP ()*/);
1780 fprintf_unfiltered (file,
1781 "gdbarch_dump: PC_REGNUM # %s\n",
1782 XSTRING (PC_REGNUM));
1783 fprintf_unfiltered (file,
1784 "gdbarch_dump: PC_REGNUM = %d\n",
1787 #ifdef POINTER_TO_ADDRESS
1788 fprintf_unfiltered (file,
1789 "gdbarch_dump: %s # %s\n",
1790 "POINTER_TO_ADDRESS(type, buf)",
1791 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1793 fprintf_unfiltered (file,
1794 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1795 (long) current_gdbarch->pointer_to_address
1796 /*POINTER_TO_ADDRESS ()*/);
1799 fprintf_unfiltered (file,
1800 "gdbarch_dump: %s # %s\n",
1802 XSTRING (POP_FRAME_P ()));
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: POP_FRAME_P() = %d\n",
1809 /* Macro might contain `[{}]' when not multi-arch */
1810 fprintf_unfiltered (file,
1811 "gdbarch_dump: %s # %s\n",
1813 XSTRING (POP_FRAME (-)));
1816 fprintf_unfiltered (file,
1817 "gdbarch_dump: POP_FRAME = <0x%08lx>\n",
1818 (long) current_gdbarch->pop_frame
1821 #ifdef PREPARE_TO_PROCEED
1822 fprintf_unfiltered (file,
1823 "gdbarch_dump: %s # %s\n",
1824 "PREPARE_TO_PROCEED(select_it)",
1825 XSTRING (PREPARE_TO_PROCEED (select_it)));
1827 fprintf_unfiltered (file,
1828 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1829 (long) current_gdbarch->prepare_to_proceed
1830 /*PREPARE_TO_PROCEED ()*/);
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1835 gdbarch_print_float_info_p (current_gdbarch));
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: print_float_info = 0x%08lx\n",
1839 (long) current_gdbarch->print_float_info);
1841 fprintf_unfiltered (file,
1842 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1843 (long) current_gdbarch->print_registers_info);
1845 fprintf_unfiltered (file,
1846 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1847 gdbarch_print_vector_info_p (current_gdbarch));
1849 fprintf_unfiltered (file,
1850 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1851 (long) current_gdbarch->print_vector_info);
1852 #ifdef PROLOGUE_FRAMELESS_P
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: %s # %s\n",
1855 "PROLOGUE_FRAMELESS_P(ip)",
1856 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1858 fprintf_unfiltered (file,
1859 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1860 (long) current_gdbarch->prologue_frameless_p
1861 /*PROLOGUE_FRAMELESS_P ()*/);
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: PS_REGNUM # %s\n",
1866 XSTRING (PS_REGNUM));
1867 fprintf_unfiltered (file,
1868 "gdbarch_dump: PS_REGNUM = %d\n",
1871 #ifdef PUSH_ARGUMENTS
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: %s # %s\n",
1874 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1875 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1877 fprintf_unfiltered (file,
1878 "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
1879 (long) current_gdbarch->push_arguments
1880 /*PUSH_ARGUMENTS ()*/);
1882 #ifdef PUSH_RETURN_ADDRESS_P
1883 fprintf_unfiltered (file,
1884 "gdbarch_dump: %s # %s\n",
1885 "PUSH_RETURN_ADDRESS_P()",
1886 XSTRING (PUSH_RETURN_ADDRESS_P ()));
1887 fprintf_unfiltered (file,
1888 "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
1889 PUSH_RETURN_ADDRESS_P ());
1891 #ifdef PUSH_RETURN_ADDRESS
1892 fprintf_unfiltered (file,
1893 "gdbarch_dump: %s # %s\n",
1894 "PUSH_RETURN_ADDRESS(pc, sp)",
1895 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1897 fprintf_unfiltered (file,
1898 "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1899 (long) current_gdbarch->push_return_address
1900 /*PUSH_RETURN_ADDRESS ()*/);
1902 #ifdef REGISTER_BYTE
1903 fprintf_unfiltered (file,
1904 "gdbarch_dump: %s # %s\n",
1905 "REGISTER_BYTE(reg_nr)",
1906 XSTRING (REGISTER_BYTE (reg_nr)));
1908 fprintf_unfiltered (file,
1909 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1910 (long) current_gdbarch->register_byte
1911 /*REGISTER_BYTE ()*/);
1913 #ifdef REGISTER_BYTES
1914 fprintf_unfiltered (file,
1915 "gdbarch_dump: REGISTER_BYTES # %s\n",
1916 XSTRING (REGISTER_BYTES));
1917 fprintf_unfiltered (file,
1918 "gdbarch_dump: REGISTER_BYTES = %d\n",
1921 #ifdef REGISTER_BYTES_OK_P
1922 fprintf_unfiltered (file,
1923 "gdbarch_dump: %s # %s\n",
1924 "REGISTER_BYTES_OK_P()",
1925 XSTRING (REGISTER_BYTES_OK_P ()));
1926 fprintf_unfiltered (file,
1927 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1928 REGISTER_BYTES_OK_P ());
1930 #ifdef REGISTER_BYTES_OK
1931 fprintf_unfiltered (file,
1932 "gdbarch_dump: %s # %s\n",
1933 "REGISTER_BYTES_OK(nr_bytes)",
1934 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1936 fprintf_unfiltered (file,
1937 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1938 (long) current_gdbarch->register_bytes_ok
1939 /*REGISTER_BYTES_OK ()*/);
1941 #ifdef REGISTER_CONVERTIBLE
1942 fprintf_unfiltered (file,
1943 "gdbarch_dump: %s # %s\n",
1944 "REGISTER_CONVERTIBLE(nr)",
1945 XSTRING (REGISTER_CONVERTIBLE (nr)));
1947 fprintf_unfiltered (file,
1948 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1949 (long) current_gdbarch->register_convertible
1950 /*REGISTER_CONVERTIBLE ()*/);
1952 #ifdef REGISTER_CONVERT_TO_RAW
1954 /* Macro might contain `[{}]' when not multi-arch */
1955 fprintf_unfiltered (file,
1956 "gdbarch_dump: %s # %s\n",
1957 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1958 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1961 fprintf_unfiltered (file,
1962 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1963 (long) current_gdbarch->register_convert_to_raw
1964 /*REGISTER_CONVERT_TO_RAW ()*/);
1966 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1968 /* Macro might contain `[{}]' when not multi-arch */
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: %s # %s\n",
1971 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1972 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1975 fprintf_unfiltered (file,
1976 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1977 (long) current_gdbarch->register_convert_to_virtual
1978 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1980 #ifdef REGISTER_NAME
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: %s # %s\n",
1983 "REGISTER_NAME(regnr)",
1984 XSTRING (REGISTER_NAME (regnr)));
1986 fprintf_unfiltered (file,
1987 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1988 (long) current_gdbarch->register_name
1989 /*REGISTER_NAME ()*/);
1991 #ifdef REGISTER_RAW_SIZE
1992 fprintf_unfiltered (file,
1993 "gdbarch_dump: %s # %s\n",
1994 "REGISTER_RAW_SIZE(reg_nr)",
1995 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1997 fprintf_unfiltered (file,
1998 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
1999 (long) current_gdbarch->register_raw_size
2000 /*REGISTER_RAW_SIZE ()*/);
2002 #ifdef REGISTER_SIM_REGNO
2003 fprintf_unfiltered (file,
2004 "gdbarch_dump: %s # %s\n",
2005 "REGISTER_SIM_REGNO(reg_nr)",
2006 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2010 (long) current_gdbarch->register_sim_regno
2011 /*REGISTER_SIM_REGNO ()*/);
2013 #ifdef REGISTER_SIZE
2014 fprintf_unfiltered (file,
2015 "gdbarch_dump: REGISTER_SIZE # %s\n",
2016 XSTRING (REGISTER_SIZE));
2017 fprintf_unfiltered (file,
2018 "gdbarch_dump: REGISTER_SIZE = %d\n",
2021 #ifdef REGISTER_TO_VALUE
2023 /* Macro might contain `[{}]' when not multi-arch */
2024 fprintf_unfiltered (file,
2025 "gdbarch_dump: %s # %s\n",
2026 "REGISTER_TO_VALUE(regnum, type, from, to)",
2027 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2030 fprintf_unfiltered (file,
2031 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2032 (long) current_gdbarch->register_to_value
2033 /*REGISTER_TO_VALUE ()*/);
2036 fprintf_unfiltered (file,
2037 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2038 gdbarch_register_type_p (current_gdbarch));
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: register_type = 0x%08lx\n",
2042 (long) current_gdbarch->register_type);
2043 #ifdef REGISTER_VIRTUAL_SIZE
2044 fprintf_unfiltered (file,
2045 "gdbarch_dump: %s # %s\n",
2046 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2047 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2049 fprintf_unfiltered (file,
2050 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2051 (long) current_gdbarch->register_virtual_size
2052 /*REGISTER_VIRTUAL_SIZE ()*/);
2054 #ifdef REGISTER_VIRTUAL_TYPE_P
2055 fprintf_unfiltered (file,
2056 "gdbarch_dump: %s # %s\n",
2057 "REGISTER_VIRTUAL_TYPE_P()",
2058 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2061 REGISTER_VIRTUAL_TYPE_P ());
2063 #ifdef REGISTER_VIRTUAL_TYPE
2064 fprintf_unfiltered (file,
2065 "gdbarch_dump: %s # %s\n",
2066 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2067 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2069 fprintf_unfiltered (file,
2070 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2071 (long) current_gdbarch->register_virtual_type
2072 /*REGISTER_VIRTUAL_TYPE ()*/);
2074 #ifdef REG_STRUCT_HAS_ADDR_P
2075 fprintf_unfiltered (file,
2076 "gdbarch_dump: %s # %s\n",
2077 "REG_STRUCT_HAS_ADDR_P()",
2078 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2079 fprintf_unfiltered (file,
2080 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2081 REG_STRUCT_HAS_ADDR_P ());
2083 #ifdef REG_STRUCT_HAS_ADDR
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: %s # %s\n",
2086 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2087 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2091 (long) current_gdbarch->reg_struct_has_addr
2092 /*REG_STRUCT_HAS_ADDR ()*/);
2094 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2096 /* Macro might contain `[{}]' when not multi-arch */
2097 fprintf_unfiltered (file,
2098 "gdbarch_dump: %s # %s\n",
2099 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2100 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2103 fprintf_unfiltered (file,
2104 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2105 (long) current_gdbarch->remote_translate_xfer_address
2106 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2108 #ifdef RETURN_VALUE_ON_STACK
2109 fprintf_unfiltered (file,
2110 "gdbarch_dump: %s # %s\n",
2111 "RETURN_VALUE_ON_STACK(type)",
2112 XSTRING (RETURN_VALUE_ON_STACK (type)));
2114 fprintf_unfiltered (file,
2115 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2116 (long) current_gdbarch->return_value_on_stack
2117 /*RETURN_VALUE_ON_STACK ()*/);
2119 #ifdef SAVED_PC_AFTER_CALL
2120 fprintf_unfiltered (file,
2121 "gdbarch_dump: %s # %s\n",
2122 "SAVED_PC_AFTER_CALL(frame)",
2123 XSTRING (SAVED_PC_AFTER_CALL (frame)));
2125 fprintf_unfiltered (file,
2126 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2127 (long) current_gdbarch->saved_pc_after_call
2128 /*SAVED_PC_AFTER_CALL ()*/);
2130 #ifdef SAVE_DUMMY_FRAME_TOS_P
2131 fprintf_unfiltered (file,
2132 "gdbarch_dump: %s # %s\n",
2133 "SAVE_DUMMY_FRAME_TOS_P()",
2134 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2135 fprintf_unfiltered (file,
2136 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2137 SAVE_DUMMY_FRAME_TOS_P ());
2139 #ifdef SAVE_DUMMY_FRAME_TOS
2141 /* Macro might contain `[{}]' when not multi-arch */
2142 fprintf_unfiltered (file,
2143 "gdbarch_dump: %s # %s\n",
2144 "SAVE_DUMMY_FRAME_TOS(sp)",
2145 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2148 fprintf_unfiltered (file,
2149 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2150 (long) current_gdbarch->save_dummy_frame_tos
2151 /*SAVE_DUMMY_FRAME_TOS ()*/);
2153 #ifdef SDB_REG_TO_REGNUM
2154 fprintf_unfiltered (file,
2155 "gdbarch_dump: %s # %s\n",
2156 "SDB_REG_TO_REGNUM(sdb_regnr)",
2157 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2159 fprintf_unfiltered (file,
2160 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2161 (long) current_gdbarch->sdb_reg_to_regnum
2162 /*SDB_REG_TO_REGNUM ()*/);
2164 #ifdef SIGTRAMP_END_P
2165 fprintf_unfiltered (file,
2166 "gdbarch_dump: %s # %s\n",
2168 XSTRING (SIGTRAMP_END_P ()));
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: %s # %s\n",
2177 XSTRING (SIGTRAMP_END (pc)));
2179 fprintf_unfiltered (file,
2180 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2181 (long) current_gdbarch->sigtramp_end
2182 /*SIGTRAMP_END ()*/);
2184 #ifdef SIGTRAMP_START_P
2185 fprintf_unfiltered (file,
2186 "gdbarch_dump: %s # %s\n",
2187 "SIGTRAMP_START_P()",
2188 XSTRING (SIGTRAMP_START_P ()));
2189 fprintf_unfiltered (file,
2190 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2191 SIGTRAMP_START_P ());
2193 #ifdef SIGTRAMP_START
2194 fprintf_unfiltered (file,
2195 "gdbarch_dump: %s # %s\n",
2196 "SIGTRAMP_START(pc)",
2197 XSTRING (SIGTRAMP_START (pc)));
2199 fprintf_unfiltered (file,
2200 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2201 (long) current_gdbarch->sigtramp_start
2202 /*SIGTRAMP_START ()*/);
2204 #ifdef SIZEOF_CALL_DUMMY_WORDS
2205 fprintf_unfiltered (file,
2206 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2207 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
2208 fprintf_unfiltered (file,
2209 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
2210 (long) SIZEOF_CALL_DUMMY_WORDS);
2212 #ifdef SKIP_PROLOGUE
2213 fprintf_unfiltered (file,
2214 "gdbarch_dump: %s # %s\n",
2215 "SKIP_PROLOGUE(ip)",
2216 XSTRING (SKIP_PROLOGUE (ip)));
2218 fprintf_unfiltered (file,
2219 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2220 (long) current_gdbarch->skip_prologue
2221 /*SKIP_PROLOGUE ()*/);
2223 #ifdef SKIP_TRAMPOLINE_CODE
2224 fprintf_unfiltered (file,
2225 "gdbarch_dump: %s # %s\n",
2226 "SKIP_TRAMPOLINE_CODE(pc)",
2227 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2229 fprintf_unfiltered (file,
2230 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2231 (long) current_gdbarch->skip_trampoline_code
2232 /*SKIP_TRAMPOLINE_CODE ()*/);
2234 #ifdef SMASH_TEXT_ADDRESS
2235 fprintf_unfiltered (file,
2236 "gdbarch_dump: %s # %s\n",
2237 "SMASH_TEXT_ADDRESS(addr)",
2238 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2240 fprintf_unfiltered (file,
2241 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2242 (long) current_gdbarch->smash_text_address
2243 /*SMASH_TEXT_ADDRESS ()*/);
2245 #ifdef SOFTWARE_SINGLE_STEP_P
2246 fprintf_unfiltered (file,
2247 "gdbarch_dump: %s # %s\n",
2248 "SOFTWARE_SINGLE_STEP_P()",
2249 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2250 fprintf_unfiltered (file,
2251 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2252 SOFTWARE_SINGLE_STEP_P ());
2254 #ifdef SOFTWARE_SINGLE_STEP
2256 /* Macro might contain `[{}]' when not multi-arch */
2257 fprintf_unfiltered (file,
2258 "gdbarch_dump: %s # %s\n",
2259 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2260 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2263 fprintf_unfiltered (file,
2264 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2265 (long) current_gdbarch->software_single_step
2266 /*SOFTWARE_SINGLE_STEP ()*/);
2269 fprintf_unfiltered (file,
2270 "gdbarch_dump: SP_REGNUM # %s\n",
2271 XSTRING (SP_REGNUM));
2272 fprintf_unfiltered (file,
2273 "gdbarch_dump: SP_REGNUM = %d\n",
2276 #ifdef STAB_REG_TO_REGNUM
2277 fprintf_unfiltered (file,
2278 "gdbarch_dump: %s # %s\n",
2279 "STAB_REG_TO_REGNUM(stab_regnr)",
2280 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2282 fprintf_unfiltered (file,
2283 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2284 (long) current_gdbarch->stab_reg_to_regnum
2285 /*STAB_REG_TO_REGNUM ()*/);
2287 #ifdef STACK_ALIGN_P
2288 fprintf_unfiltered (file,
2289 "gdbarch_dump: %s # %s\n",
2291 XSTRING (STACK_ALIGN_P ()));
2292 fprintf_unfiltered (file,
2293 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2297 fprintf_unfiltered (file,
2298 "gdbarch_dump: %s # %s\n",
2300 XSTRING (STACK_ALIGN (sp)));
2302 fprintf_unfiltered (file,
2303 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2304 (long) current_gdbarch->stack_align
2305 /*STACK_ALIGN ()*/);
2307 #ifdef STORE_RETURN_VALUE
2309 /* Macro might contain `[{}]' when not multi-arch */
2310 fprintf_unfiltered (file,
2311 "gdbarch_dump: %s # %s\n",
2312 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2313 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2316 fprintf_unfiltered (file,
2317 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2318 (long) current_gdbarch->store_return_value
2319 /*STORE_RETURN_VALUE ()*/);
2321 #ifdef STORE_STRUCT_RETURN
2323 /* Macro might contain `[{}]' when not multi-arch */
2324 fprintf_unfiltered (file,
2325 "gdbarch_dump: %s # %s\n",
2326 "STORE_STRUCT_RETURN(addr, sp)",
2327 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
2330 fprintf_unfiltered (file,
2331 "gdbarch_dump: STORE_STRUCT_RETURN = <0x%08lx>\n",
2332 (long) current_gdbarch->store_struct_return
2333 /*STORE_STRUCT_RETURN ()*/);
2335 #ifdef TARGET_ADDR_BIT
2336 fprintf_unfiltered (file,
2337 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2338 XSTRING (TARGET_ADDR_BIT));
2339 fprintf_unfiltered (file,
2340 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2343 #ifdef TARGET_ARCHITECTURE
2344 fprintf_unfiltered (file,
2345 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2346 XSTRING (TARGET_ARCHITECTURE));
2347 if (TARGET_ARCHITECTURE != NULL)
2348 fprintf_unfiltered (file,
2349 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2350 TARGET_ARCHITECTURE->printable_name);
2352 #ifdef TARGET_BFD_VMA_BIT
2353 fprintf_unfiltered (file,
2354 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2355 XSTRING (TARGET_BFD_VMA_BIT));
2356 fprintf_unfiltered (file,
2357 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2358 TARGET_BFD_VMA_BIT);
2360 #ifdef TARGET_BYTE_ORDER
2361 fprintf_unfiltered (file,
2362 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2363 XSTRING (TARGET_BYTE_ORDER));
2364 fprintf_unfiltered (file,
2365 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2366 (long) TARGET_BYTE_ORDER);
2368 #ifdef TARGET_CHAR_SIGNED
2369 fprintf_unfiltered (file,
2370 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2371 XSTRING (TARGET_CHAR_SIGNED));
2372 fprintf_unfiltered (file,
2373 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2374 TARGET_CHAR_SIGNED);
2376 #ifdef TARGET_DOUBLE_BIT
2377 fprintf_unfiltered (file,
2378 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2379 XSTRING (TARGET_DOUBLE_BIT));
2380 fprintf_unfiltered (file,
2381 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2384 #ifdef TARGET_DOUBLE_FORMAT
2385 fprintf_unfiltered (file,
2386 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2387 XSTRING (TARGET_DOUBLE_FORMAT));
2388 fprintf_unfiltered (file,
2389 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2390 (TARGET_DOUBLE_FORMAT)->name);
2392 #ifdef TARGET_FLOAT_BIT
2393 fprintf_unfiltered (file,
2394 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2395 XSTRING (TARGET_FLOAT_BIT));
2396 fprintf_unfiltered (file,
2397 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2400 #ifdef TARGET_FLOAT_FORMAT
2401 fprintf_unfiltered (file,
2402 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2403 XSTRING (TARGET_FLOAT_FORMAT));
2404 fprintf_unfiltered (file,
2405 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2406 (TARGET_FLOAT_FORMAT)->name);
2408 #ifdef TARGET_INT_BIT
2409 fprintf_unfiltered (file,
2410 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2411 XSTRING (TARGET_INT_BIT));
2412 fprintf_unfiltered (file,
2413 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2416 #ifdef TARGET_LONG_BIT
2417 fprintf_unfiltered (file,
2418 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2419 XSTRING (TARGET_LONG_BIT));
2420 fprintf_unfiltered (file,
2421 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2424 #ifdef TARGET_LONG_DOUBLE_BIT
2425 fprintf_unfiltered (file,
2426 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2427 XSTRING (TARGET_LONG_DOUBLE_BIT));
2428 fprintf_unfiltered (file,
2429 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2430 TARGET_LONG_DOUBLE_BIT);
2432 #ifdef TARGET_LONG_DOUBLE_FORMAT
2433 fprintf_unfiltered (file,
2434 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2435 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2436 fprintf_unfiltered (file,
2437 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2438 (TARGET_LONG_DOUBLE_FORMAT)->name);
2440 #ifdef TARGET_LONG_LONG_BIT
2441 fprintf_unfiltered (file,
2442 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2443 XSTRING (TARGET_LONG_LONG_BIT));
2444 fprintf_unfiltered (file,
2445 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2446 TARGET_LONG_LONG_BIT);
2449 fprintf_unfiltered (file,
2450 "gdbarch_dump: TARGET_OSABI # %s\n",
2451 XSTRING (TARGET_OSABI));
2452 fprintf_unfiltered (file,
2453 "gdbarch_dump: TARGET_OSABI = %ld\n",
2454 (long) TARGET_OSABI);
2456 #ifdef TARGET_PRINT_INSN
2457 fprintf_unfiltered (file,
2458 "gdbarch_dump: %s # %s\n",
2459 "TARGET_PRINT_INSN(vma, info)",
2460 XSTRING (TARGET_PRINT_INSN (vma, info)));
2462 fprintf_unfiltered (file,
2463 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2464 (long) current_gdbarch->print_insn
2465 /*TARGET_PRINT_INSN ()*/);
2467 #ifdef TARGET_PTR_BIT
2468 fprintf_unfiltered (file,
2469 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2470 XSTRING (TARGET_PTR_BIT));
2471 fprintf_unfiltered (file,
2472 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2475 #ifdef TARGET_READ_FP
2476 fprintf_unfiltered (file,
2477 "gdbarch_dump: %s # %s\n",
2479 XSTRING (TARGET_READ_FP ()));
2481 fprintf_unfiltered (file,
2482 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2483 (long) current_gdbarch->read_fp
2484 /*TARGET_READ_FP ()*/);
2486 #ifdef TARGET_READ_PC
2487 fprintf_unfiltered (file,
2488 "gdbarch_dump: %s # %s\n",
2489 "TARGET_READ_PC(ptid)",
2490 XSTRING (TARGET_READ_PC (ptid)));
2492 fprintf_unfiltered (file,
2493 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2494 (long) current_gdbarch->read_pc
2495 /*TARGET_READ_PC ()*/);
2497 #ifdef TARGET_READ_SP
2498 fprintf_unfiltered (file,
2499 "gdbarch_dump: %s # %s\n",
2501 XSTRING (TARGET_READ_SP ()));
2503 fprintf_unfiltered (file,
2504 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2505 (long) current_gdbarch->read_sp
2506 /*TARGET_READ_SP ()*/);
2508 #ifdef TARGET_SHORT_BIT
2509 fprintf_unfiltered (file,
2510 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2511 XSTRING (TARGET_SHORT_BIT));
2512 fprintf_unfiltered (file,
2513 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2516 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2518 /* Macro might contain `[{}]' when not multi-arch */
2519 fprintf_unfiltered (file,
2520 "gdbarch_dump: %s # %s\n",
2521 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2522 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2525 fprintf_unfiltered (file,
2526 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2527 (long) current_gdbarch->virtual_frame_pointer
2528 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2530 #ifdef TARGET_WRITE_PC
2532 /* Macro might contain `[{}]' when not multi-arch */
2533 fprintf_unfiltered (file,
2534 "gdbarch_dump: %s # %s\n",
2535 "TARGET_WRITE_PC(val, ptid)",
2536 XSTRING (TARGET_WRITE_PC (val, ptid)));
2539 fprintf_unfiltered (file,
2540 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2541 (long) current_gdbarch->write_pc
2542 /*TARGET_WRITE_PC ()*/);
2544 #ifdef TARGET_WRITE_SP
2546 /* Macro might contain `[{}]' when not multi-arch */
2547 fprintf_unfiltered (file,
2548 "gdbarch_dump: %s # %s\n",
2549 "TARGET_WRITE_SP(val)",
2550 XSTRING (TARGET_WRITE_SP (val)));
2553 fprintf_unfiltered (file,
2554 "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
2555 (long) current_gdbarch->write_sp
2556 /*TARGET_WRITE_SP ()*/);
2558 #ifdef USE_STRUCT_CONVENTION
2559 fprintf_unfiltered (file,
2560 "gdbarch_dump: %s # %s\n",
2561 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2562 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2564 fprintf_unfiltered (file,
2565 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2566 (long) current_gdbarch->use_struct_convention
2567 /*USE_STRUCT_CONVENTION ()*/);
2569 #ifdef VALUE_TO_REGISTER
2571 /* Macro might contain `[{}]' when not multi-arch */
2572 fprintf_unfiltered (file,
2573 "gdbarch_dump: %s # %s\n",
2574 "VALUE_TO_REGISTER(type, regnum, from, to)",
2575 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2578 fprintf_unfiltered (file,
2579 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2580 (long) current_gdbarch->value_to_register
2581 /*VALUE_TO_REGISTER ()*/);
2583 if (current_gdbarch->dump_tdep != NULL)
2584 current_gdbarch->dump_tdep (current_gdbarch, file);
2587 struct gdbarch_tdep *
2588 gdbarch_tdep (struct gdbarch *gdbarch)
2590 if (gdbarch_debug >= 2)
2591 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2592 return gdbarch->tdep;
2596 const struct bfd_arch_info *
2597 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2599 gdb_assert (gdbarch != NULL);
2600 if (gdbarch_debug >= 2)
2601 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2602 return gdbarch->bfd_arch_info;
2606 gdbarch_byte_order (struct gdbarch *gdbarch)
2608 gdb_assert (gdbarch != NULL);
2609 if (gdbarch_debug >= 2)
2610 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2611 return gdbarch->byte_order;
2615 gdbarch_osabi (struct gdbarch *gdbarch)
2617 gdb_assert (gdbarch != NULL);
2618 if (gdbarch_debug >= 2)
2619 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2620 return gdbarch->osabi;
2624 gdbarch_short_bit (struct gdbarch *gdbarch)
2626 gdb_assert (gdbarch != NULL);
2627 /* Skip verify of short_bit, invalid_p == 0 */
2628 if (gdbarch_debug >= 2)
2629 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2630 return gdbarch->short_bit;
2634 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2637 gdbarch->short_bit = short_bit;
2641 gdbarch_int_bit (struct gdbarch *gdbarch)
2643 gdb_assert (gdbarch != NULL);
2644 /* Skip verify of int_bit, invalid_p == 0 */
2645 if (gdbarch_debug >= 2)
2646 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2647 return gdbarch->int_bit;
2651 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2654 gdbarch->int_bit = int_bit;
2658 gdbarch_long_bit (struct gdbarch *gdbarch)
2660 gdb_assert (gdbarch != NULL);
2661 /* Skip verify of long_bit, invalid_p == 0 */
2662 if (gdbarch_debug >= 2)
2663 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2664 return gdbarch->long_bit;
2668 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2671 gdbarch->long_bit = long_bit;
2675 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2677 gdb_assert (gdbarch != NULL);
2678 /* Skip verify of long_long_bit, invalid_p == 0 */
2679 if (gdbarch_debug >= 2)
2680 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2681 return gdbarch->long_long_bit;
2685 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2688 gdbarch->long_long_bit = long_long_bit;
2692 gdbarch_float_bit (struct gdbarch *gdbarch)
2694 gdb_assert (gdbarch != NULL);
2695 /* Skip verify of float_bit, invalid_p == 0 */
2696 if (gdbarch_debug >= 2)
2697 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2698 return gdbarch->float_bit;
2702 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2705 gdbarch->float_bit = float_bit;
2709 gdbarch_double_bit (struct gdbarch *gdbarch)
2711 gdb_assert (gdbarch != NULL);
2712 /* Skip verify of double_bit, invalid_p == 0 */
2713 if (gdbarch_debug >= 2)
2714 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2715 return gdbarch->double_bit;
2719 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2722 gdbarch->double_bit = double_bit;
2726 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2728 gdb_assert (gdbarch != NULL);
2729 /* Skip verify of long_double_bit, invalid_p == 0 */
2730 if (gdbarch_debug >= 2)
2731 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2732 return gdbarch->long_double_bit;
2736 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2737 int long_double_bit)
2739 gdbarch->long_double_bit = long_double_bit;
2743 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2745 gdb_assert (gdbarch != NULL);
2746 /* Skip verify of ptr_bit, invalid_p == 0 */
2747 if (gdbarch_debug >= 2)
2748 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2749 return gdbarch->ptr_bit;
2753 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2756 gdbarch->ptr_bit = ptr_bit;
2760 gdbarch_addr_bit (struct gdbarch *gdbarch)
2762 gdb_assert (gdbarch != NULL);
2763 if (gdbarch->addr_bit == 0)
2764 internal_error (__FILE__, __LINE__,
2765 "gdbarch: gdbarch_addr_bit invalid");
2766 if (gdbarch_debug >= 2)
2767 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2768 return gdbarch->addr_bit;
2772 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2775 gdbarch->addr_bit = addr_bit;
2779 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2781 gdb_assert (gdbarch != NULL);
2782 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2783 if (gdbarch_debug >= 2)
2784 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2785 return gdbarch->bfd_vma_bit;
2789 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2792 gdbarch->bfd_vma_bit = bfd_vma_bit;
2796 gdbarch_char_signed (struct gdbarch *gdbarch)
2798 gdb_assert (gdbarch != NULL);
2799 if (gdbarch->char_signed == -1)
2800 internal_error (__FILE__, __LINE__,
2801 "gdbarch: gdbarch_char_signed invalid");
2802 if (gdbarch_debug >= 2)
2803 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2804 return gdbarch->char_signed;
2808 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2811 gdbarch->char_signed = char_signed;
2815 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2817 gdb_assert (gdbarch != NULL);
2818 if (gdbarch->read_pc == 0)
2819 internal_error (__FILE__, __LINE__,
2820 "gdbarch: gdbarch_read_pc invalid");
2821 if (gdbarch_debug >= 2)
2822 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2823 return gdbarch->read_pc (ptid);
2827 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2828 gdbarch_read_pc_ftype read_pc)
2830 gdbarch->read_pc = read_pc;
2834 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2836 gdb_assert (gdbarch != NULL);
2837 if (gdbarch->write_pc == 0)
2838 internal_error (__FILE__, __LINE__,
2839 "gdbarch: gdbarch_write_pc invalid");
2840 if (gdbarch_debug >= 2)
2841 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2842 gdbarch->write_pc (val, ptid);
2846 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2847 gdbarch_write_pc_ftype write_pc)
2849 gdbarch->write_pc = write_pc;
2853 gdbarch_read_fp (struct gdbarch *gdbarch)
2855 gdb_assert (gdbarch != NULL);
2856 if (gdbarch->read_fp == 0)
2857 internal_error (__FILE__, __LINE__,
2858 "gdbarch: gdbarch_read_fp invalid");
2859 if (gdbarch_debug >= 2)
2860 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2861 return gdbarch->read_fp ();
2865 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2866 gdbarch_read_fp_ftype read_fp)
2868 gdbarch->read_fp = read_fp;
2872 gdbarch_read_sp (struct gdbarch *gdbarch)
2874 gdb_assert (gdbarch != NULL);
2875 if (gdbarch->read_sp == 0)
2876 internal_error (__FILE__, __LINE__,
2877 "gdbarch: gdbarch_read_sp invalid");
2878 if (gdbarch_debug >= 2)
2879 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2880 return gdbarch->read_sp ();
2884 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2885 gdbarch_read_sp_ftype read_sp)
2887 gdbarch->read_sp = read_sp;
2891 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2893 gdb_assert (gdbarch != NULL);
2894 if (gdbarch->write_sp == 0)
2895 internal_error (__FILE__, __LINE__,
2896 "gdbarch: gdbarch_write_sp invalid");
2897 if (gdbarch_debug >= 2)
2898 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2899 gdbarch->write_sp (val);
2903 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2904 gdbarch_write_sp_ftype write_sp)
2906 gdbarch->write_sp = write_sp;
2910 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2912 gdb_assert (gdbarch != NULL);
2913 if (gdbarch->virtual_frame_pointer == 0)
2914 internal_error (__FILE__, __LINE__,
2915 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2916 if (gdbarch_debug >= 2)
2917 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2918 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2922 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2923 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2925 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2929 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2931 gdb_assert (gdbarch != NULL);
2932 return gdbarch->pseudo_register_read != 0;
2936 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2938 gdb_assert (gdbarch != NULL);
2939 if (gdbarch->pseudo_register_read == 0)
2940 internal_error (__FILE__, __LINE__,
2941 "gdbarch: gdbarch_pseudo_register_read invalid");
2942 if (gdbarch_debug >= 2)
2943 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2944 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2948 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2949 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2951 gdbarch->pseudo_register_read = pseudo_register_read;
2955 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2957 gdb_assert (gdbarch != NULL);
2958 return gdbarch->pseudo_register_write != 0;
2962 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2964 gdb_assert (gdbarch != NULL);
2965 if (gdbarch->pseudo_register_write == 0)
2966 internal_error (__FILE__, __LINE__,
2967 "gdbarch: gdbarch_pseudo_register_write invalid");
2968 if (gdbarch_debug >= 2)
2969 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2970 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2974 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2975 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2977 gdbarch->pseudo_register_write = pseudo_register_write;
2981 gdbarch_num_regs (struct gdbarch *gdbarch)
2983 gdb_assert (gdbarch != NULL);
2984 if (gdbarch->num_regs == -1)
2985 internal_error (__FILE__, __LINE__,
2986 "gdbarch: gdbarch_num_regs invalid");
2987 if (gdbarch_debug >= 2)
2988 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2989 return gdbarch->num_regs;
2993 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2996 gdbarch->num_regs = num_regs;
3000 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3002 gdb_assert (gdbarch != NULL);
3003 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3004 if (gdbarch_debug >= 2)
3005 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3006 return gdbarch->num_pseudo_regs;
3010 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3011 int num_pseudo_regs)
3013 gdbarch->num_pseudo_regs = num_pseudo_regs;
3017 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3019 gdb_assert (gdbarch != NULL);
3020 /* Skip verify of sp_regnum, invalid_p == 0 */
3021 if (gdbarch_debug >= 2)
3022 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3023 return gdbarch->sp_regnum;
3027 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3030 gdbarch->sp_regnum = sp_regnum;
3034 gdbarch_fp_regnum (struct gdbarch *gdbarch)
3036 gdb_assert (gdbarch != NULL);
3037 /* Skip verify of fp_regnum, invalid_p == 0 */
3038 if (gdbarch_debug >= 2)
3039 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
3040 return gdbarch->fp_regnum;
3044 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
3047 gdbarch->fp_regnum = fp_regnum;
3051 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3053 gdb_assert (gdbarch != NULL);
3054 /* Skip verify of pc_regnum, invalid_p == 0 */
3055 if (gdbarch_debug >= 2)
3056 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3057 return gdbarch->pc_regnum;
3061 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3064 gdbarch->pc_regnum = pc_regnum;
3068 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3070 gdb_assert (gdbarch != NULL);
3071 /* Skip verify of ps_regnum, invalid_p == 0 */
3072 if (gdbarch_debug >= 2)
3073 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3074 return gdbarch->ps_regnum;
3078 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3081 gdbarch->ps_regnum = ps_regnum;
3085 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3087 gdb_assert (gdbarch != NULL);
3088 /* Skip verify of fp0_regnum, invalid_p == 0 */
3089 if (gdbarch_debug >= 2)
3090 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3091 return gdbarch->fp0_regnum;
3095 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3098 gdbarch->fp0_regnum = fp0_regnum;
3102 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3104 gdb_assert (gdbarch != NULL);
3105 /* Skip verify of npc_regnum, invalid_p == 0 */
3106 if (gdbarch_debug >= 2)
3107 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3108 return gdbarch->npc_regnum;
3112 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3115 gdbarch->npc_regnum = npc_regnum;
3119 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3121 gdb_assert (gdbarch != NULL);
3122 if (gdbarch->stab_reg_to_regnum == 0)
3123 internal_error (__FILE__, __LINE__,
3124 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3125 if (gdbarch_debug >= 2)
3126 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3127 return gdbarch->stab_reg_to_regnum (stab_regnr);
3131 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3132 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3134 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3138 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3140 gdb_assert (gdbarch != NULL);
3141 if (gdbarch->ecoff_reg_to_regnum == 0)
3142 internal_error (__FILE__, __LINE__,
3143 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3144 if (gdbarch_debug >= 2)
3145 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3146 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3150 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3151 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3153 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3157 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3159 gdb_assert (gdbarch != NULL);
3160 if (gdbarch->dwarf_reg_to_regnum == 0)
3161 internal_error (__FILE__, __LINE__,
3162 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3163 if (gdbarch_debug >= 2)
3164 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3165 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3169 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3170 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3172 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3176 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3178 gdb_assert (gdbarch != NULL);
3179 if (gdbarch->sdb_reg_to_regnum == 0)
3180 internal_error (__FILE__, __LINE__,
3181 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3182 if (gdbarch_debug >= 2)
3183 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3184 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3188 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3189 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3191 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3195 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3197 gdb_assert (gdbarch != NULL);
3198 if (gdbarch->dwarf2_reg_to_regnum == 0)
3199 internal_error (__FILE__, __LINE__,
3200 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3201 if (gdbarch_debug >= 2)
3202 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3203 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3207 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3208 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3210 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3214 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3216 gdb_assert (gdbarch != NULL);
3217 if (gdbarch->register_name == 0)
3218 internal_error (__FILE__, __LINE__,
3219 "gdbarch: gdbarch_register_name invalid");
3220 if (gdbarch_debug >= 2)
3221 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3222 return gdbarch->register_name (regnr);
3226 set_gdbarch_register_name (struct gdbarch *gdbarch,
3227 gdbarch_register_name_ftype register_name)
3229 gdbarch->register_name = register_name;
3233 gdbarch_register_size (struct gdbarch *gdbarch)
3235 gdb_assert (gdbarch != NULL);
3236 if (gdbarch->register_size == -1)
3237 internal_error (__FILE__, __LINE__,
3238 "gdbarch: gdbarch_register_size invalid");
3239 if (gdbarch_debug >= 2)
3240 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
3241 return gdbarch->register_size;
3245 set_gdbarch_register_size (struct gdbarch *gdbarch,
3248 gdbarch->register_size = register_size;
3252 gdbarch_register_bytes (struct gdbarch *gdbarch)
3254 gdb_assert (gdbarch != NULL);
3255 if (gdbarch->register_bytes == -1)
3256 internal_error (__FILE__, __LINE__,
3257 "gdbarch: gdbarch_register_bytes invalid");
3258 if (gdbarch_debug >= 2)
3259 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3260 return gdbarch->register_bytes;
3264 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3267 gdbarch->register_bytes = register_bytes;
3271 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3273 gdb_assert (gdbarch != NULL);
3274 if (gdbarch->register_byte == 0)
3275 internal_error (__FILE__, __LINE__,
3276 "gdbarch: gdbarch_register_byte invalid");
3277 if (gdbarch_debug >= 2)
3278 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3279 return gdbarch->register_byte (reg_nr);
3283 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3284 gdbarch_register_byte_ftype register_byte)
3286 gdbarch->register_byte = register_byte;
3290 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3292 gdb_assert (gdbarch != NULL);
3293 if (gdbarch->register_raw_size == 0)
3294 internal_error (__FILE__, __LINE__,
3295 "gdbarch: gdbarch_register_raw_size invalid");
3296 if (gdbarch_debug >= 2)
3297 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3298 return gdbarch->register_raw_size (reg_nr);
3302 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3303 gdbarch_register_raw_size_ftype register_raw_size)
3305 gdbarch->register_raw_size = register_raw_size;
3309 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
3311 gdb_assert (gdbarch != NULL);
3312 if (gdbarch->max_register_raw_size == -1)
3313 internal_error (__FILE__, __LINE__,
3314 "gdbarch: gdbarch_max_register_raw_size invalid");
3315 if (gdbarch_debug >= 2)
3316 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
3317 return gdbarch->max_register_raw_size;
3321 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
3322 int max_register_raw_size)
3324 gdbarch->max_register_raw_size = max_register_raw_size;
3328 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3330 gdb_assert (gdbarch != NULL);
3331 if (gdbarch->register_virtual_size == 0)
3332 internal_error (__FILE__, __LINE__,
3333 "gdbarch: gdbarch_register_virtual_size invalid");
3334 if (gdbarch_debug >= 2)
3335 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3336 return gdbarch->register_virtual_size (reg_nr);
3340 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3341 gdbarch_register_virtual_size_ftype register_virtual_size)
3343 gdbarch->register_virtual_size = register_virtual_size;
3347 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
3349 gdb_assert (gdbarch != NULL);
3350 if (gdbarch->max_register_virtual_size == -1)
3351 internal_error (__FILE__, __LINE__,
3352 "gdbarch: gdbarch_max_register_virtual_size invalid");
3353 if (gdbarch_debug >= 2)
3354 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
3355 return gdbarch->max_register_virtual_size;
3359 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
3360 int max_register_virtual_size)
3362 gdbarch->max_register_virtual_size = max_register_virtual_size;
3366 gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
3368 gdb_assert (gdbarch != NULL);
3369 return gdbarch->register_virtual_type != 0;
3373 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3375 gdb_assert (gdbarch != NULL);
3376 if (gdbarch->register_virtual_type == 0)
3377 internal_error (__FILE__, __LINE__,
3378 "gdbarch: gdbarch_register_virtual_type invalid");
3379 if (gdbarch_debug >= 2)
3380 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3381 return gdbarch->register_virtual_type (reg_nr);
3385 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3386 gdbarch_register_virtual_type_ftype register_virtual_type)
3388 gdbarch->register_virtual_type = register_virtual_type;
3392 gdbarch_register_type_p (struct gdbarch *gdbarch)
3394 gdb_assert (gdbarch != NULL);
3395 return gdbarch->register_type != 0;
3399 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3401 gdb_assert (gdbarch != NULL);
3402 if (gdbarch->register_type == 0)
3403 internal_error (__FILE__, __LINE__,
3404 "gdbarch: gdbarch_register_type invalid");
3405 if (gdbarch_debug >= 2)
3406 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3407 return gdbarch->register_type (gdbarch, reg_nr);
3411 set_gdbarch_register_type (struct gdbarch *gdbarch,
3412 gdbarch_register_type_ftype register_type)
3414 gdbarch->register_type = register_type;
3418 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3420 gdb_assert (gdbarch != NULL);
3421 return gdbarch->deprecated_do_registers_info != 0;
3425 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3427 gdb_assert (gdbarch != NULL);
3428 if (gdbarch->deprecated_do_registers_info == 0)
3429 internal_error (__FILE__, __LINE__,
3430 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3431 if (gdbarch_debug >= 2)
3432 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3433 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3437 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3438 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3440 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3444 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3446 gdb_assert (gdbarch != NULL);
3447 if (gdbarch->print_registers_info == 0)
3448 internal_error (__FILE__, __LINE__,
3449 "gdbarch: gdbarch_print_registers_info invalid");
3450 if (gdbarch_debug >= 2)
3451 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3452 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3456 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3457 gdbarch_print_registers_info_ftype print_registers_info)
3459 gdbarch->print_registers_info = print_registers_info;
3463 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3465 gdb_assert (gdbarch != NULL);
3466 return gdbarch->print_float_info != 0;
3470 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3472 gdb_assert (gdbarch != NULL);
3473 if (gdbarch->print_float_info == 0)
3474 internal_error (__FILE__, __LINE__,
3475 "gdbarch: gdbarch_print_float_info invalid");
3476 if (gdbarch_debug >= 2)
3477 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3478 gdbarch->print_float_info (gdbarch, file, frame, args);
3482 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3483 gdbarch_print_float_info_ftype print_float_info)
3485 gdbarch->print_float_info = print_float_info;
3489 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3491 gdb_assert (gdbarch != NULL);
3492 return gdbarch->print_vector_info != 0;
3496 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3498 gdb_assert (gdbarch != NULL);
3499 if (gdbarch->print_vector_info == 0)
3500 internal_error (__FILE__, __LINE__,
3501 "gdbarch: gdbarch_print_vector_info invalid");
3502 if (gdbarch_debug >= 2)
3503 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3504 gdbarch->print_vector_info (gdbarch, file, frame, args);
3508 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3509 gdbarch_print_vector_info_ftype print_vector_info)
3511 gdbarch->print_vector_info = print_vector_info;
3515 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3517 gdb_assert (gdbarch != NULL);
3518 if (gdbarch->register_sim_regno == 0)
3519 internal_error (__FILE__, __LINE__,
3520 "gdbarch: gdbarch_register_sim_regno invalid");
3521 if (gdbarch_debug >= 2)
3522 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3523 return gdbarch->register_sim_regno (reg_nr);
3527 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3528 gdbarch_register_sim_regno_ftype register_sim_regno)
3530 gdbarch->register_sim_regno = register_sim_regno;
3534 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3536 gdb_assert (gdbarch != NULL);
3537 return gdbarch->register_bytes_ok != 0;
3541 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3543 gdb_assert (gdbarch != NULL);
3544 if (gdbarch->register_bytes_ok == 0)
3545 internal_error (__FILE__, __LINE__,
3546 "gdbarch: gdbarch_register_bytes_ok invalid");
3547 if (gdbarch_debug >= 2)
3548 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3549 return gdbarch->register_bytes_ok (nr_bytes);
3553 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3554 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3556 gdbarch->register_bytes_ok = register_bytes_ok;
3560 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3562 gdb_assert (gdbarch != NULL);
3563 if (gdbarch->cannot_fetch_register == 0)
3564 internal_error (__FILE__, __LINE__,
3565 "gdbarch: gdbarch_cannot_fetch_register invalid");
3566 if (gdbarch_debug >= 2)
3567 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3568 return gdbarch->cannot_fetch_register (regnum);
3572 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3573 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3575 gdbarch->cannot_fetch_register = cannot_fetch_register;
3579 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3581 gdb_assert (gdbarch != NULL);
3582 if (gdbarch->cannot_store_register == 0)
3583 internal_error (__FILE__, __LINE__,
3584 "gdbarch: gdbarch_cannot_store_register invalid");
3585 if (gdbarch_debug >= 2)
3586 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3587 return gdbarch->cannot_store_register (regnum);
3591 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3592 gdbarch_cannot_store_register_ftype cannot_store_register)
3594 gdbarch->cannot_store_register = cannot_store_register;
3598 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3600 gdb_assert (gdbarch != NULL);
3601 return gdbarch->get_longjmp_target != 0;
3605 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3607 gdb_assert (gdbarch != NULL);
3608 if (gdbarch->get_longjmp_target == 0)
3609 internal_error (__FILE__, __LINE__,
3610 "gdbarch: gdbarch_get_longjmp_target invalid");
3611 if (gdbarch_debug >= 2)
3612 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3613 return gdbarch->get_longjmp_target (pc);
3617 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3618 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3620 gdbarch->get_longjmp_target = get_longjmp_target;
3624 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3626 gdb_assert (gdbarch != NULL);
3627 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3628 if (gdbarch_debug >= 2)
3629 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3630 return gdbarch->deprecated_use_generic_dummy_frames;
3634 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3635 int deprecated_use_generic_dummy_frames)
3637 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3641 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3643 gdb_assert (gdbarch != NULL);
3644 /* Skip verify of call_dummy_location, invalid_p == 0 */
3645 if (gdbarch_debug >= 2)
3646 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3647 return gdbarch->call_dummy_location;
3651 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3652 int call_dummy_location)
3654 gdbarch->call_dummy_location = call_dummy_location;
3658 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3660 gdb_assert (gdbarch != NULL);
3661 if (gdbarch->call_dummy_address == 0)
3662 internal_error (__FILE__, __LINE__,
3663 "gdbarch: gdbarch_call_dummy_address invalid");
3664 if (gdbarch_debug >= 2)
3665 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3666 return gdbarch->call_dummy_address ();
3670 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3671 gdbarch_call_dummy_address_ftype call_dummy_address)
3673 gdbarch->call_dummy_address = call_dummy_address;
3677 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3679 gdb_assert (gdbarch != NULL);
3680 if (gdbarch->call_dummy_start_offset == -1)
3681 internal_error (__FILE__, __LINE__,
3682 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3683 if (gdbarch_debug >= 2)
3684 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3685 return gdbarch->call_dummy_start_offset;
3689 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3690 CORE_ADDR call_dummy_start_offset)
3692 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3696 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3698 gdb_assert (gdbarch != NULL);
3699 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
3700 internal_error (__FILE__, __LINE__,
3701 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3702 if (gdbarch_debug >= 2)
3703 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3704 return gdbarch->call_dummy_breakpoint_offset;
3708 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3709 CORE_ADDR call_dummy_breakpoint_offset)
3711 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3715 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3717 gdb_assert (gdbarch != NULL);
3718 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3719 internal_error (__FILE__, __LINE__,
3720 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3721 if (gdbarch_debug >= 2)
3722 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3723 return gdbarch->call_dummy_breakpoint_offset_p;
3727 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3728 int call_dummy_breakpoint_offset_p)
3730 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3734 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3736 gdb_assert (gdbarch != NULL);
3737 if (gdbarch->call_dummy_length == -1)
3738 internal_error (__FILE__, __LINE__,
3739 "gdbarch: gdbarch_call_dummy_length invalid");
3740 if (gdbarch_debug >= 2)
3741 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3742 return gdbarch->call_dummy_length;
3746 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3747 int call_dummy_length)
3749 gdbarch->call_dummy_length = call_dummy_length;
3753 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3755 gdb_assert (gdbarch != NULL);
3756 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3760 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3762 gdb_assert (gdbarch != NULL);
3763 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3764 internal_error (__FILE__, __LINE__,
3765 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3766 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3767 if (gdbarch_debug >= 2)
3768 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3769 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3773 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3774 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3776 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3780 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3782 gdb_assert (gdbarch != NULL);
3783 if (gdbarch->call_dummy_p == -1)
3784 internal_error (__FILE__, __LINE__,
3785 "gdbarch: gdbarch_call_dummy_p invalid");
3786 if (gdbarch_debug >= 2)
3787 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3788 return gdbarch->call_dummy_p;
3792 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3795 gdbarch->call_dummy_p = call_dummy_p;
3799 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3801 gdb_assert (gdbarch != NULL);
3802 /* Skip verify of call_dummy_words, invalid_p == 0 */
3803 if (gdbarch_debug >= 2)
3804 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3805 return gdbarch->call_dummy_words;
3809 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3810 LONGEST * call_dummy_words)
3812 gdbarch->call_dummy_words = call_dummy_words;
3816 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3818 gdb_assert (gdbarch != NULL);
3819 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3820 if (gdbarch_debug >= 2)
3821 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3822 return gdbarch->sizeof_call_dummy_words;
3826 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3827 int sizeof_call_dummy_words)
3829 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3833 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3835 gdb_assert (gdbarch != NULL);
3836 if (gdbarch->call_dummy_stack_adjust_p == -1)
3837 internal_error (__FILE__, __LINE__,
3838 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3839 if (gdbarch_debug >= 2)
3840 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3841 return gdbarch->call_dummy_stack_adjust_p;
3845 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3846 int call_dummy_stack_adjust_p)
3848 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3852 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3854 gdb_assert (gdbarch != NULL);
3855 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3856 internal_error (__FILE__, __LINE__,
3857 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3858 if (gdbarch_debug >= 2)
3859 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3860 return gdbarch->call_dummy_stack_adjust;
3864 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3865 int call_dummy_stack_adjust)
3867 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3871 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)
3873 gdb_assert (gdbarch != NULL);
3874 if (gdbarch->fix_call_dummy == 0)
3875 internal_error (__FILE__, __LINE__,
3876 "gdbarch: gdbarch_fix_call_dummy invalid");
3877 if (gdbarch_debug >= 2)
3878 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3879 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3883 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3884 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3886 gdbarch->fix_call_dummy = fix_call_dummy;
3890 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3892 gdb_assert (gdbarch != NULL);
3893 return gdbarch->deprecated_init_frame_pc_first != 0;
3897 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3899 gdb_assert (gdbarch != NULL);
3900 if (gdbarch->deprecated_init_frame_pc_first == 0)
3901 internal_error (__FILE__, __LINE__,
3902 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3903 if (gdbarch_debug >= 2)
3904 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3905 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3909 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3910 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3912 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3916 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3918 gdb_assert (gdbarch != NULL);
3919 return gdbarch->deprecated_init_frame_pc != 0;
3923 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3925 gdb_assert (gdbarch != NULL);
3926 if (gdbarch->deprecated_init_frame_pc == 0)
3927 internal_error (__FILE__, __LINE__,
3928 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3929 if (gdbarch_debug >= 2)
3930 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3931 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3935 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3936 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3938 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3942 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3944 gdb_assert (gdbarch != NULL);
3945 if (gdbarch_debug >= 2)
3946 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3947 return gdbarch->believe_pcc_promotion;
3951 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3952 int believe_pcc_promotion)
3954 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3958 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3960 gdb_assert (gdbarch != NULL);
3961 if (gdbarch_debug >= 2)
3962 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3963 return gdbarch->believe_pcc_promotion_type;
3967 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3968 int believe_pcc_promotion_type)
3970 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3974 gdbarch_get_saved_register_p (struct gdbarch *gdbarch)
3976 gdb_assert (gdbarch != NULL);
3977 return gdbarch->get_saved_register != 0;
3981 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)
3983 gdb_assert (gdbarch != NULL);
3984 if (gdbarch->get_saved_register == 0)
3985 internal_error (__FILE__, __LINE__,
3986 "gdbarch: gdbarch_get_saved_register invalid");
3987 if (gdbarch_debug >= 2)
3988 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3989 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3993 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3994 gdbarch_get_saved_register_ftype get_saved_register)
3996 gdbarch->get_saved_register = get_saved_register;
4000 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
4002 gdb_assert (gdbarch != NULL);
4003 if (gdbarch->register_convertible == 0)
4004 internal_error (__FILE__, __LINE__,
4005 "gdbarch: gdbarch_register_convertible invalid");
4006 if (gdbarch_debug >= 2)
4007 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
4008 return gdbarch->register_convertible (nr);
4012 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
4013 gdbarch_register_convertible_ftype register_convertible)
4015 gdbarch->register_convertible = register_convertible;
4019 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4021 gdb_assert (gdbarch != NULL);
4022 if (gdbarch->register_convert_to_virtual == 0)
4023 internal_error (__FILE__, __LINE__,
4024 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4025 if (gdbarch_debug >= 2)
4026 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
4027 gdbarch->register_convert_to_virtual (regnum, type, from, to);
4031 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
4032 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
4034 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
4038 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4040 gdb_assert (gdbarch != NULL);
4041 if (gdbarch->register_convert_to_raw == 0)
4042 internal_error (__FILE__, __LINE__,
4043 "gdbarch: gdbarch_register_convert_to_raw invalid");
4044 if (gdbarch_debug >= 2)
4045 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
4046 gdbarch->register_convert_to_raw (type, regnum, from, to);
4050 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
4051 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
4053 gdbarch->register_convert_to_raw = register_convert_to_raw;
4057 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4059 gdb_assert (gdbarch != NULL);
4060 if (gdbarch->convert_register_p == 0)
4061 internal_error (__FILE__, __LINE__,
4062 "gdbarch: gdbarch_convert_register_p invalid");
4063 if (gdbarch_debug >= 2)
4064 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4065 return gdbarch->convert_register_p (regnum);
4069 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4070 gdbarch_convert_register_p_ftype convert_register_p)
4072 gdbarch->convert_register_p = convert_register_p;
4076 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4078 gdb_assert (gdbarch != NULL);
4079 if (gdbarch->register_to_value == 0)
4080 internal_error (__FILE__, __LINE__,
4081 "gdbarch: gdbarch_register_to_value invalid");
4082 if (gdbarch_debug >= 2)
4083 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4084 gdbarch->register_to_value (regnum, type, from, to);
4088 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4089 gdbarch_register_to_value_ftype register_to_value)
4091 gdbarch->register_to_value = register_to_value;
4095 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4097 gdb_assert (gdbarch != NULL);
4098 if (gdbarch->value_to_register == 0)
4099 internal_error (__FILE__, __LINE__,
4100 "gdbarch: gdbarch_value_to_register invalid");
4101 if (gdbarch_debug >= 2)
4102 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4103 gdbarch->value_to_register (type, regnum, from, to);
4107 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4108 gdbarch_value_to_register_ftype value_to_register)
4110 gdbarch->value_to_register = value_to_register;
4114 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4116 gdb_assert (gdbarch != NULL);
4117 if (gdbarch->pointer_to_address == 0)
4118 internal_error (__FILE__, __LINE__,
4119 "gdbarch: gdbarch_pointer_to_address invalid");
4120 if (gdbarch_debug >= 2)
4121 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4122 return gdbarch->pointer_to_address (type, buf);
4126 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4127 gdbarch_pointer_to_address_ftype pointer_to_address)
4129 gdbarch->pointer_to_address = pointer_to_address;
4133 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4135 gdb_assert (gdbarch != NULL);
4136 if (gdbarch->address_to_pointer == 0)
4137 internal_error (__FILE__, __LINE__,
4138 "gdbarch: gdbarch_address_to_pointer invalid");
4139 if (gdbarch_debug >= 2)
4140 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4141 gdbarch->address_to_pointer (type, buf, addr);
4145 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4146 gdbarch_address_to_pointer_ftype address_to_pointer)
4148 gdbarch->address_to_pointer = address_to_pointer;
4152 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4154 gdb_assert (gdbarch != NULL);
4155 return gdbarch->integer_to_address != 0;
4159 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4161 gdb_assert (gdbarch != NULL);
4162 if (gdbarch->integer_to_address == 0)
4163 internal_error (__FILE__, __LINE__,
4164 "gdbarch: gdbarch_integer_to_address invalid");
4165 if (gdbarch_debug >= 2)
4166 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4167 return gdbarch->integer_to_address (type, buf);
4171 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4172 gdbarch_integer_to_address_ftype integer_to_address)
4174 gdbarch->integer_to_address = integer_to_address;
4178 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4180 gdb_assert (gdbarch != NULL);
4181 if (gdbarch->return_value_on_stack == 0)
4182 internal_error (__FILE__, __LINE__,
4183 "gdbarch: gdbarch_return_value_on_stack invalid");
4184 if (gdbarch_debug >= 2)
4185 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4186 return gdbarch->return_value_on_stack (type);
4190 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4191 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4193 gdbarch->return_value_on_stack = return_value_on_stack;
4197 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4199 gdb_assert (gdbarch != NULL);
4200 if (gdbarch->push_arguments == 0)
4201 internal_error (__FILE__, __LINE__,
4202 "gdbarch: gdbarch_push_arguments invalid");
4203 if (gdbarch_debug >= 2)
4204 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
4205 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
4209 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
4210 gdbarch_push_arguments_ftype push_arguments)
4212 gdbarch->push_arguments = push_arguments;
4216 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
4218 gdb_assert (gdbarch != NULL);
4219 return gdbarch->deprecated_push_dummy_frame != 0;
4223 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
4225 gdb_assert (gdbarch != NULL);
4226 if (gdbarch->deprecated_push_dummy_frame == 0)
4227 internal_error (__FILE__, __LINE__,
4228 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4229 if (gdbarch_debug >= 2)
4230 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
4231 gdbarch->deprecated_push_dummy_frame ();
4235 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
4236 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
4238 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
4242 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
4244 gdb_assert (gdbarch != NULL);
4245 return gdbarch->push_return_address != 0;
4249 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4251 gdb_assert (gdbarch != NULL);
4252 if (gdbarch->push_return_address == 0)
4253 internal_error (__FILE__, __LINE__,
4254 "gdbarch: gdbarch_push_return_address invalid");
4255 if (gdbarch_debug >= 2)
4256 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
4257 return gdbarch->push_return_address (pc, sp);
4261 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
4262 gdbarch_push_return_address_ftype push_return_address)
4264 gdbarch->push_return_address = push_return_address;
4268 gdbarch_pop_frame_p (struct gdbarch *gdbarch)
4270 gdb_assert (gdbarch != NULL);
4271 return gdbarch->pop_frame != 0;
4275 gdbarch_pop_frame (struct gdbarch *gdbarch)
4277 gdb_assert (gdbarch != NULL);
4278 if (gdbarch->pop_frame == 0)
4279 internal_error (__FILE__, __LINE__,
4280 "gdbarch: gdbarch_pop_frame invalid");
4281 if (gdbarch_debug >= 2)
4282 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
4283 gdbarch->pop_frame ();
4287 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
4288 gdbarch_pop_frame_ftype pop_frame)
4290 gdbarch->pop_frame = pop_frame;
4294 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4296 gdb_assert (gdbarch != NULL);
4297 if (gdbarch->store_struct_return == 0)
4298 internal_error (__FILE__, __LINE__,
4299 "gdbarch: gdbarch_store_struct_return invalid");
4300 if (gdbarch_debug >= 2)
4301 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
4302 gdbarch->store_struct_return (addr, sp);
4306 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
4307 gdbarch_store_struct_return_ftype store_struct_return)
4309 gdbarch->store_struct_return = store_struct_return;
4313 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4315 gdb_assert (gdbarch != NULL);
4316 if (gdbarch->extract_return_value == 0)
4317 internal_error (__FILE__, __LINE__,
4318 "gdbarch: gdbarch_extract_return_value invalid");
4319 if (gdbarch_debug >= 2)
4320 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4321 gdbarch->extract_return_value (type, regcache, valbuf);
4325 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4326 gdbarch_extract_return_value_ftype extract_return_value)
4328 gdbarch->extract_return_value = extract_return_value;
4332 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4334 gdb_assert (gdbarch != NULL);
4335 if (gdbarch->store_return_value == 0)
4336 internal_error (__FILE__, __LINE__,
4337 "gdbarch: gdbarch_store_return_value invalid");
4338 if (gdbarch_debug >= 2)
4339 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4340 gdbarch->store_return_value (type, regcache, valbuf);
4344 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4345 gdbarch_store_return_value_ftype store_return_value)
4347 gdbarch->store_return_value = store_return_value;
4351 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4353 gdb_assert (gdbarch != NULL);
4354 if (gdbarch->deprecated_extract_return_value == 0)
4355 internal_error (__FILE__, __LINE__,
4356 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4357 if (gdbarch_debug >= 2)
4358 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4359 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4363 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4364 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4366 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4370 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4372 gdb_assert (gdbarch != NULL);
4373 if (gdbarch->deprecated_store_return_value == 0)
4374 internal_error (__FILE__, __LINE__,
4375 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4376 if (gdbarch_debug >= 2)
4377 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4378 gdbarch->deprecated_store_return_value (type, valbuf);
4382 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4383 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4385 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4389 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4391 gdb_assert (gdbarch != NULL);
4392 return gdbarch->extract_struct_value_address != 0;
4396 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4398 gdb_assert (gdbarch != NULL);
4399 if (gdbarch->extract_struct_value_address == 0)
4400 internal_error (__FILE__, __LINE__,
4401 "gdbarch: gdbarch_extract_struct_value_address invalid");
4402 if (gdbarch_debug >= 2)
4403 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4404 return gdbarch->extract_struct_value_address (regcache);
4408 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4409 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4411 gdbarch->extract_struct_value_address = extract_struct_value_address;
4415 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4417 gdb_assert (gdbarch != NULL);
4418 return gdbarch->deprecated_extract_struct_value_address != 0;
4422 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4424 gdb_assert (gdbarch != NULL);
4425 if (gdbarch->deprecated_extract_struct_value_address == 0)
4426 internal_error (__FILE__, __LINE__,
4427 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4428 if (gdbarch_debug >= 2)
4429 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4430 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4434 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4435 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4437 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4441 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4443 gdb_assert (gdbarch != NULL);
4444 if (gdbarch->use_struct_convention == 0)
4445 internal_error (__FILE__, __LINE__,
4446 "gdbarch: gdbarch_use_struct_convention invalid");
4447 if (gdbarch_debug >= 2)
4448 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4449 return gdbarch->use_struct_convention (gcc_p, value_type);
4453 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4454 gdbarch_use_struct_convention_ftype use_struct_convention)
4456 gdbarch->use_struct_convention = use_struct_convention;
4460 gdbarch_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4462 gdb_assert (gdbarch != NULL);
4463 return gdbarch->frame_init_saved_regs != 0;
4467 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4469 gdb_assert (gdbarch != NULL);
4470 if (gdbarch->frame_init_saved_regs == 0)
4471 internal_error (__FILE__, __LINE__,
4472 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4473 if (gdbarch_debug >= 2)
4474 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
4475 gdbarch->frame_init_saved_regs (frame);
4479 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
4480 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
4482 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
4486 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4488 gdb_assert (gdbarch != NULL);
4489 return gdbarch->deprecated_init_extra_frame_info != 0;
4493 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4495 gdb_assert (gdbarch != NULL);
4496 if (gdbarch->deprecated_init_extra_frame_info == 0)
4497 internal_error (__FILE__, __LINE__,
4498 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4499 if (gdbarch_debug >= 2)
4500 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4501 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4505 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4506 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4508 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4512 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4514 gdb_assert (gdbarch != NULL);
4515 if (gdbarch->skip_prologue == 0)
4516 internal_error (__FILE__, __LINE__,
4517 "gdbarch: gdbarch_skip_prologue invalid");
4518 if (gdbarch_debug >= 2)
4519 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4520 return gdbarch->skip_prologue (ip);
4524 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4525 gdbarch_skip_prologue_ftype skip_prologue)
4527 gdbarch->skip_prologue = skip_prologue;
4531 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4533 gdb_assert (gdbarch != NULL);
4534 if (gdbarch->prologue_frameless_p == 0)
4535 internal_error (__FILE__, __LINE__,
4536 "gdbarch: gdbarch_prologue_frameless_p invalid");
4537 if (gdbarch_debug >= 2)
4538 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4539 return gdbarch->prologue_frameless_p (ip);
4543 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4544 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4546 gdbarch->prologue_frameless_p = prologue_frameless_p;
4550 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4552 gdb_assert (gdbarch != NULL);
4553 if (gdbarch->inner_than == 0)
4554 internal_error (__FILE__, __LINE__,
4555 "gdbarch: gdbarch_inner_than invalid");
4556 if (gdbarch_debug >= 2)
4557 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4558 return gdbarch->inner_than (lhs, rhs);
4562 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4563 gdbarch_inner_than_ftype inner_than)
4565 gdbarch->inner_than = inner_than;
4568 const unsigned char *
4569 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4571 gdb_assert (gdbarch != NULL);
4572 if (gdbarch->breakpoint_from_pc == 0)
4573 internal_error (__FILE__, __LINE__,
4574 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4575 if (gdbarch_debug >= 2)
4576 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4577 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4581 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4582 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4584 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4588 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4590 gdb_assert (gdbarch != NULL);
4591 if (gdbarch->memory_insert_breakpoint == 0)
4592 internal_error (__FILE__, __LINE__,
4593 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4594 if (gdbarch_debug >= 2)
4595 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4596 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4600 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4601 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4603 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4607 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4609 gdb_assert (gdbarch != NULL);
4610 if (gdbarch->memory_remove_breakpoint == 0)
4611 internal_error (__FILE__, __LINE__,
4612 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4613 if (gdbarch_debug >= 2)
4614 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4615 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4619 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4620 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4622 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4626 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4628 gdb_assert (gdbarch != NULL);
4629 if (gdbarch->decr_pc_after_break == -1)
4630 internal_error (__FILE__, __LINE__,
4631 "gdbarch: gdbarch_decr_pc_after_break invalid");
4632 if (gdbarch_debug >= 2)
4633 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4634 return gdbarch->decr_pc_after_break;
4638 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4639 CORE_ADDR decr_pc_after_break)
4641 gdbarch->decr_pc_after_break = decr_pc_after_break;
4645 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4647 gdb_assert (gdbarch != NULL);
4648 if (gdbarch->prepare_to_proceed == 0)
4649 internal_error (__FILE__, __LINE__,
4650 "gdbarch: gdbarch_prepare_to_proceed invalid");
4651 if (gdbarch_debug >= 2)
4652 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4653 return gdbarch->prepare_to_proceed (select_it);
4657 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4658 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4660 gdbarch->prepare_to_proceed = prepare_to_proceed;
4664 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4666 gdb_assert (gdbarch != NULL);
4667 if (gdbarch->function_start_offset == -1)
4668 internal_error (__FILE__, __LINE__,
4669 "gdbarch: gdbarch_function_start_offset invalid");
4670 if (gdbarch_debug >= 2)
4671 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4672 return gdbarch->function_start_offset;
4676 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4677 CORE_ADDR function_start_offset)
4679 gdbarch->function_start_offset = function_start_offset;
4683 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4685 gdb_assert (gdbarch != NULL);
4686 if (gdbarch->remote_translate_xfer_address == 0)
4687 internal_error (__FILE__, __LINE__,
4688 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4689 if (gdbarch_debug >= 2)
4690 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4691 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4695 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4696 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4698 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4702 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4704 gdb_assert (gdbarch != NULL);
4705 if (gdbarch->frame_args_skip == -1)
4706 internal_error (__FILE__, __LINE__,
4707 "gdbarch: gdbarch_frame_args_skip invalid");
4708 if (gdbarch_debug >= 2)
4709 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4710 return gdbarch->frame_args_skip;
4714 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4715 CORE_ADDR frame_args_skip)
4717 gdbarch->frame_args_skip = frame_args_skip;
4721 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4723 gdb_assert (gdbarch != NULL);
4724 if (gdbarch->frameless_function_invocation == 0)
4725 internal_error (__FILE__, __LINE__,
4726 "gdbarch: gdbarch_frameless_function_invocation invalid");
4727 if (gdbarch_debug >= 2)
4728 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4729 return gdbarch->frameless_function_invocation (fi);
4733 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4734 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4736 gdbarch->frameless_function_invocation = frameless_function_invocation;
4740 gdbarch_frame_chain_p (struct gdbarch *gdbarch)
4742 gdb_assert (gdbarch != NULL);
4743 return gdbarch->frame_chain != 0;
4747 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4749 gdb_assert (gdbarch != NULL);
4750 if (gdbarch->frame_chain == 0)
4751 internal_error (__FILE__, __LINE__,
4752 "gdbarch: gdbarch_frame_chain invalid");
4753 if (gdbarch_debug >= 2)
4754 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4755 return gdbarch->frame_chain (frame);
4759 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4760 gdbarch_frame_chain_ftype frame_chain)
4762 gdbarch->frame_chain = frame_chain;
4766 gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch)
4768 gdb_assert (gdbarch != NULL);
4769 return gdbarch->frame_chain_valid != 0;
4773 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4775 gdb_assert (gdbarch != NULL);
4776 if (gdbarch->frame_chain_valid == 0)
4777 internal_error (__FILE__, __LINE__,
4778 "gdbarch: gdbarch_frame_chain_valid invalid");
4779 if (gdbarch_debug >= 2)
4780 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4781 return gdbarch->frame_chain_valid (chain, thisframe);
4785 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4786 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4788 gdbarch->frame_chain_valid = frame_chain_valid;
4792 gdbarch_frame_saved_pc_p (struct gdbarch *gdbarch)
4794 gdb_assert (gdbarch != NULL);
4795 return gdbarch->frame_saved_pc != 0;
4799 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4801 gdb_assert (gdbarch != NULL);
4802 if (gdbarch->frame_saved_pc == 0)
4803 internal_error (__FILE__, __LINE__,
4804 "gdbarch: gdbarch_frame_saved_pc invalid");
4805 if (gdbarch_debug >= 2)
4806 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4807 return gdbarch->frame_saved_pc (fi);
4811 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4812 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4814 gdbarch->frame_saved_pc = frame_saved_pc;
4818 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4820 gdb_assert (gdbarch != NULL);
4821 if (gdbarch->frame_args_address == 0)
4822 internal_error (__FILE__, __LINE__,
4823 "gdbarch: gdbarch_frame_args_address invalid");
4824 if (gdbarch_debug >= 2)
4825 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4826 return gdbarch->frame_args_address (fi);
4830 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4831 gdbarch_frame_args_address_ftype frame_args_address)
4833 gdbarch->frame_args_address = frame_args_address;
4837 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4839 gdb_assert (gdbarch != NULL);
4840 if (gdbarch->frame_locals_address == 0)
4841 internal_error (__FILE__, __LINE__,
4842 "gdbarch: gdbarch_frame_locals_address invalid");
4843 if (gdbarch_debug >= 2)
4844 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4845 return gdbarch->frame_locals_address (fi);
4849 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4850 gdbarch_frame_locals_address_ftype frame_locals_address)
4852 gdbarch->frame_locals_address = frame_locals_address;
4856 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4858 gdb_assert (gdbarch != NULL);
4859 if (gdbarch->saved_pc_after_call == 0)
4860 internal_error (__FILE__, __LINE__,
4861 "gdbarch: gdbarch_saved_pc_after_call invalid");
4862 if (gdbarch_debug >= 2)
4863 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4864 return gdbarch->saved_pc_after_call (frame);
4868 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4869 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4871 gdbarch->saved_pc_after_call = saved_pc_after_call;
4875 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4877 gdb_assert (gdbarch != NULL);
4878 if (gdbarch->frame_num_args == 0)
4879 internal_error (__FILE__, __LINE__,
4880 "gdbarch: gdbarch_frame_num_args invalid");
4881 if (gdbarch_debug >= 2)
4882 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4883 return gdbarch->frame_num_args (frame);
4887 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4888 gdbarch_frame_num_args_ftype frame_num_args)
4890 gdbarch->frame_num_args = frame_num_args;
4894 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4896 gdb_assert (gdbarch != NULL);
4897 return gdbarch->stack_align != 0;
4901 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4903 gdb_assert (gdbarch != NULL);
4904 if (gdbarch->stack_align == 0)
4905 internal_error (__FILE__, __LINE__,
4906 "gdbarch: gdbarch_stack_align invalid");
4907 if (gdbarch_debug >= 2)
4908 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4909 return gdbarch->stack_align (sp);
4913 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4914 gdbarch_stack_align_ftype stack_align)
4916 gdbarch->stack_align = stack_align;
4920 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4922 gdb_assert (gdbarch != NULL);
4923 return gdbarch->frame_align != 0;
4927 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4929 gdb_assert (gdbarch != NULL);
4930 if (gdbarch->frame_align == 0)
4931 internal_error (__FILE__, __LINE__,
4932 "gdbarch: gdbarch_frame_align invalid");
4933 if (gdbarch_debug >= 2)
4934 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4935 return gdbarch->frame_align (gdbarch, address);
4939 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4940 gdbarch_frame_align_ftype frame_align)
4942 gdbarch->frame_align = frame_align;
4946 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4948 gdb_assert (gdbarch != NULL);
4949 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4950 if (gdbarch_debug >= 2)
4951 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4952 return gdbarch->extra_stack_alignment_needed;
4956 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4957 int extra_stack_alignment_needed)
4959 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4963 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4965 gdb_assert (gdbarch != NULL);
4966 return gdbarch->reg_struct_has_addr != 0;
4970 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4972 gdb_assert (gdbarch != NULL);
4973 if (gdbarch->reg_struct_has_addr == 0)
4974 internal_error (__FILE__, __LINE__,
4975 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4976 if (gdbarch_debug >= 2)
4977 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4978 return gdbarch->reg_struct_has_addr (gcc_p, type);
4982 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4983 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4985 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4989 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4991 gdb_assert (gdbarch != NULL);
4992 return gdbarch->save_dummy_frame_tos != 0;
4996 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4998 gdb_assert (gdbarch != NULL);
4999 if (gdbarch->save_dummy_frame_tos == 0)
5000 internal_error (__FILE__, __LINE__,
5001 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5002 if (gdbarch_debug >= 2)
5003 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
5004 gdbarch->save_dummy_frame_tos (sp);
5008 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
5009 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
5011 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
5015 gdbarch_parm_boundary (struct gdbarch *gdbarch)
5017 gdb_assert (gdbarch != NULL);
5018 if (gdbarch_debug >= 2)
5019 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5020 return gdbarch->parm_boundary;
5024 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5027 gdbarch->parm_boundary = parm_boundary;
5030 const struct floatformat *
5031 gdbarch_float_format (struct gdbarch *gdbarch)
5033 gdb_assert (gdbarch != NULL);
5034 if (gdbarch_debug >= 2)
5035 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5036 return gdbarch->float_format;
5040 set_gdbarch_float_format (struct gdbarch *gdbarch,
5041 const struct floatformat * float_format)
5043 gdbarch->float_format = float_format;
5046 const struct floatformat *
5047 gdbarch_double_format (struct gdbarch *gdbarch)
5049 gdb_assert (gdbarch != NULL);
5050 if (gdbarch_debug >= 2)
5051 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5052 return gdbarch->double_format;
5056 set_gdbarch_double_format (struct gdbarch *gdbarch,
5057 const struct floatformat * double_format)
5059 gdbarch->double_format = double_format;
5062 const struct floatformat *
5063 gdbarch_long_double_format (struct gdbarch *gdbarch)
5065 gdb_assert (gdbarch != NULL);
5066 if (gdbarch_debug >= 2)
5067 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5068 return gdbarch->long_double_format;
5072 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5073 const struct floatformat * long_double_format)
5075 gdbarch->long_double_format = long_double_format;
5079 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5081 gdb_assert (gdbarch != NULL);
5082 if (gdbarch->convert_from_func_ptr_addr == 0)
5083 internal_error (__FILE__, __LINE__,
5084 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5085 if (gdbarch_debug >= 2)
5086 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5087 return gdbarch->convert_from_func_ptr_addr (addr);
5091 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5092 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5094 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5098 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5100 gdb_assert (gdbarch != NULL);
5101 if (gdbarch->addr_bits_remove == 0)
5102 internal_error (__FILE__, __LINE__,
5103 "gdbarch: gdbarch_addr_bits_remove invalid");
5104 if (gdbarch_debug >= 2)
5105 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5106 return gdbarch->addr_bits_remove (addr);
5110 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5111 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5113 gdbarch->addr_bits_remove = addr_bits_remove;
5117 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5119 gdb_assert (gdbarch != NULL);
5120 if (gdbarch->smash_text_address == 0)
5121 internal_error (__FILE__, __LINE__,
5122 "gdbarch: gdbarch_smash_text_address invalid");
5123 if (gdbarch_debug >= 2)
5124 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5125 return gdbarch->smash_text_address (addr);
5129 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5130 gdbarch_smash_text_address_ftype smash_text_address)
5132 gdbarch->smash_text_address = smash_text_address;
5136 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5138 gdb_assert (gdbarch != NULL);
5139 return gdbarch->software_single_step != 0;
5143 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5145 gdb_assert (gdbarch != NULL);
5146 if (gdbarch->software_single_step == 0)
5147 internal_error (__FILE__, __LINE__,
5148 "gdbarch: gdbarch_software_single_step invalid");
5149 if (gdbarch_debug >= 2)
5150 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5151 gdbarch->software_single_step (sig, insert_breakpoints_p);
5155 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5156 gdbarch_software_single_step_ftype software_single_step)
5158 gdbarch->software_single_step = software_single_step;
5162 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5164 gdb_assert (gdbarch != NULL);
5165 if (gdbarch->print_insn == 0)
5166 internal_error (__FILE__, __LINE__,
5167 "gdbarch: gdbarch_print_insn invalid");
5168 if (gdbarch_debug >= 2)
5169 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5170 return gdbarch->print_insn (vma, info);
5174 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5175 gdbarch_print_insn_ftype print_insn)
5177 gdbarch->print_insn = print_insn;
5181 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5183 gdb_assert (gdbarch != NULL);
5184 if (gdbarch->skip_trampoline_code == 0)
5185 internal_error (__FILE__, __LINE__,
5186 "gdbarch: gdbarch_skip_trampoline_code invalid");
5187 if (gdbarch_debug >= 2)
5188 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5189 return gdbarch->skip_trampoline_code (pc);
5193 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5194 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5196 gdbarch->skip_trampoline_code = skip_trampoline_code;
5200 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5202 gdb_assert (gdbarch != NULL);
5203 if (gdbarch->in_solib_call_trampoline == 0)
5204 internal_error (__FILE__, __LINE__,
5205 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5206 if (gdbarch_debug >= 2)
5207 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5208 return gdbarch->in_solib_call_trampoline (pc, name);
5212 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5213 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5215 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5219 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5221 gdb_assert (gdbarch != NULL);
5222 if (gdbarch->in_solib_return_trampoline == 0)
5223 internal_error (__FILE__, __LINE__,
5224 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5225 if (gdbarch_debug >= 2)
5226 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5227 return gdbarch->in_solib_return_trampoline (pc, name);
5231 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5232 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5234 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5238 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5240 gdb_assert (gdbarch != NULL);
5241 if (gdbarch->pc_in_sigtramp == 0)
5242 internal_error (__FILE__, __LINE__,
5243 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5244 if (gdbarch_debug >= 2)
5245 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5246 return gdbarch->pc_in_sigtramp (pc, name);
5250 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5251 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5253 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5257 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5259 gdb_assert (gdbarch != NULL);
5260 return gdbarch->sigtramp_start != 0;
5264 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5266 gdb_assert (gdbarch != NULL);
5267 if (gdbarch->sigtramp_start == 0)
5268 internal_error (__FILE__, __LINE__,
5269 "gdbarch: gdbarch_sigtramp_start invalid");
5270 if (gdbarch_debug >= 2)
5271 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5272 return gdbarch->sigtramp_start (pc);
5276 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5277 gdbarch_sigtramp_start_ftype sigtramp_start)
5279 gdbarch->sigtramp_start = sigtramp_start;
5283 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5285 gdb_assert (gdbarch != NULL);
5286 return gdbarch->sigtramp_end != 0;
5290 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5292 gdb_assert (gdbarch != NULL);
5293 if (gdbarch->sigtramp_end == 0)
5294 internal_error (__FILE__, __LINE__,
5295 "gdbarch: gdbarch_sigtramp_end invalid");
5296 if (gdbarch_debug >= 2)
5297 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5298 return gdbarch->sigtramp_end (pc);
5302 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5303 gdbarch_sigtramp_end_ftype sigtramp_end)
5305 gdbarch->sigtramp_end = sigtramp_end;
5309 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5311 gdb_assert (gdbarch != NULL);
5312 if (gdbarch->in_function_epilogue_p == 0)
5313 internal_error (__FILE__, __LINE__,
5314 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5315 if (gdbarch_debug >= 2)
5316 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5317 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5321 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5322 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5324 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5328 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5330 gdb_assert (gdbarch != NULL);
5331 if (gdbarch->construct_inferior_arguments == 0)
5332 internal_error (__FILE__, __LINE__,
5333 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5334 if (gdbarch_debug >= 2)
5335 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5336 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5340 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5341 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5343 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5347 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5349 gdb_assert (gdbarch != NULL);
5350 return gdbarch->dwarf2_build_frame_info != 0;
5354 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5356 gdb_assert (gdbarch != NULL);
5357 if (gdbarch->dwarf2_build_frame_info == 0)
5358 internal_error (__FILE__, __LINE__,
5359 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5360 if (gdbarch_debug >= 2)
5361 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5362 gdbarch->dwarf2_build_frame_info (objfile);
5366 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5367 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5369 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5373 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5375 gdb_assert (gdbarch != NULL);
5376 if (gdbarch->elf_make_msymbol_special == 0)
5377 internal_error (__FILE__, __LINE__,
5378 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5379 if (gdbarch_debug >= 2)
5380 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5381 gdbarch->elf_make_msymbol_special (sym, msym);
5385 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5386 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5388 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5392 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5394 gdb_assert (gdbarch != NULL);
5395 if (gdbarch->coff_make_msymbol_special == 0)
5396 internal_error (__FILE__, __LINE__,
5397 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5398 if (gdbarch_debug >= 2)
5399 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5400 gdbarch->coff_make_msymbol_special (val, msym);
5404 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5405 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5407 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5411 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5413 gdb_assert (gdbarch != NULL);
5414 /* Skip verify of name_of_malloc, invalid_p == 0 */
5415 if (gdbarch_debug >= 2)
5416 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5417 return gdbarch->name_of_malloc;
5421 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5422 const char * name_of_malloc)
5424 gdbarch->name_of_malloc = name_of_malloc;
5428 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5430 gdb_assert (gdbarch != NULL);
5431 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5432 if (gdbarch_debug >= 2)
5433 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5434 return gdbarch->cannot_step_breakpoint;
5438 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5439 int cannot_step_breakpoint)
5441 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5445 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5447 gdb_assert (gdbarch != NULL);
5448 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5449 if (gdbarch_debug >= 2)
5450 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5451 return gdbarch->have_nonsteppable_watchpoint;
5455 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5456 int have_nonsteppable_watchpoint)
5458 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5462 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5464 gdb_assert (gdbarch != NULL);
5465 return gdbarch->address_class_type_flags != 0;
5469 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5471 gdb_assert (gdbarch != NULL);
5472 if (gdbarch->address_class_type_flags == 0)
5473 internal_error (__FILE__, __LINE__,
5474 "gdbarch: gdbarch_address_class_type_flags invalid");
5475 if (gdbarch_debug >= 2)
5476 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5477 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5481 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5482 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5484 gdbarch->address_class_type_flags = address_class_type_flags;
5488 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5490 gdb_assert (gdbarch != NULL);
5491 return gdbarch->address_class_type_flags_to_name != 0;
5495 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5497 gdb_assert (gdbarch != NULL);
5498 if (gdbarch->address_class_type_flags_to_name == 0)
5499 internal_error (__FILE__, __LINE__,
5500 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5501 if (gdbarch_debug >= 2)
5502 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5503 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5507 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5508 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5510 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5514 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5516 gdb_assert (gdbarch != NULL);
5517 return gdbarch->address_class_name_to_type_flags != 0;
5521 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5523 gdb_assert (gdbarch != NULL);
5524 if (gdbarch->address_class_name_to_type_flags == 0)
5525 internal_error (__FILE__, __LINE__,
5526 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5527 if (gdbarch_debug >= 2)
5528 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5529 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5533 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5534 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5536 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5540 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5542 gdb_assert (gdbarch != NULL);
5543 if (gdbarch->register_reggroup_p == 0)
5544 internal_error (__FILE__, __LINE__,
5545 "gdbarch: gdbarch_register_reggroup_p invalid");
5546 if (gdbarch_debug >= 2)
5547 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5548 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5552 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5553 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5555 gdbarch->register_reggroup_p = register_reggroup_p;
5559 /* Keep a registry of per-architecture data-pointers required by GDB
5566 gdbarch_data_init_ftype *init;
5567 gdbarch_data_free_ftype *free;
5570 struct gdbarch_data_registration
5572 struct gdbarch_data *data;
5573 struct gdbarch_data_registration *next;
5576 struct gdbarch_data_registry
5579 struct gdbarch_data_registration *registrations;
5582 struct gdbarch_data_registry gdbarch_data_registry =
5587 struct gdbarch_data *
5588 register_gdbarch_data (gdbarch_data_init_ftype *init,
5589 gdbarch_data_free_ftype *free)
5591 struct gdbarch_data_registration **curr;
5592 /* Append the new registraration. */
5593 for (curr = &gdbarch_data_registry.registrations;
5595 curr = &(*curr)->next);
5596 (*curr) = XMALLOC (struct gdbarch_data_registration);
5597 (*curr)->next = NULL;
5598 (*curr)->data = XMALLOC (struct gdbarch_data);
5599 (*curr)->data->index = gdbarch_data_registry.nr++;
5600 (*curr)->data->init = init;
5601 (*curr)->data->init_p = 1;
5602 (*curr)->data->free = free;
5603 return (*curr)->data;
5607 /* Create/delete the gdbarch data vector. */
5610 alloc_gdbarch_data (struct gdbarch *gdbarch)
5612 gdb_assert (gdbarch->data == NULL);
5613 gdbarch->nr_data = gdbarch_data_registry.nr;
5614 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5618 free_gdbarch_data (struct gdbarch *gdbarch)
5620 struct gdbarch_data_registration *rego;
5621 gdb_assert (gdbarch->data != NULL);
5622 for (rego = gdbarch_data_registry.registrations;
5626 struct gdbarch_data *data = rego->data;
5627 gdb_assert (data->index < gdbarch->nr_data);
5628 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5630 data->free (gdbarch, gdbarch->data[data->index]);
5631 gdbarch->data[data->index] = NULL;
5634 xfree (gdbarch->data);
5635 gdbarch->data = NULL;
5639 /* Initialize the current value of the specified per-architecture
5643 set_gdbarch_data (struct gdbarch *gdbarch,
5644 struct gdbarch_data *data,
5647 gdb_assert (data->index < gdbarch->nr_data);
5648 if (gdbarch->data[data->index] != NULL)
5650 gdb_assert (data->free != NULL);
5651 data->free (gdbarch, gdbarch->data[data->index]);
5653 gdbarch->data[data->index] = pointer;
5656 /* Return the current value of the specified per-architecture
5660 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5662 gdb_assert (data->index < gdbarch->nr_data);
5663 /* The data-pointer isn't initialized, call init() to get a value but
5664 only if the architecture initializaiton has completed. Otherwise
5665 punt - hope that the caller knows what they are doing. */
5666 if (gdbarch->data[data->index] == NULL
5667 && gdbarch->initialized_p)
5669 /* Be careful to detect an initialization cycle. */
5670 gdb_assert (data->init_p);
5672 gdb_assert (data->init != NULL);
5673 gdbarch->data[data->index] = data->init (gdbarch);
5675 gdb_assert (gdbarch->data[data->index] != NULL);
5677 return gdbarch->data[data->index];
5682 /* Keep a registry of swapped data required by GDB modules. */
5687 struct gdbarch_swap_registration *source;
5688 struct gdbarch_swap *next;
5691 struct gdbarch_swap_registration
5694 unsigned long sizeof_data;
5695 gdbarch_swap_ftype *init;
5696 struct gdbarch_swap_registration *next;
5699 struct gdbarch_swap_registry
5702 struct gdbarch_swap_registration *registrations;
5705 struct gdbarch_swap_registry gdbarch_swap_registry =
5711 register_gdbarch_swap (void *data,
5712 unsigned long sizeof_data,
5713 gdbarch_swap_ftype *init)
5715 struct gdbarch_swap_registration **rego;
5716 for (rego = &gdbarch_swap_registry.registrations;
5718 rego = &(*rego)->next);
5719 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5720 (*rego)->next = NULL;
5721 (*rego)->init = init;
5722 (*rego)->data = data;
5723 (*rego)->sizeof_data = sizeof_data;
5727 clear_gdbarch_swap (struct gdbarch *gdbarch)
5729 struct gdbarch_swap *curr;
5730 for (curr = gdbarch->swap;
5734 memset (curr->source->data, 0, curr->source->sizeof_data);
5739 init_gdbarch_swap (struct gdbarch *gdbarch)
5741 struct gdbarch_swap_registration *rego;
5742 struct gdbarch_swap **curr = &gdbarch->swap;
5743 for (rego = gdbarch_swap_registry.registrations;
5747 if (rego->data != NULL)
5749 (*curr) = XMALLOC (struct gdbarch_swap);
5750 (*curr)->source = rego;
5751 (*curr)->swap = xmalloc (rego->sizeof_data);
5752 (*curr)->next = NULL;
5753 curr = &(*curr)->next;
5755 if (rego->init != NULL)
5761 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5763 struct gdbarch_swap *curr;
5764 for (curr = gdbarch->swap;
5767 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5771 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5773 struct gdbarch_swap *curr;
5774 for (curr = gdbarch->swap;
5777 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5781 /* Keep a registry of the architectures known by GDB. */
5783 struct gdbarch_registration
5785 enum bfd_architecture bfd_architecture;
5786 gdbarch_init_ftype *init;
5787 gdbarch_dump_tdep_ftype *dump_tdep;
5788 struct gdbarch_list *arches;
5789 struct gdbarch_registration *next;
5792 static struct gdbarch_registration *gdbarch_registry = NULL;
5795 append_name (const char ***buf, int *nr, const char *name)
5797 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5803 gdbarch_printable_names (void)
5807 /* Accumulate a list of names based on the registed list of
5809 enum bfd_architecture a;
5811 const char **arches = NULL;
5812 struct gdbarch_registration *rego;
5813 for (rego = gdbarch_registry;
5817 const struct bfd_arch_info *ap;
5818 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5820 internal_error (__FILE__, __LINE__,
5821 "gdbarch_architecture_names: multi-arch unknown");
5824 append_name (&arches, &nr_arches, ap->printable_name);
5829 append_name (&arches, &nr_arches, NULL);
5833 /* Just return all the architectures that BFD knows. Assume that
5834 the legacy architecture framework supports them. */
5835 return bfd_arch_list ();
5840 gdbarch_register (enum bfd_architecture bfd_architecture,
5841 gdbarch_init_ftype *init,
5842 gdbarch_dump_tdep_ftype *dump_tdep)
5844 struct gdbarch_registration **curr;
5845 const struct bfd_arch_info *bfd_arch_info;
5846 /* Check that BFD recognizes this architecture */
5847 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5848 if (bfd_arch_info == NULL)
5850 internal_error (__FILE__, __LINE__,
5851 "gdbarch: Attempt to register unknown architecture (%d)",
5854 /* Check that we haven't seen this architecture before */
5855 for (curr = &gdbarch_registry;
5857 curr = &(*curr)->next)
5859 if (bfd_architecture == (*curr)->bfd_architecture)
5860 internal_error (__FILE__, __LINE__,
5861 "gdbarch: Duplicate registraration of architecture (%s)",
5862 bfd_arch_info->printable_name);
5866 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5867 bfd_arch_info->printable_name,
5870 (*curr) = XMALLOC (struct gdbarch_registration);
5871 (*curr)->bfd_architecture = bfd_architecture;
5872 (*curr)->init = init;
5873 (*curr)->dump_tdep = dump_tdep;
5874 (*curr)->arches = NULL;
5875 (*curr)->next = NULL;
5876 /* When non- multi-arch, install whatever target dump routine we've
5877 been provided - hopefully that routine has been written correctly
5878 and works regardless of multi-arch. */
5879 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5880 && startup_gdbarch.dump_tdep == NULL)
5881 startup_gdbarch.dump_tdep = dump_tdep;
5885 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5886 gdbarch_init_ftype *init)
5888 gdbarch_register (bfd_architecture, init, NULL);
5892 /* Look for an architecture using gdbarch_info. Base search on only
5893 BFD_ARCH_INFO and BYTE_ORDER. */
5895 struct gdbarch_list *
5896 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5897 const struct gdbarch_info *info)
5899 for (; arches != NULL; arches = arches->next)
5901 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5903 if (info->byte_order != arches->gdbarch->byte_order)
5905 if (info->osabi != arches->gdbarch->osabi)
5913 /* Update the current architecture. Return ZERO if the update request
5917 gdbarch_update_p (struct gdbarch_info info)
5919 struct gdbarch *new_gdbarch;
5920 struct gdbarch *old_gdbarch;
5921 struct gdbarch_registration *rego;
5923 /* Fill in missing parts of the INFO struct using a number of
5924 sources: ``set ...''; INFOabfd supplied; existing target. */
5926 /* ``(gdb) set architecture ...'' */
5927 if (info.bfd_arch_info == NULL
5928 && !TARGET_ARCHITECTURE_AUTO)
5929 info.bfd_arch_info = TARGET_ARCHITECTURE;
5930 if (info.bfd_arch_info == NULL
5931 && info.abfd != NULL
5932 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5933 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5934 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5935 if (info.bfd_arch_info == NULL)
5936 info.bfd_arch_info = TARGET_ARCHITECTURE;
5938 /* ``(gdb) set byte-order ...'' */
5939 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5940 && !TARGET_BYTE_ORDER_AUTO)
5941 info.byte_order = TARGET_BYTE_ORDER;
5942 /* From the INFO struct. */
5943 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5944 && info.abfd != NULL)
5945 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5946 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5947 : BFD_ENDIAN_UNKNOWN);
5948 /* From the current target. */
5949 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5950 info.byte_order = TARGET_BYTE_ORDER;
5952 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
5953 if (info.osabi == GDB_OSABI_UNINITIALIZED)
5954 info.osabi = gdbarch_lookup_osabi (info.abfd);
5955 if (info.osabi == GDB_OSABI_UNINITIALIZED)
5956 info.osabi = current_gdbarch->osabi;
5958 /* Must have found some sort of architecture. */
5959 gdb_assert (info.bfd_arch_info != NULL);
5963 fprintf_unfiltered (gdb_stdlog,
5964 "gdbarch_update: info.bfd_arch_info %s\n",
5965 (info.bfd_arch_info != NULL
5966 ? info.bfd_arch_info->printable_name
5968 fprintf_unfiltered (gdb_stdlog,
5969 "gdbarch_update: info.byte_order %d (%s)\n",
5971 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5972 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5974 fprintf_unfiltered (gdb_stdlog,
5975 "gdbarch_update: info.osabi %d (%s)\n",
5976 info.osabi, gdbarch_osabi_name (info.osabi));
5977 fprintf_unfiltered (gdb_stdlog,
5978 "gdbarch_update: info.abfd 0x%lx\n",
5980 fprintf_unfiltered (gdb_stdlog,
5981 "gdbarch_update: info.tdep_info 0x%lx\n",
5982 (long) info.tdep_info);
5985 /* Find the target that knows about this architecture. */
5986 for (rego = gdbarch_registry;
5989 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5994 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
5998 /* Swap the data belonging to the old target out setting the
5999 installed data to zero. This stops the ->init() function trying
6000 to refer to the previous architecture's global data structures. */
6001 swapout_gdbarch_swap (current_gdbarch);
6002 clear_gdbarch_swap (current_gdbarch);
6004 /* Save the previously selected architecture, setting the global to
6005 NULL. This stops ->init() trying to use the previous
6006 architecture's configuration. The previous architecture may not
6007 even be of the same architecture family. The most recent
6008 architecture of the same family is found at the head of the
6009 rego->arches list. */
6010 old_gdbarch = current_gdbarch;
6011 current_gdbarch = NULL;
6013 /* Ask the target for a replacement architecture. */
6014 new_gdbarch = rego->init (info, rego->arches);
6016 /* Did the target like it? No. Reject the change and revert to the
6017 old architecture. */
6018 if (new_gdbarch == NULL)
6021 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
6022 swapin_gdbarch_swap (old_gdbarch);
6023 current_gdbarch = old_gdbarch;
6027 /* Did the architecture change? No. Oops, put the old architecture
6029 if (old_gdbarch == new_gdbarch)
6032 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6034 new_gdbarch->bfd_arch_info->printable_name);
6035 swapin_gdbarch_swap (old_gdbarch);
6036 current_gdbarch = old_gdbarch;
6040 /* Is this a pre-existing architecture? Yes. Move it to the front
6041 of the list of architectures (keeping the list sorted Most
6042 Recently Used) and then copy it in. */
6044 struct gdbarch_list **list;
6045 for (list = ®o->arches;
6047 list = &(*list)->next)
6049 if ((*list)->gdbarch == new_gdbarch)
6051 struct gdbarch_list *this;
6053 fprintf_unfiltered (gdb_stdlog,
6054 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6056 new_gdbarch->bfd_arch_info->printable_name);
6059 (*list) = this->next;
6060 /* Insert in the front. */
6061 this->next = rego->arches;
6062 rego->arches = this;
6063 /* Copy the new architecture in. */
6064 current_gdbarch = new_gdbarch;
6065 swapin_gdbarch_swap (new_gdbarch);
6066 architecture_changed_event ();
6072 /* Prepend this new architecture to the architecture list (keep the
6073 list sorted Most Recently Used). */
6075 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6076 this->next = rego->arches;
6077 this->gdbarch = new_gdbarch;
6078 rego->arches = this;
6081 /* Switch to this new architecture marking it initialized. */
6082 current_gdbarch = new_gdbarch;
6083 current_gdbarch->initialized_p = 1;
6086 fprintf_unfiltered (gdb_stdlog,
6087 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6089 new_gdbarch->bfd_arch_info->printable_name);
6092 /* Check that the newly installed architecture is valid. Plug in
6093 any post init values. */
6094 new_gdbarch->dump_tdep = rego->dump_tdep;
6095 verify_gdbarch (new_gdbarch);
6097 /* Initialize the per-architecture memory (swap) areas.
6098 CURRENT_GDBARCH must be update before these modules are
6100 init_gdbarch_swap (new_gdbarch);
6102 /* Initialize the per-architecture data. CURRENT_GDBARCH
6103 must be updated before these modules are called. */
6104 architecture_changed_event ();
6107 gdbarch_dump (current_gdbarch, gdb_stdlog);
6115 /* Pointer to the target-dependent disassembly function. */
6116 int (*tm_print_insn) (bfd_vma, disassemble_info *);
6117 disassemble_info tm_print_insn_info;
6120 extern void _initialize_gdbarch (void);
6123 _initialize_gdbarch (void)
6125 struct cmd_list_element *c;
6127 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
6128 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
6129 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
6130 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
6131 tm_print_insn_info.print_address_func = dis_asm_print_address;
6133 add_show_from_set (add_set_cmd ("arch",
6136 (char *)&gdbarch_debug,
6137 "Set architecture debugging.\n\
6138 When non-zero, architecture debugging is enabled.", &setdebuglist),
6140 c = add_set_cmd ("archdebug",
6143 (char *)&gdbarch_debug,
6144 "Set architecture debugging.\n\
6145 When non-zero, architecture debugging is enabled.", &setlist);
6147 deprecate_cmd (c, "set debug arch");
6148 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");