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_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
178 gdbarch_print_registers_info_ftype *print_registers_info;
179 gdbarch_print_float_info_ftype *print_float_info;
180 gdbarch_print_vector_info_ftype *print_vector_info;
181 gdbarch_register_sim_regno_ftype *register_sim_regno;
182 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
183 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
184 gdbarch_cannot_store_register_ftype *cannot_store_register;
185 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
186 int deprecated_use_generic_dummy_frames;
187 int call_dummy_location;
188 gdbarch_call_dummy_address_ftype *call_dummy_address;
189 CORE_ADDR call_dummy_start_offset;
190 CORE_ADDR call_dummy_breakpoint_offset;
191 int call_dummy_breakpoint_offset_p;
192 int call_dummy_length;
193 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
195 LONGEST * call_dummy_words;
196 int sizeof_call_dummy_words;
197 int call_dummy_stack_adjust_p;
198 int call_dummy_stack_adjust;
199 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
200 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
201 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
202 int believe_pcc_promotion;
203 int believe_pcc_promotion_type;
204 gdbarch_get_saved_register_ftype *get_saved_register;
205 gdbarch_register_convertible_ftype *register_convertible;
206 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
207 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
208 gdbarch_convert_register_p_ftype *convert_register_p;
209 gdbarch_register_to_value_ftype *register_to_value;
210 gdbarch_value_to_register_ftype *value_to_register;
211 gdbarch_pointer_to_address_ftype *pointer_to_address;
212 gdbarch_address_to_pointer_ftype *address_to_pointer;
213 gdbarch_integer_to_address_ftype *integer_to_address;
214 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
215 gdbarch_push_arguments_ftype *push_arguments;
216 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
217 gdbarch_push_return_address_ftype *push_return_address;
218 gdbarch_pop_frame_ftype *pop_frame;
219 gdbarch_store_struct_return_ftype *store_struct_return;
220 gdbarch_extract_return_value_ftype *extract_return_value;
221 gdbarch_store_return_value_ftype *store_return_value;
222 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
223 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
224 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
225 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
226 gdbarch_use_struct_convention_ftype *use_struct_convention;
227 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
228 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
229 gdbarch_skip_prologue_ftype *skip_prologue;
230 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
231 gdbarch_inner_than_ftype *inner_than;
232 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
233 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
234 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
235 CORE_ADDR decr_pc_after_break;
236 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
237 CORE_ADDR function_start_offset;
238 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
239 CORE_ADDR frame_args_skip;
240 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
241 gdbarch_frame_chain_ftype *frame_chain;
242 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
243 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
244 gdbarch_frame_args_address_ftype *frame_args_address;
245 gdbarch_frame_locals_address_ftype *frame_locals_address;
246 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
247 gdbarch_frame_num_args_ftype *frame_num_args;
248 gdbarch_stack_align_ftype *stack_align;
249 gdbarch_frame_align_ftype *frame_align;
250 int extra_stack_alignment_needed;
251 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
252 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
254 const struct floatformat * float_format;
255 const struct floatformat * double_format;
256 const struct floatformat * long_double_format;
257 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
258 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
259 gdbarch_smash_text_address_ftype *smash_text_address;
260 gdbarch_software_single_step_ftype *software_single_step;
261 gdbarch_print_insn_ftype *print_insn;
262 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
263 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
264 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
265 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
266 gdbarch_sigtramp_start_ftype *sigtramp_start;
267 gdbarch_sigtramp_end_ftype *sigtramp_end;
268 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
269 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
270 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
271 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
272 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
273 const char * name_of_malloc;
274 int cannot_step_breakpoint;
275 int have_nonsteppable_watchpoint;
276 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
277 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
278 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
279 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
283 /* The default architecture uses host values (for want of a better
286 extern const struct bfd_arch_info bfd_default_arch_struct;
288 struct gdbarch startup_gdbarch =
290 1, /* Always initialized. */
291 /* basic architecture information */
292 &bfd_default_arch_struct,
295 /* target specific vector and its dump routine */
297 /*per-architecture data-pointers and swap regions */
299 /* Multi-arch values */
303 8 * sizeof (LONGEST),
306 8 * sizeof (long double),
335 generic_register_byte,
336 generic_register_size,
338 generic_register_size,
342 default_print_registers_info,
357 generic_pc_in_call_dummy,
432 generic_in_function_epilogue_p,
433 construct_inferior_arguments,
443 default_register_reggroup_p,
444 /* startup_gdbarch() */
447 struct gdbarch *current_gdbarch = &startup_gdbarch;
449 /* Do any initialization needed for a non-multiarch configuration
450 after the _initialize_MODULE functions have been run. */
452 initialize_non_multiarch (void)
454 alloc_gdbarch_data (&startup_gdbarch);
455 /* Ensure that all swap areas are zeroed so that they again think
456 they are starting from scratch. */
457 clear_gdbarch_swap (&startup_gdbarch);
458 init_gdbarch_swap (&startup_gdbarch);
462 /* Create a new ``struct gdbarch'' based on information provided by
463 ``struct gdbarch_info''. */
466 gdbarch_alloc (const struct gdbarch_info *info,
467 struct gdbarch_tdep *tdep)
469 /* NOTE: The new architecture variable is named ``current_gdbarch''
470 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
471 the current local architecture and not the previous global
472 architecture. This ensures that the new architectures initial
473 values are not influenced by the previous architecture. Once
474 everything is parameterised with gdbarch, this will go away. */
475 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
476 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
478 alloc_gdbarch_data (current_gdbarch);
480 current_gdbarch->tdep = tdep;
482 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
483 current_gdbarch->byte_order = info->byte_order;
484 current_gdbarch->osabi = info->osabi;
486 /* Force the explicit initialization of these. */
487 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
488 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
489 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
490 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
491 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
492 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
493 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
494 current_gdbarch->ptr_bit = TARGET_INT_BIT;
495 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
496 current_gdbarch->char_signed = -1;
497 current_gdbarch->read_pc = generic_target_read_pc;
498 current_gdbarch->write_pc = generic_target_write_pc;
499 current_gdbarch->read_fp = generic_target_read_fp;
500 current_gdbarch->read_sp = generic_target_read_sp;
501 current_gdbarch->write_sp = generic_target_write_sp;
502 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
503 current_gdbarch->num_regs = -1;
504 current_gdbarch->sp_regnum = -1;
505 current_gdbarch->fp_regnum = -1;
506 current_gdbarch->pc_regnum = -1;
507 current_gdbarch->ps_regnum = -1;
508 current_gdbarch->fp0_regnum = -1;
509 current_gdbarch->npc_regnum = -1;
510 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
511 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
512 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
513 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
514 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
515 current_gdbarch->register_name = legacy_register_name;
516 current_gdbarch->register_size = -1;
517 current_gdbarch->register_bytes = -1;
518 current_gdbarch->register_byte = generic_register_byte;
519 current_gdbarch->register_raw_size = generic_register_size;
520 current_gdbarch->max_register_raw_size = -1;
521 current_gdbarch->register_virtual_size = generic_register_size;
522 current_gdbarch->max_register_virtual_size = -1;
523 current_gdbarch->print_registers_info = default_print_registers_info;
524 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
525 current_gdbarch->cannot_fetch_register = cannot_register_not;
526 current_gdbarch->cannot_store_register = cannot_register_not;
527 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
528 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
529 current_gdbarch->call_dummy_start_offset = -1;
530 current_gdbarch->call_dummy_breakpoint_offset = -1;
531 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
532 current_gdbarch->call_dummy_length = -1;
533 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
534 current_gdbarch->call_dummy_p = -1;
535 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
536 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
537 current_gdbarch->call_dummy_stack_adjust_p = -1;
538 current_gdbarch->register_convertible = generic_register_convertible_not;
539 current_gdbarch->convert_register_p = legacy_convert_register_p;
540 current_gdbarch->register_to_value = legacy_register_to_value;
541 current_gdbarch->value_to_register = legacy_value_to_register;
542 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
543 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
544 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
545 current_gdbarch->push_arguments = default_push_arguments;
546 current_gdbarch->extract_return_value = legacy_extract_return_value;
547 current_gdbarch->store_return_value = legacy_store_return_value;
548 current_gdbarch->use_struct_convention = generic_use_struct_convention;
549 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
550 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
551 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
552 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
553 current_gdbarch->decr_pc_after_break = -1;
554 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
555 current_gdbarch->function_start_offset = -1;
556 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
557 current_gdbarch->frame_args_skip = -1;
558 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
559 current_gdbarch->frame_args_address = get_frame_base;
560 current_gdbarch->frame_locals_address = get_frame_base;
561 current_gdbarch->extra_stack_alignment_needed = 1;
562 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
563 current_gdbarch->addr_bits_remove = core_addr_identity;
564 current_gdbarch->smash_text_address = core_addr_identity;
565 current_gdbarch->print_insn = legacy_print_insn;
566 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
567 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
568 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
569 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
570 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
571 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
572 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
573 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
574 current_gdbarch->name_of_malloc = "malloc";
575 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
576 /* gdbarch_alloc() */
578 return current_gdbarch;
582 /* Free a gdbarch struct. This should never happen in normal
583 operation --- once you've created a gdbarch, you keep it around.
584 However, if an architecture's init function encounters an error
585 building the structure, it may need to clean up a partially
586 constructed gdbarch. */
589 gdbarch_free (struct gdbarch *arch)
591 gdb_assert (arch != NULL);
592 free_gdbarch_data (arch);
597 /* Ensure that all values in a GDBARCH are reasonable. */
600 verify_gdbarch (struct gdbarch *gdbarch)
603 struct cleanup *cleanups;
606 /* Only perform sanity checks on a multi-arch target. */
609 log = mem_fileopen ();
610 cleanups = make_cleanup_ui_file_delete (log);
612 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
613 fprintf_unfiltered (log, "\n\tbyte-order");
614 if (gdbarch->bfd_arch_info == NULL)
615 fprintf_unfiltered (log, "\n\tbfd_arch_info");
616 /* Check those that need to be defined for the given multi-arch level. */
617 /* Skip verify of short_bit, invalid_p == 0 */
618 /* Skip verify of int_bit, invalid_p == 0 */
619 /* Skip verify of long_bit, invalid_p == 0 */
620 /* Skip verify of long_long_bit, invalid_p == 0 */
621 /* Skip verify of float_bit, invalid_p == 0 */
622 /* Skip verify of double_bit, invalid_p == 0 */
623 /* Skip verify of long_double_bit, invalid_p == 0 */
624 /* Skip verify of ptr_bit, invalid_p == 0 */
625 if (gdbarch->addr_bit == 0)
626 gdbarch->addr_bit = TARGET_PTR_BIT;
627 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
628 if (gdbarch->char_signed == -1)
629 gdbarch->char_signed = 1;
630 /* Skip verify of read_pc, invalid_p == 0 */
631 /* Skip verify of write_pc, invalid_p == 0 */
632 /* Skip verify of read_fp, invalid_p == 0 */
633 /* Skip verify of read_sp, invalid_p == 0 */
634 /* Skip verify of write_sp, invalid_p == 0 */
635 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
636 /* Skip verify of pseudo_register_read, has predicate */
637 /* Skip verify of pseudo_register_write, has predicate */
638 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
639 && (gdbarch->num_regs == -1))
640 fprintf_unfiltered (log, "\n\tnum_regs");
641 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
642 /* Skip verify of sp_regnum, invalid_p == 0 */
643 /* Skip verify of fp_regnum, invalid_p == 0 */
644 /* Skip verify of pc_regnum, invalid_p == 0 */
645 /* Skip verify of ps_regnum, invalid_p == 0 */
646 /* Skip verify of fp0_regnum, invalid_p == 0 */
647 /* Skip verify of npc_regnum, invalid_p == 0 */
648 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
649 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
650 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
651 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
652 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
653 /* Skip verify of register_name, invalid_p == 0 */
654 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
655 && (gdbarch->register_size == -1))
656 fprintf_unfiltered (log, "\n\tregister_size");
657 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
658 && (gdbarch->register_bytes == -1))
659 fprintf_unfiltered (log, "\n\tregister_bytes");
660 /* Skip verify of register_byte, invalid_p == 0 */
661 /* Skip verify of register_raw_size, invalid_p == 0 */
662 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
663 && (gdbarch->max_register_raw_size == -1))
664 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
665 /* Skip verify of register_virtual_size, invalid_p == 0 */
666 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
667 && (gdbarch->max_register_virtual_size == -1))
668 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
669 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
670 && (gdbarch->register_virtual_type == 0))
671 fprintf_unfiltered (log, "\n\tregister_virtual_type");
672 /* Skip verify of deprecated_do_registers_info, has predicate */
673 /* Skip verify of print_registers_info, invalid_p == 0 */
674 /* Skip verify of print_float_info, has predicate */
675 /* Skip verify of print_vector_info, has predicate */
676 /* Skip verify of register_sim_regno, invalid_p == 0 */
677 /* Skip verify of register_bytes_ok, has predicate */
678 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
679 /* Skip verify of cannot_store_register, invalid_p == 0 */
680 /* Skip verify of get_longjmp_target, has predicate */
681 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
682 /* Skip verify of call_dummy_location, invalid_p == 0 */
683 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
684 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
685 fprintf_unfiltered (log, "\n\tcall_dummy_address");
686 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
687 && (gdbarch->call_dummy_start_offset == -1))
688 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
689 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
690 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
691 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
692 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
693 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
694 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
695 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
696 && (gdbarch->call_dummy_length == -1))
697 fprintf_unfiltered (log, "\n\tcall_dummy_length");
698 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
699 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
700 && (gdbarch->call_dummy_p == -1))
701 fprintf_unfiltered (log, "\n\tcall_dummy_p");
702 /* Skip verify of call_dummy_words, invalid_p == 0 */
703 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
704 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
705 && (gdbarch->call_dummy_stack_adjust_p == -1))
706 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
707 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
708 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
709 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
710 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
711 && (gdbarch->fix_call_dummy == 0))
712 fprintf_unfiltered (log, "\n\tfix_call_dummy");
713 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
714 /* Skip verify of deprecated_init_frame_pc, has predicate */
715 /* Skip verify of get_saved_register, has predicate */
716 /* Skip verify of register_convertible, invalid_p == 0 */
717 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
718 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
719 /* Skip verify of convert_register_p, invalid_p == 0 */
720 /* Skip verify of register_to_value, invalid_p == 0 */
721 /* Skip verify of value_to_register, invalid_p == 0 */
722 /* Skip verify of pointer_to_address, invalid_p == 0 */
723 /* Skip verify of address_to_pointer, invalid_p == 0 */
724 /* Skip verify of integer_to_address, has predicate */
725 /* Skip verify of return_value_on_stack, invalid_p == 0 */
726 /* Skip verify of push_arguments, invalid_p == 0 */
727 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
728 && (gdbarch->push_dummy_frame == 0))
729 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
730 /* Skip verify of push_return_address, has predicate */
731 /* Skip verify of pop_frame, has predicate */
732 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
733 && (gdbarch->store_struct_return == 0))
734 fprintf_unfiltered (log, "\n\tstore_struct_return");
735 /* Skip verify of extract_return_value, invalid_p == 0 */
736 /* Skip verify of store_return_value, invalid_p == 0 */
737 /* Skip verify of extract_struct_value_address, has predicate */
738 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
739 /* Skip verify of use_struct_convention, invalid_p == 0 */
740 /* Skip verify of frame_init_saved_regs, has predicate */
741 /* Skip verify of init_extra_frame_info, has predicate */
742 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
743 && (gdbarch->skip_prologue == 0))
744 fprintf_unfiltered (log, "\n\tskip_prologue");
745 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
746 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
747 && (gdbarch->inner_than == 0))
748 fprintf_unfiltered (log, "\n\tinner_than");
749 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
750 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
751 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
752 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
753 && (gdbarch->decr_pc_after_break == -1))
754 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
755 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
756 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
757 && (gdbarch->function_start_offset == -1))
758 fprintf_unfiltered (log, "\n\tfunction_start_offset");
759 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
760 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
761 && (gdbarch->frame_args_skip == -1))
762 fprintf_unfiltered (log, "\n\tframe_args_skip");
763 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
764 /* Skip verify of frame_chain, has predicate */
765 /* Skip verify of frame_chain_valid, has predicate */
766 /* Skip verify of frame_saved_pc, has predicate */
767 /* Skip verify of frame_args_address, invalid_p == 0 */
768 /* Skip verify of frame_locals_address, invalid_p == 0 */
769 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
770 && (gdbarch->saved_pc_after_call == 0))
771 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
772 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
773 && (gdbarch->frame_num_args == 0))
774 fprintf_unfiltered (log, "\n\tframe_num_args");
775 /* Skip verify of stack_align, has predicate */
776 /* Skip verify of frame_align, has predicate */
777 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
778 /* Skip verify of reg_struct_has_addr, has predicate */
779 /* Skip verify of save_dummy_frame_tos, has predicate */
780 if (gdbarch->float_format == 0)
781 gdbarch->float_format = default_float_format (gdbarch);
782 if (gdbarch->double_format == 0)
783 gdbarch->double_format = default_double_format (gdbarch);
784 if (gdbarch->long_double_format == 0)
785 gdbarch->long_double_format = default_double_format (gdbarch);
786 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
787 /* Skip verify of addr_bits_remove, invalid_p == 0 */
788 /* Skip verify of smash_text_address, invalid_p == 0 */
789 /* Skip verify of software_single_step, has predicate */
790 /* Skip verify of print_insn, invalid_p == 0 */
791 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
792 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
793 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
794 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
795 /* Skip verify of sigtramp_start, has predicate */
796 /* Skip verify of sigtramp_end, has predicate */
797 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
798 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
799 /* Skip verify of dwarf2_build_frame_info, has predicate */
800 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
801 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
802 /* Skip verify of name_of_malloc, invalid_p == 0 */
803 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
804 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
805 /* Skip verify of address_class_type_flags, has predicate */
806 /* Skip verify of address_class_type_flags_to_name, has predicate */
807 /* Skip verify of address_class_name_to_type_flags, has predicate */
808 /* Skip verify of register_reggroup_p, invalid_p == 0 */
809 buf = ui_file_xstrdup (log, &dummy);
810 make_cleanup (xfree, buf);
811 if (strlen (buf) > 0)
812 internal_error (__FILE__, __LINE__,
813 "verify_gdbarch: the following are invalid ...%s",
815 do_cleanups (cleanups);
819 /* Print out the details of the current architecture. */
821 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
822 just happens to match the global variable ``current_gdbarch''. That
823 way macros refering to that variable get the local and not the global
824 version - ulgh. Once everything is parameterised with gdbarch, this
828 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
830 fprintf_unfiltered (file,
831 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
834 fprintf_unfiltered (file,
835 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
836 gdbarch_frame_align_p (current_gdbarch));
838 fprintf_unfiltered (file,
839 "gdbarch_dump: frame_align = 0x%08lx\n",
840 (long) current_gdbarch->frame_align);
842 fprintf_unfiltered (file,
843 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
844 (long) current_gdbarch->in_function_epilogue_p);
846 fprintf_unfiltered (file,
847 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
848 (long) current_gdbarch->register_reggroup_p);
850 fprintf_unfiltered (file,
851 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
852 gdbarch_pseudo_register_read_p (current_gdbarch));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
856 (long) current_gdbarch->pseudo_register_read);
858 fprintf_unfiltered (file,
859 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
860 gdbarch_pseudo_register_write_p (current_gdbarch));
862 fprintf_unfiltered (file,
863 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
864 (long) current_gdbarch->pseudo_register_write);
866 fprintf_unfiltered (file,
867 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
868 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
870 fprintf_unfiltered (file,
871 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
872 (long) current_gdbarch->address_class_name_to_type_flags);
873 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
874 fprintf_unfiltered (file,
875 "gdbarch_dump: %s # %s\n",
876 "ADDRESS_CLASS_TYPE_FLAGS_P()",
877 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
878 fprintf_unfiltered (file,
879 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
880 ADDRESS_CLASS_TYPE_FLAGS_P ());
882 #ifdef ADDRESS_CLASS_TYPE_FLAGS
883 fprintf_unfiltered (file,
884 "gdbarch_dump: %s # %s\n",
885 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
886 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
888 fprintf_unfiltered (file,
889 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
890 (long) current_gdbarch->address_class_type_flags
891 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
894 fprintf_unfiltered (file,
895 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
896 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
900 (long) current_gdbarch->address_class_type_flags_to_name);
901 #ifdef ADDRESS_TO_POINTER
903 /* Macro might contain `[{}]' when not multi-arch */
904 fprintf_unfiltered (file,
905 "gdbarch_dump: %s # %s\n",
906 "ADDRESS_TO_POINTER(type, buf, addr)",
907 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
910 fprintf_unfiltered (file,
911 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
912 (long) current_gdbarch->address_to_pointer
913 /*ADDRESS_TO_POINTER ()*/);
915 #ifdef ADDR_BITS_REMOVE
916 fprintf_unfiltered (file,
917 "gdbarch_dump: %s # %s\n",
918 "ADDR_BITS_REMOVE(addr)",
919 XSTRING (ADDR_BITS_REMOVE (addr)));
921 fprintf_unfiltered (file,
922 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
923 (long) current_gdbarch->addr_bits_remove
924 /*ADDR_BITS_REMOVE ()*/);
926 #ifdef BELIEVE_PCC_PROMOTION
927 fprintf_unfiltered (file,
928 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
929 XSTRING (BELIEVE_PCC_PROMOTION));
930 fprintf_unfiltered (file,
931 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
932 BELIEVE_PCC_PROMOTION);
934 #ifdef BELIEVE_PCC_PROMOTION_TYPE
935 fprintf_unfiltered (file,
936 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
937 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
940 BELIEVE_PCC_PROMOTION_TYPE);
942 #ifdef BREAKPOINT_FROM_PC
943 fprintf_unfiltered (file,
944 "gdbarch_dump: %s # %s\n",
945 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
946 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
948 fprintf_unfiltered (file,
949 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
950 (long) current_gdbarch->breakpoint_from_pc
951 /*BREAKPOINT_FROM_PC ()*/);
953 #ifdef CALL_DUMMY_ADDRESS
954 fprintf_unfiltered (file,
955 "gdbarch_dump: %s # %s\n",
956 "CALL_DUMMY_ADDRESS()",
957 XSTRING (CALL_DUMMY_ADDRESS ()));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
961 (long) current_gdbarch->call_dummy_address
962 /*CALL_DUMMY_ADDRESS ()*/);
964 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
965 fprintf_unfiltered (file,
966 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
967 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
968 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
969 fprintf_unfiltered (file,
970 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
971 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
973 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
974 fprintf_unfiltered (file,
975 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
976 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
979 CALL_DUMMY_BREAKPOINT_OFFSET_P);
981 #ifdef CALL_DUMMY_LENGTH
982 fprintf_unfiltered (file,
983 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
984 XSTRING (CALL_DUMMY_LENGTH));
985 if (gdbarch->call_dummy_length >= 0)
986 fprintf_unfiltered (file,
987 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
990 #ifdef CALL_DUMMY_LOCATION
991 fprintf_unfiltered (file,
992 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
993 XSTRING (CALL_DUMMY_LOCATION));
994 fprintf_unfiltered (file,
995 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
996 CALL_DUMMY_LOCATION);
999 fprintf_unfiltered (file,
1000 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1001 XSTRING (CALL_DUMMY_P));
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: CALL_DUMMY_P = %d\n",
1006 #ifdef CALL_DUMMY_STACK_ADJUST
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1009 XSTRING (CALL_DUMMY_STACK_ADJUST));
1010 if (CALL_DUMMY_STACK_ADJUST_P)
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1013 (long) CALL_DUMMY_STACK_ADJUST);
1015 #ifdef CALL_DUMMY_STACK_ADJUST_P
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1018 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1021 (long) CALL_DUMMY_STACK_ADJUST_P);
1023 #ifdef CALL_DUMMY_START_OFFSET
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1026 XSTRING (CALL_DUMMY_START_OFFSET));
1027 fprintf_unfiltered (file,
1028 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1029 (long) CALL_DUMMY_START_OFFSET);
1031 #ifdef CALL_DUMMY_WORDS
1032 fprintf_unfiltered (file,
1033 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1034 XSTRING (CALL_DUMMY_WORDS));
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1037 (long) CALL_DUMMY_WORDS);
1039 #ifdef CANNOT_FETCH_REGISTER
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: %s # %s\n",
1042 "CANNOT_FETCH_REGISTER(regnum)",
1043 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
1047 (long) current_gdbarch->cannot_fetch_register
1048 /*CANNOT_FETCH_REGISTER ()*/);
1050 #ifdef CANNOT_STEP_BREAKPOINT
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1053 XSTRING (CANNOT_STEP_BREAKPOINT));
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1056 CANNOT_STEP_BREAKPOINT);
1058 #ifdef CANNOT_STORE_REGISTER
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: %s # %s\n",
1061 "CANNOT_STORE_REGISTER(regnum)",
1062 XSTRING (CANNOT_STORE_REGISTER (regnum)));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1066 (long) current_gdbarch->cannot_store_register
1067 /*CANNOT_STORE_REGISTER ()*/);
1069 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1071 /* Macro might contain `[{}]' when not multi-arch */
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: %s # %s\n",
1074 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1075 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1078 fprintf_unfiltered (file,
1079 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1080 (long) current_gdbarch->coff_make_msymbol_special
1081 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1084 fprintf_unfiltered (file,
1085 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1086 (long) current_gdbarch->construct_inferior_arguments);
1087 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: %s # %s\n",
1090 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1091 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1095 (long) current_gdbarch->convert_from_func_ptr_addr
1096 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1098 #ifdef CONVERT_REGISTER_P
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: %s # %s\n",
1101 "CONVERT_REGISTER_P(regnum)",
1102 XSTRING (CONVERT_REGISTER_P (regnum)));
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1106 (long) current_gdbarch->convert_register_p
1107 /*CONVERT_REGISTER_P ()*/);
1109 #ifdef DECR_PC_AFTER_BREAK
1110 fprintf_unfiltered (file,
1111 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1112 XSTRING (DECR_PC_AFTER_BREAK));
1113 fprintf_unfiltered (file,
1114 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1115 (long) DECR_PC_AFTER_BREAK);
1117 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: %s # %s\n",
1120 "DEPRECATED_DO_REGISTERS_INFO_P()",
1121 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1122 fprintf_unfiltered (file,
1123 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1124 DEPRECATED_DO_REGISTERS_INFO_P ());
1126 #ifdef DEPRECATED_DO_REGISTERS_INFO
1128 /* Macro might contain `[{}]' when not multi-arch */
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: %s # %s\n",
1131 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1132 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1137 (long) current_gdbarch->deprecated_do_registers_info
1138 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1140 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1142 /* Macro might contain `[{}]' when not multi-arch */
1143 fprintf_unfiltered (file,
1144 "gdbarch_dump: %s # %s\n",
1145 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1146 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1151 (long) current_gdbarch->deprecated_extract_return_value
1152 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1154 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: %s # %s\n",
1157 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1158 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1159 fprintf_unfiltered (file,
1160 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1161 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1163 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: %s # %s\n",
1166 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1167 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1171 (long) current_gdbarch->deprecated_extract_struct_value_address
1172 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1174 #ifdef DEPRECATED_INIT_FRAME_PC_P
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: %s # %s\n",
1177 "DEPRECATED_INIT_FRAME_PC_P()",
1178 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1179 fprintf_unfiltered (file,
1180 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1181 DEPRECATED_INIT_FRAME_PC_P ());
1183 #ifdef DEPRECATED_INIT_FRAME_PC
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: %s # %s\n",
1186 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1187 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1191 (long) current_gdbarch->deprecated_init_frame_pc
1192 /*DEPRECATED_INIT_FRAME_PC ()*/);
1194 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: %s # %s\n",
1197 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1198 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1201 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1203 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1204 fprintf_unfiltered (file,
1205 "gdbarch_dump: %s # %s\n",
1206 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1207 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1209 fprintf_unfiltered (file,
1210 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1211 (long) current_gdbarch->deprecated_init_frame_pc_first
1212 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1214 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1215 fprintf_unfiltered (file,
1216 "gdbarch_dump: %s # %s\n",
1217 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1218 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1221 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1223 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: %s # %s\n",
1226 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1227 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1231 (long) current_gdbarch->deprecated_pc_in_call_dummy
1232 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1234 #ifdef DEPRECATED_STORE_RETURN_VALUE
1236 /* Macro might contain `[{}]' when not multi-arch */
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: %s # %s\n",
1239 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1240 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1243 fprintf_unfiltered (file,
1244 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1245 (long) current_gdbarch->deprecated_store_return_value
1246 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1248 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1251 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1252 fprintf_unfiltered (file,
1253 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1254 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1256 #ifdef DWARF2_BUILD_FRAME_INFO_P
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: %s # %s\n",
1259 "DWARF2_BUILD_FRAME_INFO_P()",
1260 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1261 fprintf_unfiltered (file,
1262 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1263 DWARF2_BUILD_FRAME_INFO_P ());
1265 #ifdef DWARF2_BUILD_FRAME_INFO
1267 /* Macro might contain `[{}]' when not multi-arch */
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: %s # %s\n",
1270 "DWARF2_BUILD_FRAME_INFO(objfile)",
1271 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1276 (long) current_gdbarch->dwarf2_build_frame_info
1277 /*DWARF2_BUILD_FRAME_INFO ()*/);
1279 #ifdef DWARF2_REG_TO_REGNUM
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: %s # %s\n",
1282 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1283 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1285 fprintf_unfiltered (file,
1286 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1287 (long) current_gdbarch->dwarf2_reg_to_regnum
1288 /*DWARF2_REG_TO_REGNUM ()*/);
1290 #ifdef DWARF_REG_TO_REGNUM
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: %s # %s\n",
1293 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1294 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1298 (long) current_gdbarch->dwarf_reg_to_regnum
1299 /*DWARF_REG_TO_REGNUM ()*/);
1301 #ifdef ECOFF_REG_TO_REGNUM
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: %s # %s\n",
1304 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1305 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1309 (long) current_gdbarch->ecoff_reg_to_regnum
1310 /*ECOFF_REG_TO_REGNUM ()*/);
1312 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1314 /* Macro might contain `[{}]' when not multi-arch */
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: %s # %s\n",
1317 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1318 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1323 (long) current_gdbarch->elf_make_msymbol_special
1324 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1326 #ifdef EXTRACT_RETURN_VALUE
1328 /* Macro might contain `[{}]' when not multi-arch */
1329 fprintf_unfiltered (file,
1330 "gdbarch_dump: %s # %s\n",
1331 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1332 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1335 fprintf_unfiltered (file,
1336 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1337 (long) current_gdbarch->extract_return_value
1338 /*EXTRACT_RETURN_VALUE ()*/);
1340 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: %s # %s\n",
1343 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1344 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1347 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1349 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: %s # %s\n",
1352 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1353 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1357 (long) current_gdbarch->extract_struct_value_address
1358 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1360 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1363 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1366 EXTRA_STACK_ALIGNMENT_NEEDED);
1368 #ifdef FIX_CALL_DUMMY
1370 /* Macro might contain `[{}]' when not multi-arch */
1371 fprintf_unfiltered (file,
1372 "gdbarch_dump: %s # %s\n",
1373 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1374 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1379 (long) current_gdbarch->fix_call_dummy
1380 /*FIX_CALL_DUMMY ()*/);
1383 fprintf_unfiltered (file,
1384 "gdbarch_dump: FP0_REGNUM # %s\n",
1385 XSTRING (FP0_REGNUM));
1386 fprintf_unfiltered (file,
1387 "gdbarch_dump: FP0_REGNUM = %d\n",
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: FP_REGNUM # %s\n",
1393 XSTRING (FP_REGNUM));
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: FP_REGNUM = %d\n",
1398 #ifdef FRAMELESS_FUNCTION_INVOCATION
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: %s # %s\n",
1401 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1402 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1406 (long) current_gdbarch->frameless_function_invocation
1407 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1409 #ifdef FRAME_ARGS_ADDRESS
1410 fprintf_unfiltered (file,
1411 "gdbarch_dump: %s # %s\n",
1412 "FRAME_ARGS_ADDRESS(fi)",
1413 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1417 (long) current_gdbarch->frame_args_address
1418 /*FRAME_ARGS_ADDRESS ()*/);
1420 #ifdef FRAME_ARGS_SKIP
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1423 XSTRING (FRAME_ARGS_SKIP));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1426 (long) FRAME_ARGS_SKIP);
1428 #ifdef FRAME_CHAIN_P
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: %s # %s\n",
1432 XSTRING (FRAME_CHAIN_P ()));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: FRAME_CHAIN_P() = %d\n",
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: %s # %s\n",
1440 "FRAME_CHAIN(frame)",
1441 XSTRING (FRAME_CHAIN (frame)));
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: FRAME_CHAIN = <0x%08lx>\n",
1445 (long) current_gdbarch->frame_chain
1446 /*FRAME_CHAIN ()*/);
1448 #ifdef FRAME_CHAIN_VALID_P
1449 fprintf_unfiltered (file,
1450 "gdbarch_dump: %s # %s\n",
1451 "FRAME_CHAIN_VALID_P()",
1452 XSTRING (FRAME_CHAIN_VALID_P ()));
1453 fprintf_unfiltered (file,
1454 "gdbarch_dump: FRAME_CHAIN_VALID_P() = %d\n",
1455 FRAME_CHAIN_VALID_P ());
1457 #ifdef FRAME_CHAIN_VALID
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: %s # %s\n",
1460 "FRAME_CHAIN_VALID(chain, thisframe)",
1461 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: FRAME_CHAIN_VALID = <0x%08lx>\n",
1465 (long) current_gdbarch->frame_chain_valid
1466 /*FRAME_CHAIN_VALID ()*/);
1468 #ifdef FRAME_INIT_SAVED_REGS_P
1469 fprintf_unfiltered (file,
1470 "gdbarch_dump: %s # %s\n",
1471 "FRAME_INIT_SAVED_REGS_P()",
1472 XSTRING (FRAME_INIT_SAVED_REGS_P ()));
1473 fprintf_unfiltered (file,
1474 "gdbarch_dump: FRAME_INIT_SAVED_REGS_P() = %d\n",
1475 FRAME_INIT_SAVED_REGS_P ());
1477 #ifdef FRAME_INIT_SAVED_REGS
1479 /* Macro might contain `[{}]' when not multi-arch */
1480 fprintf_unfiltered (file,
1481 "gdbarch_dump: %s # %s\n",
1482 "FRAME_INIT_SAVED_REGS(frame)",
1483 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1488 (long) current_gdbarch->frame_init_saved_regs
1489 /*FRAME_INIT_SAVED_REGS ()*/);
1491 #ifdef FRAME_LOCALS_ADDRESS
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: %s # %s\n",
1494 "FRAME_LOCALS_ADDRESS(fi)",
1495 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1499 (long) current_gdbarch->frame_locals_address
1500 /*FRAME_LOCALS_ADDRESS ()*/);
1502 #ifdef FRAME_NUM_ARGS
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: %s # %s\n",
1505 "FRAME_NUM_ARGS(frame)",
1506 XSTRING (FRAME_NUM_ARGS (frame)));
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1510 (long) current_gdbarch->frame_num_args
1511 /*FRAME_NUM_ARGS ()*/);
1513 #ifdef FRAME_SAVED_PC_P
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: %s # %s\n",
1516 "FRAME_SAVED_PC_P()",
1517 XSTRING (FRAME_SAVED_PC_P ()));
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: FRAME_SAVED_PC_P() = %d\n",
1520 FRAME_SAVED_PC_P ());
1522 #ifdef FRAME_SAVED_PC
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: %s # %s\n",
1525 "FRAME_SAVED_PC(fi)",
1526 XSTRING (FRAME_SAVED_PC (fi)));
1528 fprintf_unfiltered (file,
1529 "gdbarch_dump: FRAME_SAVED_PC = <0x%08lx>\n",
1530 (long) current_gdbarch->frame_saved_pc
1531 /*FRAME_SAVED_PC ()*/);
1533 #ifdef FUNCTION_START_OFFSET
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1536 XSTRING (FUNCTION_START_OFFSET));
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1539 (long) FUNCTION_START_OFFSET);
1541 #ifdef GET_LONGJMP_TARGET_P
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: %s # %s\n",
1544 "GET_LONGJMP_TARGET_P()",
1545 XSTRING (GET_LONGJMP_TARGET_P ()));
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1548 GET_LONGJMP_TARGET_P ());
1550 #ifdef GET_LONGJMP_TARGET
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: %s # %s\n",
1553 "GET_LONGJMP_TARGET(pc)",
1554 XSTRING (GET_LONGJMP_TARGET (pc)));
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1558 (long) current_gdbarch->get_longjmp_target
1559 /*GET_LONGJMP_TARGET ()*/);
1561 #ifdef GET_SAVED_REGISTER_P
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: %s # %s\n",
1564 "GET_SAVED_REGISTER_P()",
1565 XSTRING (GET_SAVED_REGISTER_P ()));
1566 fprintf_unfiltered (file,
1567 "gdbarch_dump: GET_SAVED_REGISTER_P() = %d\n",
1568 GET_SAVED_REGISTER_P ());
1570 #ifdef GET_SAVED_REGISTER
1572 /* Macro might contain `[{}]' when not multi-arch */
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: %s # %s\n",
1575 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1576 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: GET_SAVED_REGISTER = <0x%08lx>\n",
1581 (long) current_gdbarch->get_saved_register
1582 /*GET_SAVED_REGISTER ()*/);
1584 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1585 fprintf_unfiltered (file,
1586 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1587 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1588 fprintf_unfiltered (file,
1589 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1590 HAVE_NONSTEPPABLE_WATCHPOINT);
1592 #ifdef INIT_EXTRA_FRAME_INFO_P
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: %s # %s\n",
1595 "INIT_EXTRA_FRAME_INFO_P()",
1596 XSTRING (INIT_EXTRA_FRAME_INFO_P ()));
1597 fprintf_unfiltered (file,
1598 "gdbarch_dump: INIT_EXTRA_FRAME_INFO_P() = %d\n",
1599 INIT_EXTRA_FRAME_INFO_P ());
1601 #ifdef INIT_EXTRA_FRAME_INFO
1603 /* Macro might contain `[{}]' when not multi-arch */
1604 fprintf_unfiltered (file,
1605 "gdbarch_dump: %s # %s\n",
1606 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1607 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1610 fprintf_unfiltered (file,
1611 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1612 (long) current_gdbarch->init_extra_frame_info
1613 /*INIT_EXTRA_FRAME_INFO ()*/);
1616 fprintf_unfiltered (file,
1617 "gdbarch_dump: %s # %s\n",
1618 "INNER_THAN(lhs, rhs)",
1619 XSTRING (INNER_THAN (lhs, rhs)));
1621 fprintf_unfiltered (file,
1622 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1623 (long) current_gdbarch->inner_than
1626 #ifdef INTEGER_TO_ADDRESS_P
1627 fprintf_unfiltered (file,
1628 "gdbarch_dump: %s # %s\n",
1629 "INTEGER_TO_ADDRESS_P()",
1630 XSTRING (INTEGER_TO_ADDRESS_P ()));
1631 fprintf_unfiltered (file,
1632 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1633 INTEGER_TO_ADDRESS_P ());
1635 #ifdef INTEGER_TO_ADDRESS
1636 fprintf_unfiltered (file,
1637 "gdbarch_dump: %s # %s\n",
1638 "INTEGER_TO_ADDRESS(type, buf)",
1639 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1641 fprintf_unfiltered (file,
1642 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1643 (long) current_gdbarch->integer_to_address
1644 /*INTEGER_TO_ADDRESS ()*/);
1646 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1647 fprintf_unfiltered (file,
1648 "gdbarch_dump: %s # %s\n",
1649 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1650 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1652 fprintf_unfiltered (file,
1653 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1654 (long) current_gdbarch->in_solib_call_trampoline
1655 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1657 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1658 fprintf_unfiltered (file,
1659 "gdbarch_dump: %s # %s\n",
1660 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1661 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1663 fprintf_unfiltered (file,
1664 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1665 (long) current_gdbarch->in_solib_return_trampoline
1666 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1668 #ifdef MAX_REGISTER_RAW_SIZE
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1671 XSTRING (MAX_REGISTER_RAW_SIZE));
1672 fprintf_unfiltered (file,
1673 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1674 MAX_REGISTER_RAW_SIZE);
1676 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1679 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1680 fprintf_unfiltered (file,
1681 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1682 MAX_REGISTER_VIRTUAL_SIZE);
1684 #ifdef MEMORY_INSERT_BREAKPOINT
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: %s # %s\n",
1687 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1688 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1690 fprintf_unfiltered (file,
1691 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1692 (long) current_gdbarch->memory_insert_breakpoint
1693 /*MEMORY_INSERT_BREAKPOINT ()*/);
1695 #ifdef MEMORY_REMOVE_BREAKPOINT
1696 fprintf_unfiltered (file,
1697 "gdbarch_dump: %s # %s\n",
1698 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1699 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1703 (long) current_gdbarch->memory_remove_breakpoint
1704 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1706 #ifdef NAME_OF_MALLOC
1707 fprintf_unfiltered (file,
1708 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1709 XSTRING (NAME_OF_MALLOC));
1710 fprintf_unfiltered (file,
1711 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1715 fprintf_unfiltered (file,
1716 "gdbarch_dump: NPC_REGNUM # %s\n",
1717 XSTRING (NPC_REGNUM));
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: NPC_REGNUM = %d\n",
1722 #ifdef NUM_PSEUDO_REGS
1723 fprintf_unfiltered (file,
1724 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1725 XSTRING (NUM_PSEUDO_REGS));
1726 fprintf_unfiltered (file,
1727 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: NUM_REGS # %s\n",
1733 XSTRING (NUM_REGS));
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: NUM_REGS = %d\n",
1738 #ifdef PARM_BOUNDARY
1739 fprintf_unfiltered (file,
1740 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1741 XSTRING (PARM_BOUNDARY));
1742 fprintf_unfiltered (file,
1743 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1746 #ifdef PC_IN_SIGTRAMP
1747 fprintf_unfiltered (file,
1748 "gdbarch_dump: %s # %s\n",
1749 "PC_IN_SIGTRAMP(pc, name)",
1750 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1752 fprintf_unfiltered (file,
1753 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1754 (long) current_gdbarch->pc_in_sigtramp
1755 /*PC_IN_SIGTRAMP ()*/);
1758 fprintf_unfiltered (file,
1759 "gdbarch_dump: PC_REGNUM # %s\n",
1760 XSTRING (PC_REGNUM));
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: PC_REGNUM = %d\n",
1765 #ifdef POINTER_TO_ADDRESS
1766 fprintf_unfiltered (file,
1767 "gdbarch_dump: %s # %s\n",
1768 "POINTER_TO_ADDRESS(type, buf)",
1769 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1771 fprintf_unfiltered (file,
1772 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1773 (long) current_gdbarch->pointer_to_address
1774 /*POINTER_TO_ADDRESS ()*/);
1777 fprintf_unfiltered (file,
1778 "gdbarch_dump: %s # %s\n",
1780 XSTRING (POP_FRAME_P ()));
1781 fprintf_unfiltered (file,
1782 "gdbarch_dump: POP_FRAME_P() = %d\n",
1787 /* Macro might contain `[{}]' when not multi-arch */
1788 fprintf_unfiltered (file,
1789 "gdbarch_dump: %s # %s\n",
1791 XSTRING (POP_FRAME (-)));
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: POP_FRAME = <0x%08lx>\n",
1796 (long) current_gdbarch->pop_frame
1799 #ifdef PREPARE_TO_PROCEED
1800 fprintf_unfiltered (file,
1801 "gdbarch_dump: %s # %s\n",
1802 "PREPARE_TO_PROCEED(select_it)",
1803 XSTRING (PREPARE_TO_PROCEED (select_it)));
1805 fprintf_unfiltered (file,
1806 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1807 (long) current_gdbarch->prepare_to_proceed
1808 /*PREPARE_TO_PROCEED ()*/);
1811 fprintf_unfiltered (file,
1812 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1813 gdbarch_print_float_info_p (current_gdbarch));
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: print_float_info = 0x%08lx\n",
1817 (long) current_gdbarch->print_float_info);
1819 fprintf_unfiltered (file,
1820 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1821 (long) current_gdbarch->print_registers_info);
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1825 gdbarch_print_vector_info_p (current_gdbarch));
1827 fprintf_unfiltered (file,
1828 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1829 (long) current_gdbarch->print_vector_info);
1830 #ifdef PROLOGUE_FRAMELESS_P
1831 fprintf_unfiltered (file,
1832 "gdbarch_dump: %s # %s\n",
1833 "PROLOGUE_FRAMELESS_P(ip)",
1834 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1838 (long) current_gdbarch->prologue_frameless_p
1839 /*PROLOGUE_FRAMELESS_P ()*/);
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: PS_REGNUM # %s\n",
1844 XSTRING (PS_REGNUM));
1845 fprintf_unfiltered (file,
1846 "gdbarch_dump: PS_REGNUM = %d\n",
1849 #ifdef PUSH_ARGUMENTS
1850 fprintf_unfiltered (file,
1851 "gdbarch_dump: %s # %s\n",
1852 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1853 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1855 fprintf_unfiltered (file,
1856 "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
1857 (long) current_gdbarch->push_arguments
1858 /*PUSH_ARGUMENTS ()*/);
1860 #ifdef PUSH_DUMMY_FRAME
1862 /* Macro might contain `[{}]' when not multi-arch */
1863 fprintf_unfiltered (file,
1864 "gdbarch_dump: %s # %s\n",
1865 "PUSH_DUMMY_FRAME(-)",
1866 XSTRING (PUSH_DUMMY_FRAME (-)));
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: PUSH_DUMMY_FRAME = <0x%08lx>\n",
1871 (long) current_gdbarch->push_dummy_frame
1872 /*PUSH_DUMMY_FRAME ()*/);
1874 #ifdef PUSH_RETURN_ADDRESS_P
1875 fprintf_unfiltered (file,
1876 "gdbarch_dump: %s # %s\n",
1877 "PUSH_RETURN_ADDRESS_P()",
1878 XSTRING (PUSH_RETURN_ADDRESS_P ()));
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
1881 PUSH_RETURN_ADDRESS_P ());
1883 #ifdef PUSH_RETURN_ADDRESS
1884 fprintf_unfiltered (file,
1885 "gdbarch_dump: %s # %s\n",
1886 "PUSH_RETURN_ADDRESS(pc, sp)",
1887 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1889 fprintf_unfiltered (file,
1890 "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1891 (long) current_gdbarch->push_return_address
1892 /*PUSH_RETURN_ADDRESS ()*/);
1894 #ifdef REGISTER_BYTE
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: %s # %s\n",
1897 "REGISTER_BYTE(reg_nr)",
1898 XSTRING (REGISTER_BYTE (reg_nr)));
1900 fprintf_unfiltered (file,
1901 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1902 (long) current_gdbarch->register_byte
1903 /*REGISTER_BYTE ()*/);
1905 #ifdef REGISTER_BYTES
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: REGISTER_BYTES # %s\n",
1908 XSTRING (REGISTER_BYTES));
1909 fprintf_unfiltered (file,
1910 "gdbarch_dump: REGISTER_BYTES = %d\n",
1913 #ifdef REGISTER_BYTES_OK_P
1914 fprintf_unfiltered (file,
1915 "gdbarch_dump: %s # %s\n",
1916 "REGISTER_BYTES_OK_P()",
1917 XSTRING (REGISTER_BYTES_OK_P ()));
1918 fprintf_unfiltered (file,
1919 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1920 REGISTER_BYTES_OK_P ());
1922 #ifdef REGISTER_BYTES_OK
1923 fprintf_unfiltered (file,
1924 "gdbarch_dump: %s # %s\n",
1925 "REGISTER_BYTES_OK(nr_bytes)",
1926 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1928 fprintf_unfiltered (file,
1929 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1930 (long) current_gdbarch->register_bytes_ok
1931 /*REGISTER_BYTES_OK ()*/);
1933 #ifdef REGISTER_CONVERTIBLE
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: %s # %s\n",
1936 "REGISTER_CONVERTIBLE(nr)",
1937 XSTRING (REGISTER_CONVERTIBLE (nr)));
1939 fprintf_unfiltered (file,
1940 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1941 (long) current_gdbarch->register_convertible
1942 /*REGISTER_CONVERTIBLE ()*/);
1944 #ifdef REGISTER_CONVERT_TO_RAW
1946 /* Macro might contain `[{}]' when not multi-arch */
1947 fprintf_unfiltered (file,
1948 "gdbarch_dump: %s # %s\n",
1949 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1950 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1955 (long) current_gdbarch->register_convert_to_raw
1956 /*REGISTER_CONVERT_TO_RAW ()*/);
1958 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1960 /* Macro might contain `[{}]' when not multi-arch */
1961 fprintf_unfiltered (file,
1962 "gdbarch_dump: %s # %s\n",
1963 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1964 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1967 fprintf_unfiltered (file,
1968 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1969 (long) current_gdbarch->register_convert_to_virtual
1970 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1972 #ifdef REGISTER_NAME
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: %s # %s\n",
1975 "REGISTER_NAME(regnr)",
1976 XSTRING (REGISTER_NAME (regnr)));
1978 fprintf_unfiltered (file,
1979 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1980 (long) current_gdbarch->register_name
1981 /*REGISTER_NAME ()*/);
1983 #ifdef REGISTER_RAW_SIZE
1984 fprintf_unfiltered (file,
1985 "gdbarch_dump: %s # %s\n",
1986 "REGISTER_RAW_SIZE(reg_nr)",
1987 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
1991 (long) current_gdbarch->register_raw_size
1992 /*REGISTER_RAW_SIZE ()*/);
1994 #ifdef REGISTER_SIM_REGNO
1995 fprintf_unfiltered (file,
1996 "gdbarch_dump: %s # %s\n",
1997 "REGISTER_SIM_REGNO(reg_nr)",
1998 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2000 fprintf_unfiltered (file,
2001 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2002 (long) current_gdbarch->register_sim_regno
2003 /*REGISTER_SIM_REGNO ()*/);
2005 #ifdef REGISTER_SIZE
2006 fprintf_unfiltered (file,
2007 "gdbarch_dump: REGISTER_SIZE # %s\n",
2008 XSTRING (REGISTER_SIZE));
2009 fprintf_unfiltered (file,
2010 "gdbarch_dump: REGISTER_SIZE = %d\n",
2013 #ifdef REGISTER_TO_VALUE
2015 /* Macro might contain `[{}]' when not multi-arch */
2016 fprintf_unfiltered (file,
2017 "gdbarch_dump: %s # %s\n",
2018 "REGISTER_TO_VALUE(regnum, type, from, to)",
2019 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2022 fprintf_unfiltered (file,
2023 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2024 (long) current_gdbarch->register_to_value
2025 /*REGISTER_TO_VALUE ()*/);
2027 #ifdef REGISTER_VIRTUAL_SIZE
2028 fprintf_unfiltered (file,
2029 "gdbarch_dump: %s # %s\n",
2030 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2031 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2033 fprintf_unfiltered (file,
2034 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2035 (long) current_gdbarch->register_virtual_size
2036 /*REGISTER_VIRTUAL_SIZE ()*/);
2038 #ifdef REGISTER_VIRTUAL_TYPE
2039 fprintf_unfiltered (file,
2040 "gdbarch_dump: %s # %s\n",
2041 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2042 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2044 fprintf_unfiltered (file,
2045 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2046 (long) current_gdbarch->register_virtual_type
2047 /*REGISTER_VIRTUAL_TYPE ()*/);
2049 #ifdef REG_STRUCT_HAS_ADDR_P
2050 fprintf_unfiltered (file,
2051 "gdbarch_dump: %s # %s\n",
2052 "REG_STRUCT_HAS_ADDR_P()",
2053 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2054 fprintf_unfiltered (file,
2055 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2056 REG_STRUCT_HAS_ADDR_P ());
2058 #ifdef REG_STRUCT_HAS_ADDR
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: %s # %s\n",
2061 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2062 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2064 fprintf_unfiltered (file,
2065 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2066 (long) current_gdbarch->reg_struct_has_addr
2067 /*REG_STRUCT_HAS_ADDR ()*/);
2069 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2071 /* Macro might contain `[{}]' when not multi-arch */
2072 fprintf_unfiltered (file,
2073 "gdbarch_dump: %s # %s\n",
2074 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2075 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2078 fprintf_unfiltered (file,
2079 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2080 (long) current_gdbarch->remote_translate_xfer_address
2081 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2083 #ifdef RETURN_VALUE_ON_STACK
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: %s # %s\n",
2086 "RETURN_VALUE_ON_STACK(type)",
2087 XSTRING (RETURN_VALUE_ON_STACK (type)));
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2091 (long) current_gdbarch->return_value_on_stack
2092 /*RETURN_VALUE_ON_STACK ()*/);
2094 #ifdef SAVED_PC_AFTER_CALL
2095 fprintf_unfiltered (file,
2096 "gdbarch_dump: %s # %s\n",
2097 "SAVED_PC_AFTER_CALL(frame)",
2098 XSTRING (SAVED_PC_AFTER_CALL (frame)));
2100 fprintf_unfiltered (file,
2101 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2102 (long) current_gdbarch->saved_pc_after_call
2103 /*SAVED_PC_AFTER_CALL ()*/);
2105 #ifdef SAVE_DUMMY_FRAME_TOS_P
2106 fprintf_unfiltered (file,
2107 "gdbarch_dump: %s # %s\n",
2108 "SAVE_DUMMY_FRAME_TOS_P()",
2109 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2110 fprintf_unfiltered (file,
2111 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2112 SAVE_DUMMY_FRAME_TOS_P ());
2114 #ifdef SAVE_DUMMY_FRAME_TOS
2116 /* Macro might contain `[{}]' when not multi-arch */
2117 fprintf_unfiltered (file,
2118 "gdbarch_dump: %s # %s\n",
2119 "SAVE_DUMMY_FRAME_TOS(sp)",
2120 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2123 fprintf_unfiltered (file,
2124 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2125 (long) current_gdbarch->save_dummy_frame_tos
2126 /*SAVE_DUMMY_FRAME_TOS ()*/);
2128 #ifdef SDB_REG_TO_REGNUM
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: %s # %s\n",
2131 "SDB_REG_TO_REGNUM(sdb_regnr)",
2132 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2134 fprintf_unfiltered (file,
2135 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2136 (long) current_gdbarch->sdb_reg_to_regnum
2137 /*SDB_REG_TO_REGNUM ()*/);
2139 #ifdef SIGTRAMP_END_P
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: %s # %s\n",
2143 XSTRING (SIGTRAMP_END_P ()));
2144 fprintf_unfiltered (file,
2145 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2149 fprintf_unfiltered (file,
2150 "gdbarch_dump: %s # %s\n",
2152 XSTRING (SIGTRAMP_END (pc)));
2154 fprintf_unfiltered (file,
2155 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2156 (long) current_gdbarch->sigtramp_end
2157 /*SIGTRAMP_END ()*/);
2159 #ifdef SIGTRAMP_START_P
2160 fprintf_unfiltered (file,
2161 "gdbarch_dump: %s # %s\n",
2162 "SIGTRAMP_START_P()",
2163 XSTRING (SIGTRAMP_START_P ()));
2164 fprintf_unfiltered (file,
2165 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2166 SIGTRAMP_START_P ());
2168 #ifdef SIGTRAMP_START
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: %s # %s\n",
2171 "SIGTRAMP_START(pc)",
2172 XSTRING (SIGTRAMP_START (pc)));
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2176 (long) current_gdbarch->sigtramp_start
2177 /*SIGTRAMP_START ()*/);
2179 #ifdef SIZEOF_CALL_DUMMY_WORDS
2180 fprintf_unfiltered (file,
2181 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2182 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
2183 fprintf_unfiltered (file,
2184 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
2185 (long) SIZEOF_CALL_DUMMY_WORDS);
2187 #ifdef SKIP_PROLOGUE
2188 fprintf_unfiltered (file,
2189 "gdbarch_dump: %s # %s\n",
2190 "SKIP_PROLOGUE(ip)",
2191 XSTRING (SKIP_PROLOGUE (ip)));
2193 fprintf_unfiltered (file,
2194 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2195 (long) current_gdbarch->skip_prologue
2196 /*SKIP_PROLOGUE ()*/);
2198 #ifdef SKIP_TRAMPOLINE_CODE
2199 fprintf_unfiltered (file,
2200 "gdbarch_dump: %s # %s\n",
2201 "SKIP_TRAMPOLINE_CODE(pc)",
2202 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2204 fprintf_unfiltered (file,
2205 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2206 (long) current_gdbarch->skip_trampoline_code
2207 /*SKIP_TRAMPOLINE_CODE ()*/);
2209 #ifdef SMASH_TEXT_ADDRESS
2210 fprintf_unfiltered (file,
2211 "gdbarch_dump: %s # %s\n",
2212 "SMASH_TEXT_ADDRESS(addr)",
2213 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2215 fprintf_unfiltered (file,
2216 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2217 (long) current_gdbarch->smash_text_address
2218 /*SMASH_TEXT_ADDRESS ()*/);
2220 #ifdef SOFTWARE_SINGLE_STEP_P
2221 fprintf_unfiltered (file,
2222 "gdbarch_dump: %s # %s\n",
2223 "SOFTWARE_SINGLE_STEP_P()",
2224 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2225 fprintf_unfiltered (file,
2226 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2227 SOFTWARE_SINGLE_STEP_P ());
2229 #ifdef SOFTWARE_SINGLE_STEP
2231 /* Macro might contain `[{}]' when not multi-arch */
2232 fprintf_unfiltered (file,
2233 "gdbarch_dump: %s # %s\n",
2234 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2235 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2238 fprintf_unfiltered (file,
2239 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2240 (long) current_gdbarch->software_single_step
2241 /*SOFTWARE_SINGLE_STEP ()*/);
2244 fprintf_unfiltered (file,
2245 "gdbarch_dump: SP_REGNUM # %s\n",
2246 XSTRING (SP_REGNUM));
2247 fprintf_unfiltered (file,
2248 "gdbarch_dump: SP_REGNUM = %d\n",
2251 #ifdef STAB_REG_TO_REGNUM
2252 fprintf_unfiltered (file,
2253 "gdbarch_dump: %s # %s\n",
2254 "STAB_REG_TO_REGNUM(stab_regnr)",
2255 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2257 fprintf_unfiltered (file,
2258 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2259 (long) current_gdbarch->stab_reg_to_regnum
2260 /*STAB_REG_TO_REGNUM ()*/);
2262 #ifdef STACK_ALIGN_P
2263 fprintf_unfiltered (file,
2264 "gdbarch_dump: %s # %s\n",
2266 XSTRING (STACK_ALIGN_P ()));
2267 fprintf_unfiltered (file,
2268 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2272 fprintf_unfiltered (file,
2273 "gdbarch_dump: %s # %s\n",
2275 XSTRING (STACK_ALIGN (sp)));
2277 fprintf_unfiltered (file,
2278 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2279 (long) current_gdbarch->stack_align
2280 /*STACK_ALIGN ()*/);
2282 #ifdef STORE_RETURN_VALUE
2284 /* Macro might contain `[{}]' when not multi-arch */
2285 fprintf_unfiltered (file,
2286 "gdbarch_dump: %s # %s\n",
2287 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2288 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2291 fprintf_unfiltered (file,
2292 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2293 (long) current_gdbarch->store_return_value
2294 /*STORE_RETURN_VALUE ()*/);
2296 #ifdef STORE_STRUCT_RETURN
2298 /* Macro might contain `[{}]' when not multi-arch */
2299 fprintf_unfiltered (file,
2300 "gdbarch_dump: %s # %s\n",
2301 "STORE_STRUCT_RETURN(addr, sp)",
2302 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
2305 fprintf_unfiltered (file,
2306 "gdbarch_dump: STORE_STRUCT_RETURN = <0x%08lx>\n",
2307 (long) current_gdbarch->store_struct_return
2308 /*STORE_STRUCT_RETURN ()*/);
2310 #ifdef TARGET_ADDR_BIT
2311 fprintf_unfiltered (file,
2312 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2313 XSTRING (TARGET_ADDR_BIT));
2314 fprintf_unfiltered (file,
2315 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2318 #ifdef TARGET_ARCHITECTURE
2319 fprintf_unfiltered (file,
2320 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2321 XSTRING (TARGET_ARCHITECTURE));
2322 if (TARGET_ARCHITECTURE != NULL)
2323 fprintf_unfiltered (file,
2324 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2325 TARGET_ARCHITECTURE->printable_name);
2327 #ifdef TARGET_BFD_VMA_BIT
2328 fprintf_unfiltered (file,
2329 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2330 XSTRING (TARGET_BFD_VMA_BIT));
2331 fprintf_unfiltered (file,
2332 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2333 TARGET_BFD_VMA_BIT);
2335 #ifdef TARGET_BYTE_ORDER
2336 fprintf_unfiltered (file,
2337 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2338 XSTRING (TARGET_BYTE_ORDER));
2339 fprintf_unfiltered (file,
2340 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2341 (long) TARGET_BYTE_ORDER);
2343 #ifdef TARGET_CHAR_SIGNED
2344 fprintf_unfiltered (file,
2345 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2346 XSTRING (TARGET_CHAR_SIGNED));
2347 fprintf_unfiltered (file,
2348 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2349 TARGET_CHAR_SIGNED);
2351 #ifdef TARGET_DOUBLE_BIT
2352 fprintf_unfiltered (file,
2353 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2354 XSTRING (TARGET_DOUBLE_BIT));
2355 fprintf_unfiltered (file,
2356 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2359 #ifdef TARGET_DOUBLE_FORMAT
2360 fprintf_unfiltered (file,
2361 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2362 XSTRING (TARGET_DOUBLE_FORMAT));
2363 fprintf_unfiltered (file,
2364 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2365 (TARGET_DOUBLE_FORMAT)->name);
2367 #ifdef TARGET_FLOAT_BIT
2368 fprintf_unfiltered (file,
2369 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2370 XSTRING (TARGET_FLOAT_BIT));
2371 fprintf_unfiltered (file,
2372 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2375 #ifdef TARGET_FLOAT_FORMAT
2376 fprintf_unfiltered (file,
2377 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2378 XSTRING (TARGET_FLOAT_FORMAT));
2379 fprintf_unfiltered (file,
2380 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2381 (TARGET_FLOAT_FORMAT)->name);
2383 #ifdef TARGET_INT_BIT
2384 fprintf_unfiltered (file,
2385 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2386 XSTRING (TARGET_INT_BIT));
2387 fprintf_unfiltered (file,
2388 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2391 #ifdef TARGET_LONG_BIT
2392 fprintf_unfiltered (file,
2393 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2394 XSTRING (TARGET_LONG_BIT));
2395 fprintf_unfiltered (file,
2396 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2399 #ifdef TARGET_LONG_DOUBLE_BIT
2400 fprintf_unfiltered (file,
2401 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2402 XSTRING (TARGET_LONG_DOUBLE_BIT));
2403 fprintf_unfiltered (file,
2404 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2405 TARGET_LONG_DOUBLE_BIT);
2407 #ifdef TARGET_LONG_DOUBLE_FORMAT
2408 fprintf_unfiltered (file,
2409 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2410 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2411 fprintf_unfiltered (file,
2412 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2413 (TARGET_LONG_DOUBLE_FORMAT)->name);
2415 #ifdef TARGET_LONG_LONG_BIT
2416 fprintf_unfiltered (file,
2417 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2418 XSTRING (TARGET_LONG_LONG_BIT));
2419 fprintf_unfiltered (file,
2420 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2421 TARGET_LONG_LONG_BIT);
2424 fprintf_unfiltered (file,
2425 "gdbarch_dump: TARGET_OSABI # %s\n",
2426 XSTRING (TARGET_OSABI));
2427 fprintf_unfiltered (file,
2428 "gdbarch_dump: TARGET_OSABI = %ld\n",
2429 (long) TARGET_OSABI);
2431 #ifdef TARGET_PRINT_INSN
2432 fprintf_unfiltered (file,
2433 "gdbarch_dump: %s # %s\n",
2434 "TARGET_PRINT_INSN(vma, info)",
2435 XSTRING (TARGET_PRINT_INSN (vma, info)));
2437 fprintf_unfiltered (file,
2438 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2439 (long) current_gdbarch->print_insn
2440 /*TARGET_PRINT_INSN ()*/);
2442 #ifdef TARGET_PTR_BIT
2443 fprintf_unfiltered (file,
2444 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2445 XSTRING (TARGET_PTR_BIT));
2446 fprintf_unfiltered (file,
2447 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2450 #ifdef TARGET_READ_FP
2451 fprintf_unfiltered (file,
2452 "gdbarch_dump: %s # %s\n",
2454 XSTRING (TARGET_READ_FP ()));
2456 fprintf_unfiltered (file,
2457 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2458 (long) current_gdbarch->read_fp
2459 /*TARGET_READ_FP ()*/);
2461 #ifdef TARGET_READ_PC
2462 fprintf_unfiltered (file,
2463 "gdbarch_dump: %s # %s\n",
2464 "TARGET_READ_PC(ptid)",
2465 XSTRING (TARGET_READ_PC (ptid)));
2467 fprintf_unfiltered (file,
2468 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2469 (long) current_gdbarch->read_pc
2470 /*TARGET_READ_PC ()*/);
2472 #ifdef TARGET_READ_SP
2473 fprintf_unfiltered (file,
2474 "gdbarch_dump: %s # %s\n",
2476 XSTRING (TARGET_READ_SP ()));
2478 fprintf_unfiltered (file,
2479 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2480 (long) current_gdbarch->read_sp
2481 /*TARGET_READ_SP ()*/);
2483 #ifdef TARGET_SHORT_BIT
2484 fprintf_unfiltered (file,
2485 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2486 XSTRING (TARGET_SHORT_BIT));
2487 fprintf_unfiltered (file,
2488 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2491 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2493 /* Macro might contain `[{}]' when not multi-arch */
2494 fprintf_unfiltered (file,
2495 "gdbarch_dump: %s # %s\n",
2496 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2497 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2500 fprintf_unfiltered (file,
2501 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2502 (long) current_gdbarch->virtual_frame_pointer
2503 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2505 #ifdef TARGET_WRITE_PC
2507 /* Macro might contain `[{}]' when not multi-arch */
2508 fprintf_unfiltered (file,
2509 "gdbarch_dump: %s # %s\n",
2510 "TARGET_WRITE_PC(val, ptid)",
2511 XSTRING (TARGET_WRITE_PC (val, ptid)));
2514 fprintf_unfiltered (file,
2515 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2516 (long) current_gdbarch->write_pc
2517 /*TARGET_WRITE_PC ()*/);
2519 #ifdef TARGET_WRITE_SP
2521 /* Macro might contain `[{}]' when not multi-arch */
2522 fprintf_unfiltered (file,
2523 "gdbarch_dump: %s # %s\n",
2524 "TARGET_WRITE_SP(val)",
2525 XSTRING (TARGET_WRITE_SP (val)));
2528 fprintf_unfiltered (file,
2529 "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
2530 (long) current_gdbarch->write_sp
2531 /*TARGET_WRITE_SP ()*/);
2533 #ifdef USE_STRUCT_CONVENTION
2534 fprintf_unfiltered (file,
2535 "gdbarch_dump: %s # %s\n",
2536 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2537 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2539 fprintf_unfiltered (file,
2540 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2541 (long) current_gdbarch->use_struct_convention
2542 /*USE_STRUCT_CONVENTION ()*/);
2544 #ifdef VALUE_TO_REGISTER
2546 /* Macro might contain `[{}]' when not multi-arch */
2547 fprintf_unfiltered (file,
2548 "gdbarch_dump: %s # %s\n",
2549 "VALUE_TO_REGISTER(type, regnum, from, to)",
2550 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2553 fprintf_unfiltered (file,
2554 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2555 (long) current_gdbarch->value_to_register
2556 /*VALUE_TO_REGISTER ()*/);
2558 if (current_gdbarch->dump_tdep != NULL)
2559 current_gdbarch->dump_tdep (current_gdbarch, file);
2562 struct gdbarch_tdep *
2563 gdbarch_tdep (struct gdbarch *gdbarch)
2565 if (gdbarch_debug >= 2)
2566 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2567 return gdbarch->tdep;
2571 const struct bfd_arch_info *
2572 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2574 gdb_assert (gdbarch != NULL);
2575 if (gdbarch_debug >= 2)
2576 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2577 return gdbarch->bfd_arch_info;
2581 gdbarch_byte_order (struct gdbarch *gdbarch)
2583 gdb_assert (gdbarch != NULL);
2584 if (gdbarch_debug >= 2)
2585 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2586 return gdbarch->byte_order;
2590 gdbarch_osabi (struct gdbarch *gdbarch)
2592 gdb_assert (gdbarch != NULL);
2593 if (gdbarch_debug >= 2)
2594 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2595 return gdbarch->osabi;
2599 gdbarch_short_bit (struct gdbarch *gdbarch)
2601 gdb_assert (gdbarch != NULL);
2602 /* Skip verify of short_bit, invalid_p == 0 */
2603 if (gdbarch_debug >= 2)
2604 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2605 return gdbarch->short_bit;
2609 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2612 gdbarch->short_bit = short_bit;
2616 gdbarch_int_bit (struct gdbarch *gdbarch)
2618 gdb_assert (gdbarch != NULL);
2619 /* Skip verify of int_bit, invalid_p == 0 */
2620 if (gdbarch_debug >= 2)
2621 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2622 return gdbarch->int_bit;
2626 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2629 gdbarch->int_bit = int_bit;
2633 gdbarch_long_bit (struct gdbarch *gdbarch)
2635 gdb_assert (gdbarch != NULL);
2636 /* Skip verify of long_bit, invalid_p == 0 */
2637 if (gdbarch_debug >= 2)
2638 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2639 return gdbarch->long_bit;
2643 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2646 gdbarch->long_bit = long_bit;
2650 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2652 gdb_assert (gdbarch != NULL);
2653 /* Skip verify of long_long_bit, invalid_p == 0 */
2654 if (gdbarch_debug >= 2)
2655 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2656 return gdbarch->long_long_bit;
2660 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2663 gdbarch->long_long_bit = long_long_bit;
2667 gdbarch_float_bit (struct gdbarch *gdbarch)
2669 gdb_assert (gdbarch != NULL);
2670 /* Skip verify of float_bit, invalid_p == 0 */
2671 if (gdbarch_debug >= 2)
2672 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2673 return gdbarch->float_bit;
2677 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2680 gdbarch->float_bit = float_bit;
2684 gdbarch_double_bit (struct gdbarch *gdbarch)
2686 gdb_assert (gdbarch != NULL);
2687 /* Skip verify of double_bit, invalid_p == 0 */
2688 if (gdbarch_debug >= 2)
2689 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2690 return gdbarch->double_bit;
2694 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2697 gdbarch->double_bit = double_bit;
2701 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2703 gdb_assert (gdbarch != NULL);
2704 /* Skip verify of long_double_bit, invalid_p == 0 */
2705 if (gdbarch_debug >= 2)
2706 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2707 return gdbarch->long_double_bit;
2711 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2712 int long_double_bit)
2714 gdbarch->long_double_bit = long_double_bit;
2718 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2720 gdb_assert (gdbarch != NULL);
2721 /* Skip verify of ptr_bit, invalid_p == 0 */
2722 if (gdbarch_debug >= 2)
2723 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2724 return gdbarch->ptr_bit;
2728 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2731 gdbarch->ptr_bit = ptr_bit;
2735 gdbarch_addr_bit (struct gdbarch *gdbarch)
2737 gdb_assert (gdbarch != NULL);
2738 if (gdbarch->addr_bit == 0)
2739 internal_error (__FILE__, __LINE__,
2740 "gdbarch: gdbarch_addr_bit invalid");
2741 if (gdbarch_debug >= 2)
2742 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2743 return gdbarch->addr_bit;
2747 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2750 gdbarch->addr_bit = addr_bit;
2754 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2756 gdb_assert (gdbarch != NULL);
2757 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2758 if (gdbarch_debug >= 2)
2759 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2760 return gdbarch->bfd_vma_bit;
2764 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2767 gdbarch->bfd_vma_bit = bfd_vma_bit;
2771 gdbarch_char_signed (struct gdbarch *gdbarch)
2773 gdb_assert (gdbarch != NULL);
2774 if (gdbarch->char_signed == -1)
2775 internal_error (__FILE__, __LINE__,
2776 "gdbarch: gdbarch_char_signed invalid");
2777 if (gdbarch_debug >= 2)
2778 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2779 return gdbarch->char_signed;
2783 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2786 gdbarch->char_signed = char_signed;
2790 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2792 gdb_assert (gdbarch != NULL);
2793 if (gdbarch->read_pc == 0)
2794 internal_error (__FILE__, __LINE__,
2795 "gdbarch: gdbarch_read_pc invalid");
2796 if (gdbarch_debug >= 2)
2797 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2798 return gdbarch->read_pc (ptid);
2802 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2803 gdbarch_read_pc_ftype read_pc)
2805 gdbarch->read_pc = read_pc;
2809 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2811 gdb_assert (gdbarch != NULL);
2812 if (gdbarch->write_pc == 0)
2813 internal_error (__FILE__, __LINE__,
2814 "gdbarch: gdbarch_write_pc invalid");
2815 if (gdbarch_debug >= 2)
2816 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2817 gdbarch->write_pc (val, ptid);
2821 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2822 gdbarch_write_pc_ftype write_pc)
2824 gdbarch->write_pc = write_pc;
2828 gdbarch_read_fp (struct gdbarch *gdbarch)
2830 gdb_assert (gdbarch != NULL);
2831 if (gdbarch->read_fp == 0)
2832 internal_error (__FILE__, __LINE__,
2833 "gdbarch: gdbarch_read_fp invalid");
2834 if (gdbarch_debug >= 2)
2835 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2836 return gdbarch->read_fp ();
2840 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2841 gdbarch_read_fp_ftype read_fp)
2843 gdbarch->read_fp = read_fp;
2847 gdbarch_read_sp (struct gdbarch *gdbarch)
2849 gdb_assert (gdbarch != NULL);
2850 if (gdbarch->read_sp == 0)
2851 internal_error (__FILE__, __LINE__,
2852 "gdbarch: gdbarch_read_sp invalid");
2853 if (gdbarch_debug >= 2)
2854 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2855 return gdbarch->read_sp ();
2859 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2860 gdbarch_read_sp_ftype read_sp)
2862 gdbarch->read_sp = read_sp;
2866 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2868 gdb_assert (gdbarch != NULL);
2869 if (gdbarch->write_sp == 0)
2870 internal_error (__FILE__, __LINE__,
2871 "gdbarch: gdbarch_write_sp invalid");
2872 if (gdbarch_debug >= 2)
2873 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2874 gdbarch->write_sp (val);
2878 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2879 gdbarch_write_sp_ftype write_sp)
2881 gdbarch->write_sp = write_sp;
2885 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2887 gdb_assert (gdbarch != NULL);
2888 if (gdbarch->virtual_frame_pointer == 0)
2889 internal_error (__FILE__, __LINE__,
2890 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2891 if (gdbarch_debug >= 2)
2892 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2893 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2897 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2898 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2900 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2904 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2906 gdb_assert (gdbarch != NULL);
2907 return gdbarch->pseudo_register_read != 0;
2911 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2913 gdb_assert (gdbarch != NULL);
2914 if (gdbarch->pseudo_register_read == 0)
2915 internal_error (__FILE__, __LINE__,
2916 "gdbarch: gdbarch_pseudo_register_read invalid");
2917 if (gdbarch_debug >= 2)
2918 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2919 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2923 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2924 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2926 gdbarch->pseudo_register_read = pseudo_register_read;
2930 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2932 gdb_assert (gdbarch != NULL);
2933 return gdbarch->pseudo_register_write != 0;
2937 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2939 gdb_assert (gdbarch != NULL);
2940 if (gdbarch->pseudo_register_write == 0)
2941 internal_error (__FILE__, __LINE__,
2942 "gdbarch: gdbarch_pseudo_register_write invalid");
2943 if (gdbarch_debug >= 2)
2944 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2945 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2949 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2950 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2952 gdbarch->pseudo_register_write = pseudo_register_write;
2956 gdbarch_num_regs (struct gdbarch *gdbarch)
2958 gdb_assert (gdbarch != NULL);
2959 if (gdbarch->num_regs == -1)
2960 internal_error (__FILE__, __LINE__,
2961 "gdbarch: gdbarch_num_regs invalid");
2962 if (gdbarch_debug >= 2)
2963 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2964 return gdbarch->num_regs;
2968 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2971 gdbarch->num_regs = num_regs;
2975 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2977 gdb_assert (gdbarch != NULL);
2978 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2979 if (gdbarch_debug >= 2)
2980 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2981 return gdbarch->num_pseudo_regs;
2985 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2986 int num_pseudo_regs)
2988 gdbarch->num_pseudo_regs = num_pseudo_regs;
2992 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2994 gdb_assert (gdbarch != NULL);
2995 /* Skip verify of sp_regnum, invalid_p == 0 */
2996 if (gdbarch_debug >= 2)
2997 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2998 return gdbarch->sp_regnum;
3002 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3005 gdbarch->sp_regnum = sp_regnum;
3009 gdbarch_fp_regnum (struct gdbarch *gdbarch)
3011 gdb_assert (gdbarch != NULL);
3012 /* Skip verify of fp_regnum, invalid_p == 0 */
3013 if (gdbarch_debug >= 2)
3014 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
3015 return gdbarch->fp_regnum;
3019 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
3022 gdbarch->fp_regnum = fp_regnum;
3026 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3028 gdb_assert (gdbarch != NULL);
3029 /* Skip verify of pc_regnum, invalid_p == 0 */
3030 if (gdbarch_debug >= 2)
3031 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3032 return gdbarch->pc_regnum;
3036 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3039 gdbarch->pc_regnum = pc_regnum;
3043 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3045 gdb_assert (gdbarch != NULL);
3046 /* Skip verify of ps_regnum, invalid_p == 0 */
3047 if (gdbarch_debug >= 2)
3048 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3049 return gdbarch->ps_regnum;
3053 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3056 gdbarch->ps_regnum = ps_regnum;
3060 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3062 gdb_assert (gdbarch != NULL);
3063 /* Skip verify of fp0_regnum, invalid_p == 0 */
3064 if (gdbarch_debug >= 2)
3065 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3066 return gdbarch->fp0_regnum;
3070 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3073 gdbarch->fp0_regnum = fp0_regnum;
3077 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3079 gdb_assert (gdbarch != NULL);
3080 /* Skip verify of npc_regnum, invalid_p == 0 */
3081 if (gdbarch_debug >= 2)
3082 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3083 return gdbarch->npc_regnum;
3087 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3090 gdbarch->npc_regnum = npc_regnum;
3094 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3096 gdb_assert (gdbarch != NULL);
3097 if (gdbarch->stab_reg_to_regnum == 0)
3098 internal_error (__FILE__, __LINE__,
3099 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3102 return gdbarch->stab_reg_to_regnum (stab_regnr);
3106 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3107 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3109 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3113 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3115 gdb_assert (gdbarch != NULL);
3116 if (gdbarch->ecoff_reg_to_regnum == 0)
3117 internal_error (__FILE__, __LINE__,
3118 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3119 if (gdbarch_debug >= 2)
3120 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3121 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3125 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3126 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3128 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3132 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3134 gdb_assert (gdbarch != NULL);
3135 if (gdbarch->dwarf_reg_to_regnum == 0)
3136 internal_error (__FILE__, __LINE__,
3137 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3138 if (gdbarch_debug >= 2)
3139 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3140 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3144 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3145 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3147 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3151 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3153 gdb_assert (gdbarch != NULL);
3154 if (gdbarch->sdb_reg_to_regnum == 0)
3155 internal_error (__FILE__, __LINE__,
3156 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3157 if (gdbarch_debug >= 2)
3158 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3159 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3163 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3164 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3166 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3170 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3172 gdb_assert (gdbarch != NULL);
3173 if (gdbarch->dwarf2_reg_to_regnum == 0)
3174 internal_error (__FILE__, __LINE__,
3175 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3176 if (gdbarch_debug >= 2)
3177 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3178 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3182 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3183 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3185 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3189 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3191 gdb_assert (gdbarch != NULL);
3192 if (gdbarch->register_name == 0)
3193 internal_error (__FILE__, __LINE__,
3194 "gdbarch: gdbarch_register_name invalid");
3195 if (gdbarch_debug >= 2)
3196 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3197 return gdbarch->register_name (regnr);
3201 set_gdbarch_register_name (struct gdbarch *gdbarch,
3202 gdbarch_register_name_ftype register_name)
3204 gdbarch->register_name = register_name;
3208 gdbarch_register_size (struct gdbarch *gdbarch)
3210 gdb_assert (gdbarch != NULL);
3211 if (gdbarch->register_size == -1)
3212 internal_error (__FILE__, __LINE__,
3213 "gdbarch: gdbarch_register_size invalid");
3214 if (gdbarch_debug >= 2)
3215 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
3216 return gdbarch->register_size;
3220 set_gdbarch_register_size (struct gdbarch *gdbarch,
3223 gdbarch->register_size = register_size;
3227 gdbarch_register_bytes (struct gdbarch *gdbarch)
3229 gdb_assert (gdbarch != NULL);
3230 if (gdbarch->register_bytes == -1)
3231 internal_error (__FILE__, __LINE__,
3232 "gdbarch: gdbarch_register_bytes invalid");
3233 if (gdbarch_debug >= 2)
3234 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3235 return gdbarch->register_bytes;
3239 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3242 gdbarch->register_bytes = register_bytes;
3246 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3248 gdb_assert (gdbarch != NULL);
3249 if (gdbarch->register_byte == 0)
3250 internal_error (__FILE__, __LINE__,
3251 "gdbarch: gdbarch_register_byte invalid");
3252 if (gdbarch_debug >= 2)
3253 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3254 return gdbarch->register_byte (reg_nr);
3258 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3259 gdbarch_register_byte_ftype register_byte)
3261 gdbarch->register_byte = register_byte;
3265 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3267 gdb_assert (gdbarch != NULL);
3268 if (gdbarch->register_raw_size == 0)
3269 internal_error (__FILE__, __LINE__,
3270 "gdbarch: gdbarch_register_raw_size invalid");
3271 if (gdbarch_debug >= 2)
3272 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3273 return gdbarch->register_raw_size (reg_nr);
3277 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3278 gdbarch_register_raw_size_ftype register_raw_size)
3280 gdbarch->register_raw_size = register_raw_size;
3284 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
3286 gdb_assert (gdbarch != NULL);
3287 if (gdbarch->max_register_raw_size == -1)
3288 internal_error (__FILE__, __LINE__,
3289 "gdbarch: gdbarch_max_register_raw_size invalid");
3290 if (gdbarch_debug >= 2)
3291 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
3292 return gdbarch->max_register_raw_size;
3296 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
3297 int max_register_raw_size)
3299 gdbarch->max_register_raw_size = max_register_raw_size;
3303 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3305 gdb_assert (gdbarch != NULL);
3306 if (gdbarch->register_virtual_size == 0)
3307 internal_error (__FILE__, __LINE__,
3308 "gdbarch: gdbarch_register_virtual_size invalid");
3309 if (gdbarch_debug >= 2)
3310 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3311 return gdbarch->register_virtual_size (reg_nr);
3315 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3316 gdbarch_register_virtual_size_ftype register_virtual_size)
3318 gdbarch->register_virtual_size = register_virtual_size;
3322 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
3324 gdb_assert (gdbarch != NULL);
3325 if (gdbarch->max_register_virtual_size == -1)
3326 internal_error (__FILE__, __LINE__,
3327 "gdbarch: gdbarch_max_register_virtual_size invalid");
3328 if (gdbarch_debug >= 2)
3329 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
3330 return gdbarch->max_register_virtual_size;
3334 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
3335 int max_register_virtual_size)
3337 gdbarch->max_register_virtual_size = max_register_virtual_size;
3341 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3343 gdb_assert (gdbarch != NULL);
3344 if (gdbarch->register_virtual_type == 0)
3345 internal_error (__FILE__, __LINE__,
3346 "gdbarch: gdbarch_register_virtual_type invalid");
3347 if (gdbarch_debug >= 2)
3348 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3349 return gdbarch->register_virtual_type (reg_nr);
3353 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3354 gdbarch_register_virtual_type_ftype register_virtual_type)
3356 gdbarch->register_virtual_type = register_virtual_type;
3360 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3362 gdb_assert (gdbarch != NULL);
3363 return gdbarch->deprecated_do_registers_info != 0;
3367 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3369 gdb_assert (gdbarch != NULL);
3370 if (gdbarch->deprecated_do_registers_info == 0)
3371 internal_error (__FILE__, __LINE__,
3372 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3373 if (gdbarch_debug >= 2)
3374 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3375 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3379 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3380 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3382 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3386 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3388 gdb_assert (gdbarch != NULL);
3389 if (gdbarch->print_registers_info == 0)
3390 internal_error (__FILE__, __LINE__,
3391 "gdbarch: gdbarch_print_registers_info invalid");
3392 if (gdbarch_debug >= 2)
3393 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3394 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3398 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3399 gdbarch_print_registers_info_ftype print_registers_info)
3401 gdbarch->print_registers_info = print_registers_info;
3405 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3407 gdb_assert (gdbarch != NULL);
3408 return gdbarch->print_float_info != 0;
3412 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3414 gdb_assert (gdbarch != NULL);
3415 if (gdbarch->print_float_info == 0)
3416 internal_error (__FILE__, __LINE__,
3417 "gdbarch: gdbarch_print_float_info invalid");
3418 if (gdbarch_debug >= 2)
3419 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3420 gdbarch->print_float_info (gdbarch, file, frame, args);
3424 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3425 gdbarch_print_float_info_ftype print_float_info)
3427 gdbarch->print_float_info = print_float_info;
3431 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3433 gdb_assert (gdbarch != NULL);
3434 return gdbarch->print_vector_info != 0;
3438 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3440 gdb_assert (gdbarch != NULL);
3441 if (gdbarch->print_vector_info == 0)
3442 internal_error (__FILE__, __LINE__,
3443 "gdbarch: gdbarch_print_vector_info invalid");
3444 if (gdbarch_debug >= 2)
3445 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3446 gdbarch->print_vector_info (gdbarch, file, frame, args);
3450 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3451 gdbarch_print_vector_info_ftype print_vector_info)
3453 gdbarch->print_vector_info = print_vector_info;
3457 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3459 gdb_assert (gdbarch != NULL);
3460 if (gdbarch->register_sim_regno == 0)
3461 internal_error (__FILE__, __LINE__,
3462 "gdbarch: gdbarch_register_sim_regno invalid");
3463 if (gdbarch_debug >= 2)
3464 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3465 return gdbarch->register_sim_regno (reg_nr);
3469 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3470 gdbarch_register_sim_regno_ftype register_sim_regno)
3472 gdbarch->register_sim_regno = register_sim_regno;
3476 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3478 gdb_assert (gdbarch != NULL);
3479 return gdbarch->register_bytes_ok != 0;
3483 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3485 gdb_assert (gdbarch != NULL);
3486 if (gdbarch->register_bytes_ok == 0)
3487 internal_error (__FILE__, __LINE__,
3488 "gdbarch: gdbarch_register_bytes_ok invalid");
3489 if (gdbarch_debug >= 2)
3490 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3491 return gdbarch->register_bytes_ok (nr_bytes);
3495 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3496 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3498 gdbarch->register_bytes_ok = register_bytes_ok;
3502 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3504 gdb_assert (gdbarch != NULL);
3505 if (gdbarch->cannot_fetch_register == 0)
3506 internal_error (__FILE__, __LINE__,
3507 "gdbarch: gdbarch_cannot_fetch_register invalid");
3508 if (gdbarch_debug >= 2)
3509 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3510 return gdbarch->cannot_fetch_register (regnum);
3514 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3515 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3517 gdbarch->cannot_fetch_register = cannot_fetch_register;
3521 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3523 gdb_assert (gdbarch != NULL);
3524 if (gdbarch->cannot_store_register == 0)
3525 internal_error (__FILE__, __LINE__,
3526 "gdbarch: gdbarch_cannot_store_register invalid");
3527 if (gdbarch_debug >= 2)
3528 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3529 return gdbarch->cannot_store_register (regnum);
3533 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3534 gdbarch_cannot_store_register_ftype cannot_store_register)
3536 gdbarch->cannot_store_register = cannot_store_register;
3540 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3542 gdb_assert (gdbarch != NULL);
3543 return gdbarch->get_longjmp_target != 0;
3547 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3549 gdb_assert (gdbarch != NULL);
3550 if (gdbarch->get_longjmp_target == 0)
3551 internal_error (__FILE__, __LINE__,
3552 "gdbarch: gdbarch_get_longjmp_target invalid");
3553 if (gdbarch_debug >= 2)
3554 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3555 return gdbarch->get_longjmp_target (pc);
3559 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3560 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3562 gdbarch->get_longjmp_target = get_longjmp_target;
3566 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3568 gdb_assert (gdbarch != NULL);
3569 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3570 if (gdbarch_debug >= 2)
3571 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3572 return gdbarch->deprecated_use_generic_dummy_frames;
3576 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3577 int deprecated_use_generic_dummy_frames)
3579 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3583 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3585 gdb_assert (gdbarch != NULL);
3586 /* Skip verify of call_dummy_location, invalid_p == 0 */
3587 if (gdbarch_debug >= 2)
3588 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3589 return gdbarch->call_dummy_location;
3593 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3594 int call_dummy_location)
3596 gdbarch->call_dummy_location = call_dummy_location;
3600 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3602 gdb_assert (gdbarch != NULL);
3603 if (gdbarch->call_dummy_address == 0)
3604 internal_error (__FILE__, __LINE__,
3605 "gdbarch: gdbarch_call_dummy_address invalid");
3606 if (gdbarch_debug >= 2)
3607 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3608 return gdbarch->call_dummy_address ();
3612 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3613 gdbarch_call_dummy_address_ftype call_dummy_address)
3615 gdbarch->call_dummy_address = call_dummy_address;
3619 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3621 gdb_assert (gdbarch != NULL);
3622 if (gdbarch->call_dummy_start_offset == -1)
3623 internal_error (__FILE__, __LINE__,
3624 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3625 if (gdbarch_debug >= 2)
3626 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3627 return gdbarch->call_dummy_start_offset;
3631 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3632 CORE_ADDR call_dummy_start_offset)
3634 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3638 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3640 gdb_assert (gdbarch != NULL);
3641 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
3642 internal_error (__FILE__, __LINE__,
3643 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3644 if (gdbarch_debug >= 2)
3645 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3646 return gdbarch->call_dummy_breakpoint_offset;
3650 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3651 CORE_ADDR call_dummy_breakpoint_offset)
3653 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3657 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3659 gdb_assert (gdbarch != NULL);
3660 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3661 internal_error (__FILE__, __LINE__,
3662 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3663 if (gdbarch_debug >= 2)
3664 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3665 return gdbarch->call_dummy_breakpoint_offset_p;
3669 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3670 int call_dummy_breakpoint_offset_p)
3672 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3676 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3678 gdb_assert (gdbarch != NULL);
3679 if (gdbarch->call_dummy_length == -1)
3680 internal_error (__FILE__, __LINE__,
3681 "gdbarch: gdbarch_call_dummy_length invalid");
3682 if (gdbarch_debug >= 2)
3683 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3684 return gdbarch->call_dummy_length;
3688 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3689 int call_dummy_length)
3691 gdbarch->call_dummy_length = call_dummy_length;
3695 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3697 gdb_assert (gdbarch != NULL);
3698 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3702 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3704 gdb_assert (gdbarch != NULL);
3705 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3706 internal_error (__FILE__, __LINE__,
3707 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3708 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3709 if (gdbarch_debug >= 2)
3710 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3711 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3715 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3716 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3718 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3722 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3724 gdb_assert (gdbarch != NULL);
3725 if (gdbarch->call_dummy_p == -1)
3726 internal_error (__FILE__, __LINE__,
3727 "gdbarch: gdbarch_call_dummy_p invalid");
3728 if (gdbarch_debug >= 2)
3729 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3730 return gdbarch->call_dummy_p;
3734 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3737 gdbarch->call_dummy_p = call_dummy_p;
3741 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3743 gdb_assert (gdbarch != NULL);
3744 /* Skip verify of call_dummy_words, invalid_p == 0 */
3745 if (gdbarch_debug >= 2)
3746 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3747 return gdbarch->call_dummy_words;
3751 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3752 LONGEST * call_dummy_words)
3754 gdbarch->call_dummy_words = call_dummy_words;
3758 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3760 gdb_assert (gdbarch != NULL);
3761 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3762 if (gdbarch_debug >= 2)
3763 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3764 return gdbarch->sizeof_call_dummy_words;
3768 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3769 int sizeof_call_dummy_words)
3771 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3775 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3777 gdb_assert (gdbarch != NULL);
3778 if (gdbarch->call_dummy_stack_adjust_p == -1)
3779 internal_error (__FILE__, __LINE__,
3780 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3781 if (gdbarch_debug >= 2)
3782 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3783 return gdbarch->call_dummy_stack_adjust_p;
3787 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3788 int call_dummy_stack_adjust_p)
3790 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3794 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3796 gdb_assert (gdbarch != NULL);
3797 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3798 internal_error (__FILE__, __LINE__,
3799 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3800 if (gdbarch_debug >= 2)
3801 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3802 return gdbarch->call_dummy_stack_adjust;
3806 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3807 int call_dummy_stack_adjust)
3809 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3813 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)
3815 gdb_assert (gdbarch != NULL);
3816 if (gdbarch->fix_call_dummy == 0)
3817 internal_error (__FILE__, __LINE__,
3818 "gdbarch: gdbarch_fix_call_dummy invalid");
3819 if (gdbarch_debug >= 2)
3820 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3821 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3825 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3826 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3828 gdbarch->fix_call_dummy = fix_call_dummy;
3832 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3834 gdb_assert (gdbarch != NULL);
3835 return gdbarch->deprecated_init_frame_pc_first != 0;
3839 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3841 gdb_assert (gdbarch != NULL);
3842 if (gdbarch->deprecated_init_frame_pc_first == 0)
3843 internal_error (__FILE__, __LINE__,
3844 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3845 if (gdbarch_debug >= 2)
3846 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3847 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3851 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3852 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3854 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3858 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3860 gdb_assert (gdbarch != NULL);
3861 return gdbarch->deprecated_init_frame_pc != 0;
3865 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3867 gdb_assert (gdbarch != NULL);
3868 if (gdbarch->deprecated_init_frame_pc == 0)
3869 internal_error (__FILE__, __LINE__,
3870 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3871 if (gdbarch_debug >= 2)
3872 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3873 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3877 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3878 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3880 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3884 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3886 gdb_assert (gdbarch != NULL);
3887 if (gdbarch_debug >= 2)
3888 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3889 return gdbarch->believe_pcc_promotion;
3893 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3894 int believe_pcc_promotion)
3896 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3900 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3902 gdb_assert (gdbarch != NULL);
3903 if (gdbarch_debug >= 2)
3904 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3905 return gdbarch->believe_pcc_promotion_type;
3909 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3910 int believe_pcc_promotion_type)
3912 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3916 gdbarch_get_saved_register_p (struct gdbarch *gdbarch)
3918 gdb_assert (gdbarch != NULL);
3919 return gdbarch->get_saved_register != 0;
3923 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)
3925 gdb_assert (gdbarch != NULL);
3926 if (gdbarch->get_saved_register == 0)
3927 internal_error (__FILE__, __LINE__,
3928 "gdbarch: gdbarch_get_saved_register invalid");
3929 if (gdbarch_debug >= 2)
3930 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3931 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3935 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3936 gdbarch_get_saved_register_ftype get_saved_register)
3938 gdbarch->get_saved_register = get_saved_register;
3942 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3944 gdb_assert (gdbarch != NULL);
3945 if (gdbarch->register_convertible == 0)
3946 internal_error (__FILE__, __LINE__,
3947 "gdbarch: gdbarch_register_convertible invalid");
3948 if (gdbarch_debug >= 2)
3949 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3950 return gdbarch->register_convertible (nr);
3954 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3955 gdbarch_register_convertible_ftype register_convertible)
3957 gdbarch->register_convertible = register_convertible;
3961 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3963 gdb_assert (gdbarch != NULL);
3964 if (gdbarch->register_convert_to_virtual == 0)
3965 internal_error (__FILE__, __LINE__,
3966 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3967 if (gdbarch_debug >= 2)
3968 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3969 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3973 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3974 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3976 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3980 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3982 gdb_assert (gdbarch != NULL);
3983 if (gdbarch->register_convert_to_raw == 0)
3984 internal_error (__FILE__, __LINE__,
3985 "gdbarch: gdbarch_register_convert_to_raw invalid");
3986 if (gdbarch_debug >= 2)
3987 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3988 gdbarch->register_convert_to_raw (type, regnum, from, to);
3992 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3993 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3995 gdbarch->register_convert_to_raw = register_convert_to_raw;
3999 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4001 gdb_assert (gdbarch != NULL);
4002 if (gdbarch->convert_register_p == 0)
4003 internal_error (__FILE__, __LINE__,
4004 "gdbarch: gdbarch_convert_register_p invalid");
4005 if (gdbarch_debug >= 2)
4006 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4007 return gdbarch->convert_register_p (regnum);
4011 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4012 gdbarch_convert_register_p_ftype convert_register_p)
4014 gdbarch->convert_register_p = convert_register_p;
4018 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4020 gdb_assert (gdbarch != NULL);
4021 if (gdbarch->register_to_value == 0)
4022 internal_error (__FILE__, __LINE__,
4023 "gdbarch: gdbarch_register_to_value invalid");
4024 if (gdbarch_debug >= 2)
4025 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4026 gdbarch->register_to_value (regnum, type, from, to);
4030 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4031 gdbarch_register_to_value_ftype register_to_value)
4033 gdbarch->register_to_value = register_to_value;
4037 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4039 gdb_assert (gdbarch != NULL);
4040 if (gdbarch->value_to_register == 0)
4041 internal_error (__FILE__, __LINE__,
4042 "gdbarch: gdbarch_value_to_register invalid");
4043 if (gdbarch_debug >= 2)
4044 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4045 gdbarch->value_to_register (type, regnum, from, to);
4049 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4050 gdbarch_value_to_register_ftype value_to_register)
4052 gdbarch->value_to_register = value_to_register;
4056 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4058 gdb_assert (gdbarch != NULL);
4059 if (gdbarch->pointer_to_address == 0)
4060 internal_error (__FILE__, __LINE__,
4061 "gdbarch: gdbarch_pointer_to_address invalid");
4062 if (gdbarch_debug >= 2)
4063 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4064 return gdbarch->pointer_to_address (type, buf);
4068 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4069 gdbarch_pointer_to_address_ftype pointer_to_address)
4071 gdbarch->pointer_to_address = pointer_to_address;
4075 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4077 gdb_assert (gdbarch != NULL);
4078 if (gdbarch->address_to_pointer == 0)
4079 internal_error (__FILE__, __LINE__,
4080 "gdbarch: gdbarch_address_to_pointer invalid");
4081 if (gdbarch_debug >= 2)
4082 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4083 gdbarch->address_to_pointer (type, buf, addr);
4087 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4088 gdbarch_address_to_pointer_ftype address_to_pointer)
4090 gdbarch->address_to_pointer = address_to_pointer;
4094 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4096 gdb_assert (gdbarch != NULL);
4097 return gdbarch->integer_to_address != 0;
4101 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4103 gdb_assert (gdbarch != NULL);
4104 if (gdbarch->integer_to_address == 0)
4105 internal_error (__FILE__, __LINE__,
4106 "gdbarch: gdbarch_integer_to_address invalid");
4107 if (gdbarch_debug >= 2)
4108 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4109 return gdbarch->integer_to_address (type, buf);
4113 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4114 gdbarch_integer_to_address_ftype integer_to_address)
4116 gdbarch->integer_to_address = integer_to_address;
4120 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4122 gdb_assert (gdbarch != NULL);
4123 if (gdbarch->return_value_on_stack == 0)
4124 internal_error (__FILE__, __LINE__,
4125 "gdbarch: gdbarch_return_value_on_stack invalid");
4126 if (gdbarch_debug >= 2)
4127 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4128 return gdbarch->return_value_on_stack (type);
4132 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4133 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4135 gdbarch->return_value_on_stack = return_value_on_stack;
4139 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4141 gdb_assert (gdbarch != NULL);
4142 if (gdbarch->push_arguments == 0)
4143 internal_error (__FILE__, __LINE__,
4144 "gdbarch: gdbarch_push_arguments invalid");
4145 if (gdbarch_debug >= 2)
4146 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
4147 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
4151 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
4152 gdbarch_push_arguments_ftype push_arguments)
4154 gdbarch->push_arguments = push_arguments;
4158 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
4160 gdb_assert (gdbarch != NULL);
4161 if (gdbarch->push_dummy_frame == 0)
4162 internal_error (__FILE__, __LINE__,
4163 "gdbarch: gdbarch_push_dummy_frame invalid");
4164 if (gdbarch_debug >= 2)
4165 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
4166 gdbarch->push_dummy_frame ();
4170 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
4171 gdbarch_push_dummy_frame_ftype push_dummy_frame)
4173 gdbarch->push_dummy_frame = push_dummy_frame;
4177 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
4179 gdb_assert (gdbarch != NULL);
4180 return gdbarch->push_return_address != 0;
4184 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4186 gdb_assert (gdbarch != NULL);
4187 if (gdbarch->push_return_address == 0)
4188 internal_error (__FILE__, __LINE__,
4189 "gdbarch: gdbarch_push_return_address invalid");
4190 if (gdbarch_debug >= 2)
4191 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
4192 return gdbarch->push_return_address (pc, sp);
4196 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
4197 gdbarch_push_return_address_ftype push_return_address)
4199 gdbarch->push_return_address = push_return_address;
4203 gdbarch_pop_frame_p (struct gdbarch *gdbarch)
4205 gdb_assert (gdbarch != NULL);
4206 return gdbarch->pop_frame != 0;
4210 gdbarch_pop_frame (struct gdbarch *gdbarch)
4212 gdb_assert (gdbarch != NULL);
4213 if (gdbarch->pop_frame == 0)
4214 internal_error (__FILE__, __LINE__,
4215 "gdbarch: gdbarch_pop_frame invalid");
4216 if (gdbarch_debug >= 2)
4217 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
4218 gdbarch->pop_frame ();
4222 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
4223 gdbarch_pop_frame_ftype pop_frame)
4225 gdbarch->pop_frame = pop_frame;
4229 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4231 gdb_assert (gdbarch != NULL);
4232 if (gdbarch->store_struct_return == 0)
4233 internal_error (__FILE__, __LINE__,
4234 "gdbarch: gdbarch_store_struct_return invalid");
4235 if (gdbarch_debug >= 2)
4236 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
4237 gdbarch->store_struct_return (addr, sp);
4241 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
4242 gdbarch_store_struct_return_ftype store_struct_return)
4244 gdbarch->store_struct_return = store_struct_return;
4248 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4250 gdb_assert (gdbarch != NULL);
4251 if (gdbarch->extract_return_value == 0)
4252 internal_error (__FILE__, __LINE__,
4253 "gdbarch: gdbarch_extract_return_value invalid");
4254 if (gdbarch_debug >= 2)
4255 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4256 gdbarch->extract_return_value (type, regcache, valbuf);
4260 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4261 gdbarch_extract_return_value_ftype extract_return_value)
4263 gdbarch->extract_return_value = extract_return_value;
4267 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4269 gdb_assert (gdbarch != NULL);
4270 if (gdbarch->store_return_value == 0)
4271 internal_error (__FILE__, __LINE__,
4272 "gdbarch: gdbarch_store_return_value invalid");
4273 if (gdbarch_debug >= 2)
4274 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4275 gdbarch->store_return_value (type, regcache, valbuf);
4279 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4280 gdbarch_store_return_value_ftype store_return_value)
4282 gdbarch->store_return_value = store_return_value;
4286 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4288 gdb_assert (gdbarch != NULL);
4289 if (gdbarch->deprecated_extract_return_value == 0)
4290 internal_error (__FILE__, __LINE__,
4291 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4292 if (gdbarch_debug >= 2)
4293 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4294 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4298 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4299 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4301 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4305 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4307 gdb_assert (gdbarch != NULL);
4308 if (gdbarch->deprecated_store_return_value == 0)
4309 internal_error (__FILE__, __LINE__,
4310 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4311 if (gdbarch_debug >= 2)
4312 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4313 gdbarch->deprecated_store_return_value (type, valbuf);
4317 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4318 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4320 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4324 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4326 gdb_assert (gdbarch != NULL);
4327 return gdbarch->extract_struct_value_address != 0;
4331 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4333 gdb_assert (gdbarch != NULL);
4334 if (gdbarch->extract_struct_value_address == 0)
4335 internal_error (__FILE__, __LINE__,
4336 "gdbarch: gdbarch_extract_struct_value_address invalid");
4337 if (gdbarch_debug >= 2)
4338 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4339 return gdbarch->extract_struct_value_address (regcache);
4343 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4344 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4346 gdbarch->extract_struct_value_address = extract_struct_value_address;
4350 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4352 gdb_assert (gdbarch != NULL);
4353 return gdbarch->deprecated_extract_struct_value_address != 0;
4357 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4359 gdb_assert (gdbarch != NULL);
4360 if (gdbarch->deprecated_extract_struct_value_address == 0)
4361 internal_error (__FILE__, __LINE__,
4362 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4363 if (gdbarch_debug >= 2)
4364 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4365 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4369 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4370 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4372 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4376 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4378 gdb_assert (gdbarch != NULL);
4379 if (gdbarch->use_struct_convention == 0)
4380 internal_error (__FILE__, __LINE__,
4381 "gdbarch: gdbarch_use_struct_convention invalid");
4382 if (gdbarch_debug >= 2)
4383 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4384 return gdbarch->use_struct_convention (gcc_p, value_type);
4388 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4389 gdbarch_use_struct_convention_ftype use_struct_convention)
4391 gdbarch->use_struct_convention = use_struct_convention;
4395 gdbarch_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4397 gdb_assert (gdbarch != NULL);
4398 return gdbarch->frame_init_saved_regs != 0;
4402 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4404 gdb_assert (gdbarch != NULL);
4405 if (gdbarch->frame_init_saved_regs == 0)
4406 internal_error (__FILE__, __LINE__,
4407 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4408 if (gdbarch_debug >= 2)
4409 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
4410 gdbarch->frame_init_saved_regs (frame);
4414 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
4415 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
4417 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
4421 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
4423 gdb_assert (gdbarch != NULL);
4424 return gdbarch->init_extra_frame_info != 0;
4428 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4430 gdb_assert (gdbarch != NULL);
4431 if (gdbarch->init_extra_frame_info == 0)
4432 internal_error (__FILE__, __LINE__,
4433 "gdbarch: gdbarch_init_extra_frame_info invalid");
4434 if (gdbarch_debug >= 2)
4435 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
4436 gdbarch->init_extra_frame_info (fromleaf, frame);
4440 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
4441 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
4443 gdbarch->init_extra_frame_info = init_extra_frame_info;
4447 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4449 gdb_assert (gdbarch != NULL);
4450 if (gdbarch->skip_prologue == 0)
4451 internal_error (__FILE__, __LINE__,
4452 "gdbarch: gdbarch_skip_prologue invalid");
4453 if (gdbarch_debug >= 2)
4454 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4455 return gdbarch->skip_prologue (ip);
4459 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4460 gdbarch_skip_prologue_ftype skip_prologue)
4462 gdbarch->skip_prologue = skip_prologue;
4466 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4468 gdb_assert (gdbarch != NULL);
4469 if (gdbarch->prologue_frameless_p == 0)
4470 internal_error (__FILE__, __LINE__,
4471 "gdbarch: gdbarch_prologue_frameless_p invalid");
4472 if (gdbarch_debug >= 2)
4473 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4474 return gdbarch->prologue_frameless_p (ip);
4478 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4479 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4481 gdbarch->prologue_frameless_p = prologue_frameless_p;
4485 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4487 gdb_assert (gdbarch != NULL);
4488 if (gdbarch->inner_than == 0)
4489 internal_error (__FILE__, __LINE__,
4490 "gdbarch: gdbarch_inner_than invalid");
4491 if (gdbarch_debug >= 2)
4492 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4493 return gdbarch->inner_than (lhs, rhs);
4497 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4498 gdbarch_inner_than_ftype inner_than)
4500 gdbarch->inner_than = inner_than;
4503 const unsigned char *
4504 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4506 gdb_assert (gdbarch != NULL);
4507 if (gdbarch->breakpoint_from_pc == 0)
4508 internal_error (__FILE__, __LINE__,
4509 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4510 if (gdbarch_debug >= 2)
4511 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4512 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4516 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4517 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4519 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4523 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4525 gdb_assert (gdbarch != NULL);
4526 if (gdbarch->memory_insert_breakpoint == 0)
4527 internal_error (__FILE__, __LINE__,
4528 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4529 if (gdbarch_debug >= 2)
4530 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4531 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4535 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4536 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4538 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4542 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4544 gdb_assert (gdbarch != NULL);
4545 if (gdbarch->memory_remove_breakpoint == 0)
4546 internal_error (__FILE__, __LINE__,
4547 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4548 if (gdbarch_debug >= 2)
4549 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4550 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4554 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4555 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4557 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4561 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4563 gdb_assert (gdbarch != NULL);
4564 if (gdbarch->decr_pc_after_break == -1)
4565 internal_error (__FILE__, __LINE__,
4566 "gdbarch: gdbarch_decr_pc_after_break invalid");
4567 if (gdbarch_debug >= 2)
4568 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4569 return gdbarch->decr_pc_after_break;
4573 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4574 CORE_ADDR decr_pc_after_break)
4576 gdbarch->decr_pc_after_break = decr_pc_after_break;
4580 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4582 gdb_assert (gdbarch != NULL);
4583 if (gdbarch->prepare_to_proceed == 0)
4584 internal_error (__FILE__, __LINE__,
4585 "gdbarch: gdbarch_prepare_to_proceed invalid");
4586 if (gdbarch_debug >= 2)
4587 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4588 return gdbarch->prepare_to_proceed (select_it);
4592 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4593 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4595 gdbarch->prepare_to_proceed = prepare_to_proceed;
4599 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4601 gdb_assert (gdbarch != NULL);
4602 if (gdbarch->function_start_offset == -1)
4603 internal_error (__FILE__, __LINE__,
4604 "gdbarch: gdbarch_function_start_offset invalid");
4605 if (gdbarch_debug >= 2)
4606 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4607 return gdbarch->function_start_offset;
4611 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4612 CORE_ADDR function_start_offset)
4614 gdbarch->function_start_offset = function_start_offset;
4618 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4620 gdb_assert (gdbarch != NULL);
4621 if (gdbarch->remote_translate_xfer_address == 0)
4622 internal_error (__FILE__, __LINE__,
4623 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4624 if (gdbarch_debug >= 2)
4625 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4626 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4630 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4631 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4633 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4637 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4639 gdb_assert (gdbarch != NULL);
4640 if (gdbarch->frame_args_skip == -1)
4641 internal_error (__FILE__, __LINE__,
4642 "gdbarch: gdbarch_frame_args_skip invalid");
4643 if (gdbarch_debug >= 2)
4644 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4645 return gdbarch->frame_args_skip;
4649 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4650 CORE_ADDR frame_args_skip)
4652 gdbarch->frame_args_skip = frame_args_skip;
4656 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4658 gdb_assert (gdbarch != NULL);
4659 if (gdbarch->frameless_function_invocation == 0)
4660 internal_error (__FILE__, __LINE__,
4661 "gdbarch: gdbarch_frameless_function_invocation invalid");
4662 if (gdbarch_debug >= 2)
4663 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4664 return gdbarch->frameless_function_invocation (fi);
4668 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4669 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4671 gdbarch->frameless_function_invocation = frameless_function_invocation;
4675 gdbarch_frame_chain_p (struct gdbarch *gdbarch)
4677 gdb_assert (gdbarch != NULL);
4678 return gdbarch->frame_chain != 0;
4682 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4684 gdb_assert (gdbarch != NULL);
4685 if (gdbarch->frame_chain == 0)
4686 internal_error (__FILE__, __LINE__,
4687 "gdbarch: gdbarch_frame_chain invalid");
4688 if (gdbarch_debug >= 2)
4689 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4690 return gdbarch->frame_chain (frame);
4694 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4695 gdbarch_frame_chain_ftype frame_chain)
4697 gdbarch->frame_chain = frame_chain;
4701 gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch)
4703 gdb_assert (gdbarch != NULL);
4704 return gdbarch->frame_chain_valid != 0;
4708 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4710 gdb_assert (gdbarch != NULL);
4711 if (gdbarch->frame_chain_valid == 0)
4712 internal_error (__FILE__, __LINE__,
4713 "gdbarch: gdbarch_frame_chain_valid invalid");
4714 if (gdbarch_debug >= 2)
4715 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4716 return gdbarch->frame_chain_valid (chain, thisframe);
4720 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4721 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4723 gdbarch->frame_chain_valid = frame_chain_valid;
4727 gdbarch_frame_saved_pc_p (struct gdbarch *gdbarch)
4729 gdb_assert (gdbarch != NULL);
4730 return gdbarch->frame_saved_pc != 0;
4734 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4736 gdb_assert (gdbarch != NULL);
4737 if (gdbarch->frame_saved_pc == 0)
4738 internal_error (__FILE__, __LINE__,
4739 "gdbarch: gdbarch_frame_saved_pc invalid");
4740 if (gdbarch_debug >= 2)
4741 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4742 return gdbarch->frame_saved_pc (fi);
4746 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4747 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4749 gdbarch->frame_saved_pc = frame_saved_pc;
4753 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4755 gdb_assert (gdbarch != NULL);
4756 if (gdbarch->frame_args_address == 0)
4757 internal_error (__FILE__, __LINE__,
4758 "gdbarch: gdbarch_frame_args_address invalid");
4759 if (gdbarch_debug >= 2)
4760 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4761 return gdbarch->frame_args_address (fi);
4765 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4766 gdbarch_frame_args_address_ftype frame_args_address)
4768 gdbarch->frame_args_address = frame_args_address;
4772 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4774 gdb_assert (gdbarch != NULL);
4775 if (gdbarch->frame_locals_address == 0)
4776 internal_error (__FILE__, __LINE__,
4777 "gdbarch: gdbarch_frame_locals_address invalid");
4778 if (gdbarch_debug >= 2)
4779 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4780 return gdbarch->frame_locals_address (fi);
4784 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4785 gdbarch_frame_locals_address_ftype frame_locals_address)
4787 gdbarch->frame_locals_address = frame_locals_address;
4791 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4793 gdb_assert (gdbarch != NULL);
4794 if (gdbarch->saved_pc_after_call == 0)
4795 internal_error (__FILE__, __LINE__,
4796 "gdbarch: gdbarch_saved_pc_after_call invalid");
4797 if (gdbarch_debug >= 2)
4798 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4799 return gdbarch->saved_pc_after_call (frame);
4803 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4804 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4806 gdbarch->saved_pc_after_call = saved_pc_after_call;
4810 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4812 gdb_assert (gdbarch != NULL);
4813 if (gdbarch->frame_num_args == 0)
4814 internal_error (__FILE__, __LINE__,
4815 "gdbarch: gdbarch_frame_num_args invalid");
4816 if (gdbarch_debug >= 2)
4817 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4818 return gdbarch->frame_num_args (frame);
4822 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4823 gdbarch_frame_num_args_ftype frame_num_args)
4825 gdbarch->frame_num_args = frame_num_args;
4829 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4831 gdb_assert (gdbarch != NULL);
4832 return gdbarch->stack_align != 0;
4836 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4838 gdb_assert (gdbarch != NULL);
4839 if (gdbarch->stack_align == 0)
4840 internal_error (__FILE__, __LINE__,
4841 "gdbarch: gdbarch_stack_align invalid");
4842 if (gdbarch_debug >= 2)
4843 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4844 return gdbarch->stack_align (sp);
4848 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4849 gdbarch_stack_align_ftype stack_align)
4851 gdbarch->stack_align = stack_align;
4855 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4857 gdb_assert (gdbarch != NULL);
4858 return gdbarch->frame_align != 0;
4862 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4864 gdb_assert (gdbarch != NULL);
4865 if (gdbarch->frame_align == 0)
4866 internal_error (__FILE__, __LINE__,
4867 "gdbarch: gdbarch_frame_align invalid");
4868 if (gdbarch_debug >= 2)
4869 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4870 return gdbarch->frame_align (gdbarch, address);
4874 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4875 gdbarch_frame_align_ftype frame_align)
4877 gdbarch->frame_align = frame_align;
4881 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4883 gdb_assert (gdbarch != NULL);
4884 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4885 if (gdbarch_debug >= 2)
4886 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4887 return gdbarch->extra_stack_alignment_needed;
4891 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4892 int extra_stack_alignment_needed)
4894 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4898 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4900 gdb_assert (gdbarch != NULL);
4901 return gdbarch->reg_struct_has_addr != 0;
4905 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4907 gdb_assert (gdbarch != NULL);
4908 if (gdbarch->reg_struct_has_addr == 0)
4909 internal_error (__FILE__, __LINE__,
4910 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4911 if (gdbarch_debug >= 2)
4912 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4913 return gdbarch->reg_struct_has_addr (gcc_p, type);
4917 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4918 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4920 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4924 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4926 gdb_assert (gdbarch != NULL);
4927 return gdbarch->save_dummy_frame_tos != 0;
4931 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4933 gdb_assert (gdbarch != NULL);
4934 if (gdbarch->save_dummy_frame_tos == 0)
4935 internal_error (__FILE__, __LINE__,
4936 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4937 if (gdbarch_debug >= 2)
4938 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4939 gdbarch->save_dummy_frame_tos (sp);
4943 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4944 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4946 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4950 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4952 gdb_assert (gdbarch != NULL);
4953 if (gdbarch_debug >= 2)
4954 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4955 return gdbarch->parm_boundary;
4959 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4962 gdbarch->parm_boundary = parm_boundary;
4965 const struct floatformat *
4966 gdbarch_float_format (struct gdbarch *gdbarch)
4968 gdb_assert (gdbarch != NULL);
4969 if (gdbarch_debug >= 2)
4970 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4971 return gdbarch->float_format;
4975 set_gdbarch_float_format (struct gdbarch *gdbarch,
4976 const struct floatformat * float_format)
4978 gdbarch->float_format = float_format;
4981 const struct floatformat *
4982 gdbarch_double_format (struct gdbarch *gdbarch)
4984 gdb_assert (gdbarch != NULL);
4985 if (gdbarch_debug >= 2)
4986 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4987 return gdbarch->double_format;
4991 set_gdbarch_double_format (struct gdbarch *gdbarch,
4992 const struct floatformat * double_format)
4994 gdbarch->double_format = double_format;
4997 const struct floatformat *
4998 gdbarch_long_double_format (struct gdbarch *gdbarch)
5000 gdb_assert (gdbarch != NULL);
5001 if (gdbarch_debug >= 2)
5002 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5003 return gdbarch->long_double_format;
5007 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5008 const struct floatformat * long_double_format)
5010 gdbarch->long_double_format = long_double_format;
5014 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5016 gdb_assert (gdbarch != NULL);
5017 if (gdbarch->convert_from_func_ptr_addr == 0)
5018 internal_error (__FILE__, __LINE__,
5019 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5020 if (gdbarch_debug >= 2)
5021 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5022 return gdbarch->convert_from_func_ptr_addr (addr);
5026 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5027 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5029 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5033 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5035 gdb_assert (gdbarch != NULL);
5036 if (gdbarch->addr_bits_remove == 0)
5037 internal_error (__FILE__, __LINE__,
5038 "gdbarch: gdbarch_addr_bits_remove invalid");
5039 if (gdbarch_debug >= 2)
5040 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5041 return gdbarch->addr_bits_remove (addr);
5045 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5046 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5048 gdbarch->addr_bits_remove = addr_bits_remove;
5052 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5054 gdb_assert (gdbarch != NULL);
5055 if (gdbarch->smash_text_address == 0)
5056 internal_error (__FILE__, __LINE__,
5057 "gdbarch: gdbarch_smash_text_address invalid");
5058 if (gdbarch_debug >= 2)
5059 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5060 return gdbarch->smash_text_address (addr);
5064 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5065 gdbarch_smash_text_address_ftype smash_text_address)
5067 gdbarch->smash_text_address = smash_text_address;
5071 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5073 gdb_assert (gdbarch != NULL);
5074 return gdbarch->software_single_step != 0;
5078 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5080 gdb_assert (gdbarch != NULL);
5081 if (gdbarch->software_single_step == 0)
5082 internal_error (__FILE__, __LINE__,
5083 "gdbarch: gdbarch_software_single_step invalid");
5084 if (gdbarch_debug >= 2)
5085 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5086 gdbarch->software_single_step (sig, insert_breakpoints_p);
5090 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5091 gdbarch_software_single_step_ftype software_single_step)
5093 gdbarch->software_single_step = software_single_step;
5097 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5099 gdb_assert (gdbarch != NULL);
5100 if (gdbarch->print_insn == 0)
5101 internal_error (__FILE__, __LINE__,
5102 "gdbarch: gdbarch_print_insn invalid");
5103 if (gdbarch_debug >= 2)
5104 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5105 return gdbarch->print_insn (vma, info);
5109 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5110 gdbarch_print_insn_ftype print_insn)
5112 gdbarch->print_insn = print_insn;
5116 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5118 gdb_assert (gdbarch != NULL);
5119 if (gdbarch->skip_trampoline_code == 0)
5120 internal_error (__FILE__, __LINE__,
5121 "gdbarch: gdbarch_skip_trampoline_code invalid");
5122 if (gdbarch_debug >= 2)
5123 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5124 return gdbarch->skip_trampoline_code (pc);
5128 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5129 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5131 gdbarch->skip_trampoline_code = skip_trampoline_code;
5135 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5137 gdb_assert (gdbarch != NULL);
5138 if (gdbarch->in_solib_call_trampoline == 0)
5139 internal_error (__FILE__, __LINE__,
5140 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5141 if (gdbarch_debug >= 2)
5142 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5143 return gdbarch->in_solib_call_trampoline (pc, name);
5147 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5148 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5150 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5154 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5156 gdb_assert (gdbarch != NULL);
5157 if (gdbarch->in_solib_return_trampoline == 0)
5158 internal_error (__FILE__, __LINE__,
5159 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5160 if (gdbarch_debug >= 2)
5161 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5162 return gdbarch->in_solib_return_trampoline (pc, name);
5166 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5167 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5169 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5173 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5175 gdb_assert (gdbarch != NULL);
5176 if (gdbarch->pc_in_sigtramp == 0)
5177 internal_error (__FILE__, __LINE__,
5178 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5179 if (gdbarch_debug >= 2)
5180 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5181 return gdbarch->pc_in_sigtramp (pc, name);
5185 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5186 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5188 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5192 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5194 gdb_assert (gdbarch != NULL);
5195 return gdbarch->sigtramp_start != 0;
5199 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5201 gdb_assert (gdbarch != NULL);
5202 if (gdbarch->sigtramp_start == 0)
5203 internal_error (__FILE__, __LINE__,
5204 "gdbarch: gdbarch_sigtramp_start invalid");
5205 if (gdbarch_debug >= 2)
5206 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5207 return gdbarch->sigtramp_start (pc);
5211 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5212 gdbarch_sigtramp_start_ftype sigtramp_start)
5214 gdbarch->sigtramp_start = sigtramp_start;
5218 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5220 gdb_assert (gdbarch != NULL);
5221 return gdbarch->sigtramp_end != 0;
5225 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5227 gdb_assert (gdbarch != NULL);
5228 if (gdbarch->sigtramp_end == 0)
5229 internal_error (__FILE__, __LINE__,
5230 "gdbarch: gdbarch_sigtramp_end invalid");
5231 if (gdbarch_debug >= 2)
5232 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5233 return gdbarch->sigtramp_end (pc);
5237 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5238 gdbarch_sigtramp_end_ftype sigtramp_end)
5240 gdbarch->sigtramp_end = sigtramp_end;
5244 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5246 gdb_assert (gdbarch != NULL);
5247 if (gdbarch->in_function_epilogue_p == 0)
5248 internal_error (__FILE__, __LINE__,
5249 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5250 if (gdbarch_debug >= 2)
5251 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5252 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5256 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5257 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5259 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5263 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5265 gdb_assert (gdbarch != NULL);
5266 if (gdbarch->construct_inferior_arguments == 0)
5267 internal_error (__FILE__, __LINE__,
5268 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5269 if (gdbarch_debug >= 2)
5270 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5271 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5275 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5276 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5278 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5282 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5284 gdb_assert (gdbarch != NULL);
5285 return gdbarch->dwarf2_build_frame_info != 0;
5289 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5291 gdb_assert (gdbarch != NULL);
5292 if (gdbarch->dwarf2_build_frame_info == 0)
5293 internal_error (__FILE__, __LINE__,
5294 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5295 if (gdbarch_debug >= 2)
5296 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5297 gdbarch->dwarf2_build_frame_info (objfile);
5301 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5302 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5304 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5308 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5310 gdb_assert (gdbarch != NULL);
5311 if (gdbarch->elf_make_msymbol_special == 0)
5312 internal_error (__FILE__, __LINE__,
5313 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5314 if (gdbarch_debug >= 2)
5315 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5316 gdbarch->elf_make_msymbol_special (sym, msym);
5320 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5321 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5323 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5327 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5329 gdb_assert (gdbarch != NULL);
5330 if (gdbarch->coff_make_msymbol_special == 0)
5331 internal_error (__FILE__, __LINE__,
5332 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5333 if (gdbarch_debug >= 2)
5334 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5335 gdbarch->coff_make_msymbol_special (val, msym);
5339 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5340 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5342 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5346 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5348 gdb_assert (gdbarch != NULL);
5349 /* Skip verify of name_of_malloc, invalid_p == 0 */
5350 if (gdbarch_debug >= 2)
5351 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5352 return gdbarch->name_of_malloc;
5356 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5357 const char * name_of_malloc)
5359 gdbarch->name_of_malloc = name_of_malloc;
5363 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5365 gdb_assert (gdbarch != NULL);
5366 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5367 if (gdbarch_debug >= 2)
5368 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5369 return gdbarch->cannot_step_breakpoint;
5373 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5374 int cannot_step_breakpoint)
5376 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5380 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5382 gdb_assert (gdbarch != NULL);
5383 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5384 if (gdbarch_debug >= 2)
5385 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5386 return gdbarch->have_nonsteppable_watchpoint;
5390 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5391 int have_nonsteppable_watchpoint)
5393 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5397 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5399 gdb_assert (gdbarch != NULL);
5400 return gdbarch->address_class_type_flags != 0;
5404 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5406 gdb_assert (gdbarch != NULL);
5407 if (gdbarch->address_class_type_flags == 0)
5408 internal_error (__FILE__, __LINE__,
5409 "gdbarch: gdbarch_address_class_type_flags invalid");
5410 if (gdbarch_debug >= 2)
5411 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5412 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5416 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5417 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5419 gdbarch->address_class_type_flags = address_class_type_flags;
5423 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5425 gdb_assert (gdbarch != NULL);
5426 return gdbarch->address_class_type_flags_to_name != 0;
5430 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5432 gdb_assert (gdbarch != NULL);
5433 if (gdbarch->address_class_type_flags_to_name == 0)
5434 internal_error (__FILE__, __LINE__,
5435 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5436 if (gdbarch_debug >= 2)
5437 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5438 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5442 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5443 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5445 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5449 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5451 gdb_assert (gdbarch != NULL);
5452 return gdbarch->address_class_name_to_type_flags != 0;
5456 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5458 gdb_assert (gdbarch != NULL);
5459 if (gdbarch->address_class_name_to_type_flags == 0)
5460 internal_error (__FILE__, __LINE__,
5461 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5462 if (gdbarch_debug >= 2)
5463 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5464 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5468 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5469 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5471 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5475 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5477 gdb_assert (gdbarch != NULL);
5478 if (gdbarch->register_reggroup_p == 0)
5479 internal_error (__FILE__, __LINE__,
5480 "gdbarch: gdbarch_register_reggroup_p invalid");
5481 if (gdbarch_debug >= 2)
5482 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5483 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5487 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5488 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5490 gdbarch->register_reggroup_p = register_reggroup_p;
5494 /* Keep a registry of per-architecture data-pointers required by GDB
5501 gdbarch_data_init_ftype *init;
5502 gdbarch_data_free_ftype *free;
5505 struct gdbarch_data_registration
5507 struct gdbarch_data *data;
5508 struct gdbarch_data_registration *next;
5511 struct gdbarch_data_registry
5514 struct gdbarch_data_registration *registrations;
5517 struct gdbarch_data_registry gdbarch_data_registry =
5522 struct gdbarch_data *
5523 register_gdbarch_data (gdbarch_data_init_ftype *init,
5524 gdbarch_data_free_ftype *free)
5526 struct gdbarch_data_registration **curr;
5527 /* Append the new registraration. */
5528 for (curr = &gdbarch_data_registry.registrations;
5530 curr = &(*curr)->next);
5531 (*curr) = XMALLOC (struct gdbarch_data_registration);
5532 (*curr)->next = NULL;
5533 (*curr)->data = XMALLOC (struct gdbarch_data);
5534 (*curr)->data->index = gdbarch_data_registry.nr++;
5535 (*curr)->data->init = init;
5536 (*curr)->data->init_p = 1;
5537 (*curr)->data->free = free;
5538 return (*curr)->data;
5542 /* Create/delete the gdbarch data vector. */
5545 alloc_gdbarch_data (struct gdbarch *gdbarch)
5547 gdb_assert (gdbarch->data == NULL);
5548 gdbarch->nr_data = gdbarch_data_registry.nr;
5549 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5553 free_gdbarch_data (struct gdbarch *gdbarch)
5555 struct gdbarch_data_registration *rego;
5556 gdb_assert (gdbarch->data != NULL);
5557 for (rego = gdbarch_data_registry.registrations;
5561 struct gdbarch_data *data = rego->data;
5562 gdb_assert (data->index < gdbarch->nr_data);
5563 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5565 data->free (gdbarch, gdbarch->data[data->index]);
5566 gdbarch->data[data->index] = NULL;
5569 xfree (gdbarch->data);
5570 gdbarch->data = NULL;
5574 /* Initialize the current value of the specified per-architecture
5578 set_gdbarch_data (struct gdbarch *gdbarch,
5579 struct gdbarch_data *data,
5582 gdb_assert (data->index < gdbarch->nr_data);
5583 if (gdbarch->data[data->index] != NULL)
5585 gdb_assert (data->free != NULL);
5586 data->free (gdbarch, gdbarch->data[data->index]);
5588 gdbarch->data[data->index] = pointer;
5591 /* Return the current value of the specified per-architecture
5595 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5597 gdb_assert (data->index < gdbarch->nr_data);
5598 /* The data-pointer isn't initialized, call init() to get a value but
5599 only if the architecture initializaiton has completed. Otherwise
5600 punt - hope that the caller knows what they are doing. */
5601 if (gdbarch->data[data->index] == NULL
5602 && gdbarch->initialized_p)
5604 /* Be careful to detect an initialization cycle. */
5605 gdb_assert (data->init_p);
5607 gdb_assert (data->init != NULL);
5608 gdbarch->data[data->index] = data->init (gdbarch);
5610 gdb_assert (gdbarch->data[data->index] != NULL);
5612 return gdbarch->data[data->index];
5617 /* Keep a registry of swapped data required by GDB modules. */
5622 struct gdbarch_swap_registration *source;
5623 struct gdbarch_swap *next;
5626 struct gdbarch_swap_registration
5629 unsigned long sizeof_data;
5630 gdbarch_swap_ftype *init;
5631 struct gdbarch_swap_registration *next;
5634 struct gdbarch_swap_registry
5637 struct gdbarch_swap_registration *registrations;
5640 struct gdbarch_swap_registry gdbarch_swap_registry =
5646 register_gdbarch_swap (void *data,
5647 unsigned long sizeof_data,
5648 gdbarch_swap_ftype *init)
5650 struct gdbarch_swap_registration **rego;
5651 for (rego = &gdbarch_swap_registry.registrations;
5653 rego = &(*rego)->next);
5654 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5655 (*rego)->next = NULL;
5656 (*rego)->init = init;
5657 (*rego)->data = data;
5658 (*rego)->sizeof_data = sizeof_data;
5662 clear_gdbarch_swap (struct gdbarch *gdbarch)
5664 struct gdbarch_swap *curr;
5665 for (curr = gdbarch->swap;
5669 memset (curr->source->data, 0, curr->source->sizeof_data);
5674 init_gdbarch_swap (struct gdbarch *gdbarch)
5676 struct gdbarch_swap_registration *rego;
5677 struct gdbarch_swap **curr = &gdbarch->swap;
5678 for (rego = gdbarch_swap_registry.registrations;
5682 if (rego->data != NULL)
5684 (*curr) = XMALLOC (struct gdbarch_swap);
5685 (*curr)->source = rego;
5686 (*curr)->swap = xmalloc (rego->sizeof_data);
5687 (*curr)->next = NULL;
5688 curr = &(*curr)->next;
5690 if (rego->init != NULL)
5696 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5698 struct gdbarch_swap *curr;
5699 for (curr = gdbarch->swap;
5702 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5706 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5708 struct gdbarch_swap *curr;
5709 for (curr = gdbarch->swap;
5712 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5716 /* Keep a registry of the architectures known by GDB. */
5718 struct gdbarch_registration
5720 enum bfd_architecture bfd_architecture;
5721 gdbarch_init_ftype *init;
5722 gdbarch_dump_tdep_ftype *dump_tdep;
5723 struct gdbarch_list *arches;
5724 struct gdbarch_registration *next;
5727 static struct gdbarch_registration *gdbarch_registry = NULL;
5730 append_name (const char ***buf, int *nr, const char *name)
5732 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5738 gdbarch_printable_names (void)
5742 /* Accumulate a list of names based on the registed list of
5744 enum bfd_architecture a;
5746 const char **arches = NULL;
5747 struct gdbarch_registration *rego;
5748 for (rego = gdbarch_registry;
5752 const struct bfd_arch_info *ap;
5753 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5755 internal_error (__FILE__, __LINE__,
5756 "gdbarch_architecture_names: multi-arch unknown");
5759 append_name (&arches, &nr_arches, ap->printable_name);
5764 append_name (&arches, &nr_arches, NULL);
5768 /* Just return all the architectures that BFD knows. Assume that
5769 the legacy architecture framework supports them. */
5770 return bfd_arch_list ();
5775 gdbarch_register (enum bfd_architecture bfd_architecture,
5776 gdbarch_init_ftype *init,
5777 gdbarch_dump_tdep_ftype *dump_tdep)
5779 struct gdbarch_registration **curr;
5780 const struct bfd_arch_info *bfd_arch_info;
5781 /* Check that BFD recognizes this architecture */
5782 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5783 if (bfd_arch_info == NULL)
5785 internal_error (__FILE__, __LINE__,
5786 "gdbarch: Attempt to register unknown architecture (%d)",
5789 /* Check that we haven't seen this architecture before */
5790 for (curr = &gdbarch_registry;
5792 curr = &(*curr)->next)
5794 if (bfd_architecture == (*curr)->bfd_architecture)
5795 internal_error (__FILE__, __LINE__,
5796 "gdbarch: Duplicate registraration of architecture (%s)",
5797 bfd_arch_info->printable_name);
5801 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5802 bfd_arch_info->printable_name,
5805 (*curr) = XMALLOC (struct gdbarch_registration);
5806 (*curr)->bfd_architecture = bfd_architecture;
5807 (*curr)->init = init;
5808 (*curr)->dump_tdep = dump_tdep;
5809 (*curr)->arches = NULL;
5810 (*curr)->next = NULL;
5811 /* When non- multi-arch, install whatever target dump routine we've
5812 been provided - hopefully that routine has been written correctly
5813 and works regardless of multi-arch. */
5814 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5815 && startup_gdbarch.dump_tdep == NULL)
5816 startup_gdbarch.dump_tdep = dump_tdep;
5820 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5821 gdbarch_init_ftype *init)
5823 gdbarch_register (bfd_architecture, init, NULL);
5827 /* Look for an architecture using gdbarch_info. Base search on only
5828 BFD_ARCH_INFO and BYTE_ORDER. */
5830 struct gdbarch_list *
5831 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5832 const struct gdbarch_info *info)
5834 for (; arches != NULL; arches = arches->next)
5836 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5838 if (info->byte_order != arches->gdbarch->byte_order)
5840 if (info->osabi != arches->gdbarch->osabi)
5848 /* Update the current architecture. Return ZERO if the update request
5852 gdbarch_update_p (struct gdbarch_info info)
5854 struct gdbarch *new_gdbarch;
5855 struct gdbarch *old_gdbarch;
5856 struct gdbarch_registration *rego;
5858 /* Fill in missing parts of the INFO struct using a number of
5859 sources: ``set ...''; INFOabfd supplied; existing target. */
5861 /* ``(gdb) set architecture ...'' */
5862 if (info.bfd_arch_info == NULL
5863 && !TARGET_ARCHITECTURE_AUTO)
5864 info.bfd_arch_info = TARGET_ARCHITECTURE;
5865 if (info.bfd_arch_info == NULL
5866 && info.abfd != NULL
5867 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5868 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5869 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5870 if (info.bfd_arch_info == NULL)
5871 info.bfd_arch_info = TARGET_ARCHITECTURE;
5873 /* ``(gdb) set byte-order ...'' */
5874 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5875 && !TARGET_BYTE_ORDER_AUTO)
5876 info.byte_order = TARGET_BYTE_ORDER;
5877 /* From the INFO struct. */
5878 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5879 && info.abfd != NULL)
5880 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5881 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5882 : BFD_ENDIAN_UNKNOWN);
5883 /* From the current target. */
5884 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5885 info.byte_order = TARGET_BYTE_ORDER;
5887 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
5888 if (info.osabi == GDB_OSABI_UNINITIALIZED)
5889 info.osabi = gdbarch_lookup_osabi (info.abfd);
5890 if (info.osabi == GDB_OSABI_UNINITIALIZED)
5891 info.osabi = current_gdbarch->osabi;
5893 /* Must have found some sort of architecture. */
5894 gdb_assert (info.bfd_arch_info != NULL);
5898 fprintf_unfiltered (gdb_stdlog,
5899 "gdbarch_update: info.bfd_arch_info %s\n",
5900 (info.bfd_arch_info != NULL
5901 ? info.bfd_arch_info->printable_name
5903 fprintf_unfiltered (gdb_stdlog,
5904 "gdbarch_update: info.byte_order %d (%s)\n",
5906 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5907 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5909 fprintf_unfiltered (gdb_stdlog,
5910 "gdbarch_update: info.osabi %d (%s)\n",
5911 info.osabi, gdbarch_osabi_name (info.osabi));
5912 fprintf_unfiltered (gdb_stdlog,
5913 "gdbarch_update: info.abfd 0x%lx\n",
5915 fprintf_unfiltered (gdb_stdlog,
5916 "gdbarch_update: info.tdep_info 0x%lx\n",
5917 (long) info.tdep_info);
5920 /* Find the target that knows about this architecture. */
5921 for (rego = gdbarch_registry;
5924 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5929 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
5933 /* Swap the data belonging to the old target out setting the
5934 installed data to zero. This stops the ->init() function trying
5935 to refer to the previous architecture's global data structures. */
5936 swapout_gdbarch_swap (current_gdbarch);
5937 clear_gdbarch_swap (current_gdbarch);
5939 /* Save the previously selected architecture, setting the global to
5940 NULL. This stops ->init() trying to use the previous
5941 architecture's configuration. The previous architecture may not
5942 even be of the same architecture family. The most recent
5943 architecture of the same family is found at the head of the
5944 rego->arches list. */
5945 old_gdbarch = current_gdbarch;
5946 current_gdbarch = NULL;
5948 /* Ask the target for a replacement architecture. */
5949 new_gdbarch = rego->init (info, rego->arches);
5951 /* Did the target like it? No. Reject the change and revert to the
5952 old architecture. */
5953 if (new_gdbarch == NULL)
5956 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
5957 swapin_gdbarch_swap (old_gdbarch);
5958 current_gdbarch = old_gdbarch;
5962 /* Did the architecture change? No. Oops, put the old architecture
5964 if (old_gdbarch == new_gdbarch)
5967 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5969 new_gdbarch->bfd_arch_info->printable_name);
5970 swapin_gdbarch_swap (old_gdbarch);
5971 current_gdbarch = old_gdbarch;
5975 /* Is this a pre-existing architecture? Yes. Move it to the front
5976 of the list of architectures (keeping the list sorted Most
5977 Recently Used) and then copy it in. */
5979 struct gdbarch_list **list;
5980 for (list = ®o->arches;
5982 list = &(*list)->next)
5984 if ((*list)->gdbarch == new_gdbarch)
5986 struct gdbarch_list *this;
5988 fprintf_unfiltered (gdb_stdlog,
5989 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5991 new_gdbarch->bfd_arch_info->printable_name);
5994 (*list) = this->next;
5995 /* Insert in the front. */
5996 this->next = rego->arches;
5997 rego->arches = this;
5998 /* Copy the new architecture in. */
5999 current_gdbarch = new_gdbarch;
6000 swapin_gdbarch_swap (new_gdbarch);
6001 architecture_changed_event ();
6007 /* Prepend this new architecture to the architecture list (keep the
6008 list sorted Most Recently Used). */
6010 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6011 this->next = rego->arches;
6012 this->gdbarch = new_gdbarch;
6013 rego->arches = this;
6016 /* Switch to this new architecture marking it initialized. */
6017 current_gdbarch = new_gdbarch;
6018 current_gdbarch->initialized_p = 1;
6021 fprintf_unfiltered (gdb_stdlog,
6022 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6024 new_gdbarch->bfd_arch_info->printable_name);
6027 /* Check that the newly installed architecture is valid. Plug in
6028 any post init values. */
6029 new_gdbarch->dump_tdep = rego->dump_tdep;
6030 verify_gdbarch (new_gdbarch);
6032 /* Initialize the per-architecture memory (swap) areas.
6033 CURRENT_GDBARCH must be update before these modules are
6035 init_gdbarch_swap (new_gdbarch);
6037 /* Initialize the per-architecture data. CURRENT_GDBARCH
6038 must be updated before these modules are called. */
6039 architecture_changed_event ();
6042 gdbarch_dump (current_gdbarch, gdb_stdlog);
6050 /* Pointer to the target-dependent disassembly function. */
6051 int (*tm_print_insn) (bfd_vma, disassemble_info *);
6052 disassemble_info tm_print_insn_info;
6055 extern void _initialize_gdbarch (void);
6058 _initialize_gdbarch (void)
6060 struct cmd_list_element *c;
6062 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
6063 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
6064 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
6065 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
6066 tm_print_insn_info.print_address_func = dis_asm_print_address;
6068 add_show_from_set (add_set_cmd ("arch",
6071 (char *)&gdbarch_debug,
6072 "Set architecture debugging.\n\
6073 When non-zero, architecture debugging is enabled.", &setdebuglist),
6075 c = add_set_cmd ("archdebug",
6078 (char *)&gdbarch_debug,
6079 "Set architecture debugging.\n\
6080 When non-zero, architecture debugging is enabled.", &setlist);
6082 deprecate_cmd (c, "set debug arch");
6083 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");