1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
69 #include "symfile.h" /* For entry_point_address. */
71 /* Static function declarations */
73 static void verify_gdbarch (struct gdbarch *gdbarch);
74 static void alloc_gdbarch_data (struct gdbarch *);
75 static void free_gdbarch_data (struct gdbarch *);
76 static void init_gdbarch_swap (struct gdbarch *);
77 static void clear_gdbarch_swap (struct gdbarch *);
78 static void swapout_gdbarch_swap (struct gdbarch *);
79 static void swapin_gdbarch_swap (struct gdbarch *);
81 /* Non-zero if we want to trace architecture code. */
84 #define GDBARCH_DEBUG 0
86 int gdbarch_debug = GDBARCH_DEBUG;
89 /* Maintain the struct gdbarch object */
93 /* Has this architecture been fully initialized? */
95 /* basic architectural information */
96 const struct bfd_arch_info * bfd_arch_info;
100 /* target specific vector. */
101 struct gdbarch_tdep *tdep;
102 gdbarch_dump_tdep_ftype *dump_tdep;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap *swap;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype *read_pc;
149 gdbarch_write_pc_ftype *write_pc;
150 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
151 gdbarch_read_sp_ftype *read_sp;
152 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
153 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
154 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
155 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
159 int deprecated_fp_regnum;
164 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
165 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
166 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
167 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
168 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
169 gdbarch_register_name_ftype *register_name;
172 gdbarch_register_byte_ftype *register_byte;
173 gdbarch_register_raw_size_ftype *register_raw_size;
174 int deprecated_max_register_raw_size;
175 gdbarch_register_virtual_size_ftype *register_virtual_size;
176 int deprecated_max_register_virtual_size;
177 gdbarch_register_virtual_type_ftype *register_virtual_type;
178 gdbarch_register_type_ftype *register_type;
179 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
180 gdbarch_print_registers_info_ftype *print_registers_info;
181 gdbarch_print_float_info_ftype *print_float_info;
182 gdbarch_print_vector_info_ftype *print_vector_info;
183 gdbarch_register_sim_regno_ftype *register_sim_regno;
184 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
185 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
186 gdbarch_cannot_store_register_ftype *cannot_store_register;
187 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
188 int deprecated_use_generic_dummy_frames;
189 int call_dummy_location;
190 gdbarch_call_dummy_address_ftype *call_dummy_address;
191 CORE_ADDR call_dummy_start_offset;
192 CORE_ADDR call_dummy_breakpoint_offset;
193 int call_dummy_length;
194 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 deprecated_call_dummy_stack_adjust;
198 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
199 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
200 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
201 int believe_pcc_promotion;
202 int believe_pcc_promotion_type;
203 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
204 gdbarch_register_convertible_ftype *register_convertible;
205 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
206 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
207 gdbarch_convert_register_p_ftype *convert_register_p;
208 gdbarch_register_to_value_ftype *register_to_value;
209 gdbarch_value_to_register_ftype *value_to_register;
210 gdbarch_pointer_to_address_ftype *pointer_to_address;
211 gdbarch_address_to_pointer_ftype *address_to_pointer;
212 gdbarch_integer_to_address_ftype *integer_to_address;
213 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
214 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
215 gdbarch_push_dummy_call_ftype *push_dummy_call;
216 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
217 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
218 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
219 gdbarch_deprecated_store_struct_return_ftype *deprecated_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_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
228 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_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_deprecated_frame_chain_ftype *deprecated_frame_chain;
242 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
243 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
244 gdbarch_unwind_pc_ftype *unwind_pc;
245 gdbarch_frame_args_address_ftype *frame_args_address;
246 gdbarch_frame_locals_address_ftype *frame_locals_address;
247 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
248 gdbarch_frame_num_args_ftype *frame_num_args;
249 gdbarch_stack_align_ftype *stack_align;
250 gdbarch_frame_align_ftype *frame_align;
251 int deprecated_extra_stack_alignment_needed;
252 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
253 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
254 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
256 const struct floatformat * float_format;
257 const struct floatformat * double_format;
258 const struct floatformat * long_double_format;
259 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
260 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
261 gdbarch_smash_text_address_ftype *smash_text_address;
262 gdbarch_software_single_step_ftype *software_single_step;
263 gdbarch_print_insn_ftype *print_insn;
264 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
265 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
266 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
267 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
268 gdbarch_sigtramp_start_ftype *sigtramp_start;
269 gdbarch_sigtramp_end_ftype *sigtramp_end;
270 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
271 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
272 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
273 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
274 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
275 const char * name_of_malloc;
276 int cannot_step_breakpoint;
277 int have_nonsteppable_watchpoint;
278 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
279 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
280 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
281 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
285 /* The default architecture uses host values (for want of a better
288 extern const struct bfd_arch_info bfd_default_arch_struct;
290 struct gdbarch startup_gdbarch =
292 1, /* Always initialized. */
293 /* basic architecture information */
294 &bfd_default_arch_struct,
297 /* target specific vector and its dump routine */
299 /*per-architecture data-pointers and swap regions */
301 /* Multi-arch values */
305 8 * sizeof (LONGEST),
308 8 * sizeof (long double),
337 generic_register_byte,
338 generic_register_size,
340 generic_register_size,
345 default_print_registers_info,
359 generic_pc_in_call_dummy,
435 generic_in_function_epilogue_p,
436 construct_inferior_arguments,
446 default_register_reggroup_p,
447 /* startup_gdbarch() */
450 struct gdbarch *current_gdbarch = &startup_gdbarch;
452 /* Do any initialization needed for a non-multiarch configuration
453 after the _initialize_MODULE functions have been run. */
455 initialize_non_multiarch (void)
457 alloc_gdbarch_data (&startup_gdbarch);
458 /* Ensure that all swap areas are zeroed so that they again think
459 they are starting from scratch. */
460 clear_gdbarch_swap (&startup_gdbarch);
461 init_gdbarch_swap (&startup_gdbarch);
465 /* Create a new ``struct gdbarch'' based on information provided by
466 ``struct gdbarch_info''. */
469 gdbarch_alloc (const struct gdbarch_info *info,
470 struct gdbarch_tdep *tdep)
472 /* NOTE: The new architecture variable is named ``current_gdbarch''
473 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
474 the current local architecture and not the previous global
475 architecture. This ensures that the new architectures initial
476 values are not influenced by the previous architecture. Once
477 everything is parameterised with gdbarch, this will go away. */
478 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
479 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
481 alloc_gdbarch_data (current_gdbarch);
483 current_gdbarch->tdep = tdep;
485 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
486 current_gdbarch->byte_order = info->byte_order;
487 current_gdbarch->osabi = info->osabi;
489 /* Force the explicit initialization of these. */
490 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
491 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
492 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
493 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
494 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
495 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
496 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
497 current_gdbarch->ptr_bit = TARGET_INT_BIT;
498 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
499 current_gdbarch->char_signed = -1;
500 current_gdbarch->read_pc = generic_target_read_pc;
501 current_gdbarch->write_pc = generic_target_write_pc;
502 current_gdbarch->read_sp = generic_target_read_sp;
503 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
504 current_gdbarch->num_regs = -1;
505 current_gdbarch->sp_regnum = -1;
506 current_gdbarch->deprecated_fp_regnum = -1;
507 current_gdbarch->pc_regnum = -1;
508 current_gdbarch->ps_regnum = -1;
509 current_gdbarch->fp0_regnum = -1;
510 current_gdbarch->npc_regnum = -1;
511 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
512 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
513 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
514 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
515 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
516 current_gdbarch->register_name = legacy_register_name;
517 current_gdbarch->register_byte = generic_register_byte;
518 current_gdbarch->register_raw_size = generic_register_size;
519 current_gdbarch->register_virtual_size = generic_register_size;
520 current_gdbarch->print_registers_info = default_print_registers_info;
521 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
522 current_gdbarch->cannot_fetch_register = cannot_register_not;
523 current_gdbarch->cannot_store_register = cannot_register_not;
524 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
525 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
526 current_gdbarch->call_dummy_address = entry_point_address;
527 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
528 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
529 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
530 current_gdbarch->register_convertible = generic_register_convertible_not;
531 current_gdbarch->convert_register_p = legacy_convert_register_p;
532 current_gdbarch->register_to_value = legacy_register_to_value;
533 current_gdbarch->value_to_register = legacy_value_to_register;
534 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
535 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
536 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
537 current_gdbarch->extract_return_value = legacy_extract_return_value;
538 current_gdbarch->store_return_value = legacy_store_return_value;
539 current_gdbarch->use_struct_convention = generic_use_struct_convention;
540 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
541 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
542 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
543 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
544 current_gdbarch->decr_pc_after_break = -1;
545 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
546 current_gdbarch->function_start_offset = -1;
547 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
548 current_gdbarch->frame_args_skip = -1;
549 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
550 current_gdbarch->frame_args_address = get_frame_base;
551 current_gdbarch->frame_locals_address = get_frame_base;
552 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
553 current_gdbarch->addr_bits_remove = core_addr_identity;
554 current_gdbarch->smash_text_address = core_addr_identity;
555 current_gdbarch->print_insn = legacy_print_insn;
556 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
557 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
558 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
559 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
560 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
561 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
562 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
563 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
564 current_gdbarch->name_of_malloc = "malloc";
565 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
566 /* gdbarch_alloc() */
568 return current_gdbarch;
572 /* Free a gdbarch struct. This should never happen in normal
573 operation --- once you've created a gdbarch, you keep it around.
574 However, if an architecture's init function encounters an error
575 building the structure, it may need to clean up a partially
576 constructed gdbarch. */
579 gdbarch_free (struct gdbarch *arch)
581 gdb_assert (arch != NULL);
582 free_gdbarch_data (arch);
587 /* Ensure that all values in a GDBARCH are reasonable. */
590 verify_gdbarch (struct gdbarch *gdbarch)
593 struct cleanup *cleanups;
596 /* Only perform sanity checks on a multi-arch target. */
599 log = mem_fileopen ();
600 cleanups = make_cleanup_ui_file_delete (log);
602 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
603 fprintf_unfiltered (log, "\n\tbyte-order");
604 if (gdbarch->bfd_arch_info == NULL)
605 fprintf_unfiltered (log, "\n\tbfd_arch_info");
606 /* Check those that need to be defined for the given multi-arch level. */
607 /* Skip verify of short_bit, invalid_p == 0 */
608 /* Skip verify of int_bit, invalid_p == 0 */
609 /* Skip verify of long_bit, invalid_p == 0 */
610 /* Skip verify of long_long_bit, invalid_p == 0 */
611 /* Skip verify of float_bit, invalid_p == 0 */
612 /* Skip verify of double_bit, invalid_p == 0 */
613 /* Skip verify of long_double_bit, invalid_p == 0 */
614 /* Skip verify of ptr_bit, invalid_p == 0 */
615 if (gdbarch->addr_bit == 0)
616 gdbarch->addr_bit = TARGET_PTR_BIT;
617 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
618 if (gdbarch->char_signed == -1)
619 gdbarch->char_signed = 1;
620 /* Skip verify of read_pc, invalid_p == 0 */
621 /* Skip verify of write_pc, invalid_p == 0 */
622 /* Skip verify of deprecated_target_read_fp, has predicate */
623 /* Skip verify of read_sp, invalid_p == 0 */
624 /* Skip verify of deprecated_dummy_write_sp, has predicate */
625 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
626 /* Skip verify of pseudo_register_read, has predicate */
627 /* Skip verify of pseudo_register_write, has predicate */
628 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
629 && (gdbarch->num_regs == -1))
630 fprintf_unfiltered (log, "\n\tnum_regs");
631 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
632 /* Skip verify of sp_regnum, invalid_p == 0 */
633 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
634 /* Skip verify of pc_regnum, invalid_p == 0 */
635 /* Skip verify of ps_regnum, invalid_p == 0 */
636 /* Skip verify of fp0_regnum, invalid_p == 0 */
637 /* Skip verify of npc_regnum, invalid_p == 0 */
638 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
639 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
640 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
641 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
642 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
643 /* Skip verify of register_name, invalid_p == 0 */
644 /* Skip verify of register_byte, invalid_p == 0 */
645 /* Skip verify of register_raw_size, invalid_p == 0 */
646 /* Skip verify of deprecated_max_register_raw_size, has predicate */
647 /* Skip verify of register_virtual_size, invalid_p == 0 */
648 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
649 /* Skip verify of register_virtual_type, has predicate */
650 /* Skip verify of register_type, has predicate */
651 /* Skip verify of deprecated_do_registers_info, has predicate */
652 /* Skip verify of print_registers_info, invalid_p == 0 */
653 /* Skip verify of print_float_info, has predicate */
654 /* Skip verify of print_vector_info, has predicate */
655 /* Skip verify of register_sim_regno, invalid_p == 0 */
656 /* Skip verify of register_bytes_ok, has predicate */
657 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
658 /* Skip verify of cannot_store_register, invalid_p == 0 */
659 /* Skip verify of get_longjmp_target, has predicate */
660 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
661 /* Skip verify of call_dummy_location, invalid_p == 0 */
662 /* Skip verify of call_dummy_address, invalid_p == 0 */
663 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
664 /* Skip verify of call_dummy_words, invalid_p == 0 */
665 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
666 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
667 /* Skip verify of fix_call_dummy, has predicate */
668 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
669 /* Skip verify of deprecated_init_frame_pc, has predicate */
670 /* Skip verify of deprecated_get_saved_register, has predicate */
671 /* Skip verify of register_convertible, invalid_p == 0 */
672 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
673 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
674 /* Skip verify of convert_register_p, invalid_p == 0 */
675 /* Skip verify of register_to_value, invalid_p == 0 */
676 /* Skip verify of value_to_register, invalid_p == 0 */
677 /* Skip verify of pointer_to_address, invalid_p == 0 */
678 /* Skip verify of address_to_pointer, invalid_p == 0 */
679 /* Skip verify of integer_to_address, has predicate */
680 /* Skip verify of return_value_on_stack, invalid_p == 0 */
681 /* Skip verify of deprecated_push_arguments, has predicate */
682 /* Skip verify of push_dummy_call, has predicate */
683 /* Skip verify of deprecated_push_dummy_frame, has predicate */
684 /* Skip verify of deprecated_push_return_address, has predicate */
685 /* Skip verify of deprecated_pop_frame, has predicate */
686 /* Skip verify of deprecated_store_struct_return, has predicate */
687 /* Skip verify of extract_return_value, invalid_p == 0 */
688 /* Skip verify of store_return_value, invalid_p == 0 */
689 /* Skip verify of extract_struct_value_address, has predicate */
690 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
691 /* Skip verify of use_struct_convention, invalid_p == 0 */
692 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
693 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
694 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
695 && (gdbarch->skip_prologue == 0))
696 fprintf_unfiltered (log, "\n\tskip_prologue");
697 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
698 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
699 && (gdbarch->inner_than == 0))
700 fprintf_unfiltered (log, "\n\tinner_than");
701 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
702 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
703 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
704 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
705 && (gdbarch->decr_pc_after_break == -1))
706 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
707 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
708 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
709 && (gdbarch->function_start_offset == -1))
710 fprintf_unfiltered (log, "\n\tfunction_start_offset");
711 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
712 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
713 && (gdbarch->frame_args_skip == -1))
714 fprintf_unfiltered (log, "\n\tframe_args_skip");
715 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
716 /* Skip verify of deprecated_frame_chain, has predicate */
717 /* Skip verify of deprecated_frame_chain_valid, has predicate */
718 /* Skip verify of deprecated_frame_saved_pc, has predicate */
719 /* Skip verify of unwind_pc, has predicate */
720 /* Skip verify of frame_args_address, invalid_p == 0 */
721 /* Skip verify of frame_locals_address, invalid_p == 0 */
722 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
723 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
724 && (gdbarch->frame_num_args == 0))
725 fprintf_unfiltered (log, "\n\tframe_num_args");
726 /* Skip verify of stack_align, has predicate */
727 /* Skip verify of frame_align, has predicate */
728 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
729 /* Skip verify of reg_struct_has_addr, has predicate */
730 /* Skip verify of save_dummy_frame_tos, has predicate */
731 /* Skip verify of unwind_dummy_id, has predicate */
732 if (gdbarch->float_format == 0)
733 gdbarch->float_format = default_float_format (gdbarch);
734 if (gdbarch->double_format == 0)
735 gdbarch->double_format = default_double_format (gdbarch);
736 if (gdbarch->long_double_format == 0)
737 gdbarch->long_double_format = default_double_format (gdbarch);
738 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
739 /* Skip verify of addr_bits_remove, invalid_p == 0 */
740 /* Skip verify of smash_text_address, invalid_p == 0 */
741 /* Skip verify of software_single_step, has predicate */
742 /* Skip verify of print_insn, invalid_p == 0 */
743 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
744 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
745 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
746 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
747 /* Skip verify of sigtramp_start, has predicate */
748 /* Skip verify of sigtramp_end, has predicate */
749 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
750 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
751 /* Skip verify of dwarf2_build_frame_info, has predicate */
752 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
753 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
754 /* Skip verify of name_of_malloc, invalid_p == 0 */
755 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
756 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
757 /* Skip verify of address_class_type_flags, has predicate */
758 /* Skip verify of address_class_type_flags_to_name, has predicate */
759 /* Skip verify of address_class_name_to_type_flags, has predicate */
760 /* Skip verify of register_reggroup_p, invalid_p == 0 */
761 buf = ui_file_xstrdup (log, &dummy);
762 make_cleanup (xfree, buf);
763 if (strlen (buf) > 0)
764 internal_error (__FILE__, __LINE__,
765 "verify_gdbarch: the following are invalid ...%s",
767 do_cleanups (cleanups);
771 /* Print out the details of the current architecture. */
773 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
774 just happens to match the global variable ``current_gdbarch''. That
775 way macros refering to that variable get the local and not the global
776 version - ulgh. Once everything is parameterised with gdbarch, this
780 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
782 fprintf_unfiltered (file,
783 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
786 fprintf_unfiltered (file,
787 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
788 gdbarch_frame_align_p (current_gdbarch));
790 fprintf_unfiltered (file,
791 "gdbarch_dump: frame_align = 0x%08lx\n",
792 (long) current_gdbarch->frame_align);
794 fprintf_unfiltered (file,
795 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
796 (long) current_gdbarch->in_function_epilogue_p);
798 fprintf_unfiltered (file,
799 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
800 (long) current_gdbarch->register_reggroup_p);
802 fprintf_unfiltered (file,
803 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
804 gdbarch_pseudo_register_read_p (current_gdbarch));
806 fprintf_unfiltered (file,
807 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
808 (long) current_gdbarch->pseudo_register_read);
810 fprintf_unfiltered (file,
811 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
812 gdbarch_pseudo_register_write_p (current_gdbarch));
814 fprintf_unfiltered (file,
815 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
816 (long) current_gdbarch->pseudo_register_write);
818 fprintf_unfiltered (file,
819 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
820 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
822 fprintf_unfiltered (file,
823 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
824 (long) current_gdbarch->address_class_name_to_type_flags);
825 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
826 fprintf_unfiltered (file,
827 "gdbarch_dump: %s # %s\n",
828 "ADDRESS_CLASS_TYPE_FLAGS_P()",
829 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
832 ADDRESS_CLASS_TYPE_FLAGS_P ());
834 #ifdef ADDRESS_CLASS_TYPE_FLAGS
835 fprintf_unfiltered (file,
836 "gdbarch_dump: %s # %s\n",
837 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
838 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
840 fprintf_unfiltered (file,
841 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
842 (long) current_gdbarch->address_class_type_flags
843 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
846 fprintf_unfiltered (file,
847 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
848 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
850 fprintf_unfiltered (file,
851 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
852 (long) current_gdbarch->address_class_type_flags_to_name);
853 #ifdef ADDRESS_TO_POINTER
855 /* Macro might contain `[{}]' when not multi-arch */
856 fprintf_unfiltered (file,
857 "gdbarch_dump: %s # %s\n",
858 "ADDRESS_TO_POINTER(type, buf, addr)",
859 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
862 fprintf_unfiltered (file,
863 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
864 (long) current_gdbarch->address_to_pointer
865 /*ADDRESS_TO_POINTER ()*/);
867 #ifdef ADDR_BITS_REMOVE
868 fprintf_unfiltered (file,
869 "gdbarch_dump: %s # %s\n",
870 "ADDR_BITS_REMOVE(addr)",
871 XSTRING (ADDR_BITS_REMOVE (addr)));
873 fprintf_unfiltered (file,
874 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
875 (long) current_gdbarch->addr_bits_remove
876 /*ADDR_BITS_REMOVE ()*/);
878 #ifdef BELIEVE_PCC_PROMOTION
879 fprintf_unfiltered (file,
880 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
881 XSTRING (BELIEVE_PCC_PROMOTION));
882 fprintf_unfiltered (file,
883 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
884 BELIEVE_PCC_PROMOTION);
886 #ifdef BELIEVE_PCC_PROMOTION_TYPE
887 fprintf_unfiltered (file,
888 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
889 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
892 BELIEVE_PCC_PROMOTION_TYPE);
894 #ifdef BREAKPOINT_FROM_PC
895 fprintf_unfiltered (file,
896 "gdbarch_dump: %s # %s\n",
897 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
898 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
900 fprintf_unfiltered (file,
901 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
902 (long) current_gdbarch->breakpoint_from_pc
903 /*BREAKPOINT_FROM_PC ()*/);
905 #ifdef CALL_DUMMY_ADDRESS
906 fprintf_unfiltered (file,
907 "gdbarch_dump: %s # %s\n",
908 "CALL_DUMMY_ADDRESS()",
909 XSTRING (CALL_DUMMY_ADDRESS ()));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
913 (long) current_gdbarch->call_dummy_address
914 /*CALL_DUMMY_ADDRESS ()*/);
916 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
917 fprintf_unfiltered (file,
918 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
919 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
922 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
924 #ifdef CALL_DUMMY_LENGTH
925 fprintf_unfiltered (file,
926 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
927 XSTRING (CALL_DUMMY_LENGTH));
928 fprintf_unfiltered (file,
929 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
932 #ifdef CALL_DUMMY_LOCATION
933 fprintf_unfiltered (file,
934 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
935 XSTRING (CALL_DUMMY_LOCATION));
936 fprintf_unfiltered (file,
937 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
938 CALL_DUMMY_LOCATION);
940 #ifdef CALL_DUMMY_START_OFFSET
941 fprintf_unfiltered (file,
942 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
943 XSTRING (CALL_DUMMY_START_OFFSET));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: CALL_DUMMY_START_OFFSET = %ld\n",
946 (long) CALL_DUMMY_START_OFFSET);
948 #ifdef CALL_DUMMY_WORDS
949 fprintf_unfiltered (file,
950 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
951 XSTRING (CALL_DUMMY_WORDS));
952 fprintf_unfiltered (file,
953 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
954 (long) CALL_DUMMY_WORDS);
956 #ifdef CANNOT_FETCH_REGISTER
957 fprintf_unfiltered (file,
958 "gdbarch_dump: %s # %s\n",
959 "CANNOT_FETCH_REGISTER(regnum)",
960 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
964 (long) current_gdbarch->cannot_fetch_register
965 /*CANNOT_FETCH_REGISTER ()*/);
967 #ifdef CANNOT_STEP_BREAKPOINT
968 fprintf_unfiltered (file,
969 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
970 XSTRING (CANNOT_STEP_BREAKPOINT));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
973 CANNOT_STEP_BREAKPOINT);
975 #ifdef CANNOT_STORE_REGISTER
976 fprintf_unfiltered (file,
977 "gdbarch_dump: %s # %s\n",
978 "CANNOT_STORE_REGISTER(regnum)",
979 XSTRING (CANNOT_STORE_REGISTER (regnum)));
981 fprintf_unfiltered (file,
982 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
983 (long) current_gdbarch->cannot_store_register
984 /*CANNOT_STORE_REGISTER ()*/);
986 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
988 /* Macro might contain `[{}]' when not multi-arch */
989 fprintf_unfiltered (file,
990 "gdbarch_dump: %s # %s\n",
991 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
992 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
997 (long) current_gdbarch->coff_make_msymbol_special
998 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1003 (long) current_gdbarch->construct_inferior_arguments);
1004 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: %s # %s\n",
1007 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1008 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1012 (long) current_gdbarch->convert_from_func_ptr_addr
1013 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1015 #ifdef CONVERT_REGISTER_P
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: %s # %s\n",
1018 "CONVERT_REGISTER_P(regnum)",
1019 XSTRING (CONVERT_REGISTER_P (regnum)));
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1023 (long) current_gdbarch->convert_register_p
1024 /*CONVERT_REGISTER_P ()*/);
1026 #ifdef DECR_PC_AFTER_BREAK
1027 fprintf_unfiltered (file,
1028 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1029 XSTRING (DECR_PC_AFTER_BREAK));
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1032 (long) DECR_PC_AFTER_BREAK);
1034 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: %s # %s\n",
1037 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1038 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1041 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1043 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1046 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1049 DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1051 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: %s # %s\n",
1054 "DEPRECATED_DO_REGISTERS_INFO_P()",
1055 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1058 DEPRECATED_DO_REGISTERS_INFO_P ());
1060 #ifdef DEPRECATED_DO_REGISTERS_INFO
1062 /* Macro might contain `[{}]' when not multi-arch */
1063 fprintf_unfiltered (file,
1064 "gdbarch_dump: %s # %s\n",
1065 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1066 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1071 (long) current_gdbarch->deprecated_do_registers_info
1072 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1074 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: %s # %s\n",
1077 "DEPRECATED_DUMMY_WRITE_SP_P()",
1078 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1081 DEPRECATED_DUMMY_WRITE_SP_P ());
1083 #ifdef DEPRECATED_DUMMY_WRITE_SP
1085 /* Macro might contain `[{}]' when not multi-arch */
1086 fprintf_unfiltered (file,
1087 "gdbarch_dump: %s # %s\n",
1088 "DEPRECATED_DUMMY_WRITE_SP(val)",
1089 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1094 (long) current_gdbarch->deprecated_dummy_write_sp
1095 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1097 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1099 /* Macro might contain `[{}]' when not multi-arch */
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: %s # %s\n",
1102 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1103 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1108 (long) current_gdbarch->deprecated_extract_return_value
1109 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1111 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: %s # %s\n",
1114 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1115 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1116 fprintf_unfiltered (file,
1117 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1118 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1120 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: %s # %s\n",
1123 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1124 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1128 (long) current_gdbarch->deprecated_extract_struct_value_address
1129 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1131 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1134 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1137 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1139 #ifdef DEPRECATED_FP_REGNUM
1140 fprintf_unfiltered (file,
1141 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1142 XSTRING (DEPRECATED_FP_REGNUM));
1143 fprintf_unfiltered (file,
1144 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1145 DEPRECATED_FP_REGNUM);
1147 #ifdef DEPRECATED_FRAME_CHAIN_P
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: %s # %s\n",
1150 "DEPRECATED_FRAME_CHAIN_P()",
1151 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1152 fprintf_unfiltered (file,
1153 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1154 DEPRECATED_FRAME_CHAIN_P ());
1156 #ifdef DEPRECATED_FRAME_CHAIN
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: %s # %s\n",
1159 "DEPRECATED_FRAME_CHAIN(frame)",
1160 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1162 fprintf_unfiltered (file,
1163 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1164 (long) current_gdbarch->deprecated_frame_chain
1165 /*DEPRECATED_FRAME_CHAIN ()*/);
1167 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: %s # %s\n",
1170 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1171 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1174 DEPRECATED_FRAME_CHAIN_VALID_P ());
1176 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1177 fprintf_unfiltered (file,
1178 "gdbarch_dump: %s # %s\n",
1179 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1180 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1182 fprintf_unfiltered (file,
1183 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1184 (long) current_gdbarch->deprecated_frame_chain_valid
1185 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1187 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: %s # %s\n",
1190 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1191 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1194 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1196 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1198 /* Macro might contain `[{}]' when not multi-arch */
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: %s # %s\n",
1201 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1202 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1207 (long) current_gdbarch->deprecated_frame_init_saved_regs
1208 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1210 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: %s # %s\n",
1213 "DEPRECATED_FRAME_SAVED_PC_P()",
1214 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1215 fprintf_unfiltered (file,
1216 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1217 DEPRECATED_FRAME_SAVED_PC_P ());
1219 #ifdef DEPRECATED_FRAME_SAVED_PC
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: %s # %s\n",
1222 "DEPRECATED_FRAME_SAVED_PC(fi)",
1223 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1227 (long) current_gdbarch->deprecated_frame_saved_pc
1228 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1230 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: %s # %s\n",
1233 "DEPRECATED_GET_SAVED_REGISTER_P()",
1234 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1237 DEPRECATED_GET_SAVED_REGISTER_P ());
1239 #ifdef DEPRECATED_GET_SAVED_REGISTER
1241 /* Macro might contain `[{}]' when not multi-arch */
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: %s # %s\n",
1244 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1245 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1250 (long) current_gdbarch->deprecated_get_saved_register
1251 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1253 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: %s # %s\n",
1256 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1257 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1260 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1262 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1264 /* Macro might contain `[{}]' when not multi-arch */
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: %s # %s\n",
1267 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1268 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1273 (long) current_gdbarch->deprecated_init_extra_frame_info
1274 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1276 #ifdef DEPRECATED_INIT_FRAME_PC_P
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: %s # %s\n",
1279 "DEPRECATED_INIT_FRAME_PC_P()",
1280 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1281 fprintf_unfiltered (file,
1282 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1283 DEPRECATED_INIT_FRAME_PC_P ());
1285 #ifdef DEPRECATED_INIT_FRAME_PC
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: %s # %s\n",
1288 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1289 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1293 (long) current_gdbarch->deprecated_init_frame_pc
1294 /*DEPRECATED_INIT_FRAME_PC ()*/);
1296 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: %s # %s\n",
1299 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1300 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1303 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1305 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: %s # %s\n",
1308 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1309 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1313 (long) current_gdbarch->deprecated_init_frame_pc_first
1314 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1316 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1317 fprintf_unfiltered (file,
1318 "gdbarch_dump: %s # %s\n",
1319 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1320 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1323 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1325 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1326 fprintf_unfiltered (file,
1327 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1328 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1329 fprintf_unfiltered (file,
1330 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1331 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1333 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: %s # %s\n",
1336 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1337 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1338 fprintf_unfiltered (file,
1339 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1340 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1342 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1345 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1348 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1350 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: %s # %s\n",
1353 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1354 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1357 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1359 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: %s # %s\n",
1362 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1363 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1365 fprintf_unfiltered (file,
1366 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1367 (long) current_gdbarch->deprecated_pc_in_call_dummy
1368 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1370 #ifdef DEPRECATED_POP_FRAME_P
1371 fprintf_unfiltered (file,
1372 "gdbarch_dump: %s # %s\n",
1373 "DEPRECATED_POP_FRAME_P()",
1374 XSTRING (DEPRECATED_POP_FRAME_P ()));
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1377 DEPRECATED_POP_FRAME_P ());
1379 #ifdef DEPRECATED_POP_FRAME
1381 /* Macro might contain `[{}]' when not multi-arch */
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: %s # %s\n",
1384 "DEPRECATED_POP_FRAME(-)",
1385 XSTRING (DEPRECATED_POP_FRAME (-)));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1390 (long) current_gdbarch->deprecated_pop_frame
1391 /*DEPRECATED_POP_FRAME ()*/);
1393 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: %s # %s\n",
1396 "DEPRECATED_PUSH_ARGUMENTS_P()",
1397 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1398 fprintf_unfiltered (file,
1399 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1400 DEPRECATED_PUSH_ARGUMENTS_P ());
1402 #ifdef DEPRECATED_PUSH_ARGUMENTS
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: %s # %s\n",
1405 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1406 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1410 (long) current_gdbarch->deprecated_push_arguments
1411 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1413 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1414 fprintf_unfiltered (file,
1415 "gdbarch_dump: %s # %s\n",
1416 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1417 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1420 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1422 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1424 /* Macro might contain `[{}]' when not multi-arch */
1425 fprintf_unfiltered (file,
1426 "gdbarch_dump: %s # %s\n",
1427 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1428 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1431 fprintf_unfiltered (file,
1432 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1433 (long) current_gdbarch->deprecated_push_dummy_frame
1434 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1436 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1437 fprintf_unfiltered (file,
1438 "gdbarch_dump: %s # %s\n",
1439 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1440 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1443 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1445 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1446 fprintf_unfiltered (file,
1447 "gdbarch_dump: %s # %s\n",
1448 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1449 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1453 (long) current_gdbarch->deprecated_push_return_address
1454 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1456 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: %s # %s\n",
1459 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1460 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1461 fprintf_unfiltered (file,
1462 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1463 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1465 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: %s # %s\n",
1468 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1469 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1473 (long) current_gdbarch->deprecated_saved_pc_after_call
1474 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1476 #ifdef DEPRECATED_STORE_RETURN_VALUE
1478 /* Macro might contain `[{}]' when not multi-arch */
1479 fprintf_unfiltered (file,
1480 "gdbarch_dump: %s # %s\n",
1481 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1482 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1485 fprintf_unfiltered (file,
1486 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1487 (long) current_gdbarch->deprecated_store_return_value
1488 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1490 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1491 fprintf_unfiltered (file,
1492 "gdbarch_dump: %s # %s\n",
1493 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1494 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1495 fprintf_unfiltered (file,
1496 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1497 DEPRECATED_STORE_STRUCT_RETURN_P ());
1499 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1501 /* Macro might contain `[{}]' when not multi-arch */
1502 fprintf_unfiltered (file,
1503 "gdbarch_dump: %s # %s\n",
1504 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1505 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1510 (long) current_gdbarch->deprecated_store_struct_return
1511 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1513 #ifdef DEPRECATED_TARGET_READ_FP_P
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: %s # %s\n",
1516 "DEPRECATED_TARGET_READ_FP_P()",
1517 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1520 DEPRECATED_TARGET_READ_FP_P ());
1522 #ifdef DEPRECATED_TARGET_READ_FP
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: %s # %s\n",
1525 "DEPRECATED_TARGET_READ_FP()",
1526 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1528 fprintf_unfiltered (file,
1529 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1530 (long) current_gdbarch->deprecated_target_read_fp
1531 /*DEPRECATED_TARGET_READ_FP ()*/);
1533 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1536 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1539 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1541 #ifdef DWARF2_BUILD_FRAME_INFO_P
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: %s # %s\n",
1544 "DWARF2_BUILD_FRAME_INFO_P()",
1545 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1548 DWARF2_BUILD_FRAME_INFO_P ());
1550 #ifdef DWARF2_BUILD_FRAME_INFO
1552 /* Macro might contain `[{}]' when not multi-arch */
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: %s # %s\n",
1555 "DWARF2_BUILD_FRAME_INFO(objfile)",
1556 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1559 fprintf_unfiltered (file,
1560 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1561 (long) current_gdbarch->dwarf2_build_frame_info
1562 /*DWARF2_BUILD_FRAME_INFO ()*/);
1564 #ifdef DWARF2_REG_TO_REGNUM
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: %s # %s\n",
1567 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1568 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1570 fprintf_unfiltered (file,
1571 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1572 (long) current_gdbarch->dwarf2_reg_to_regnum
1573 /*DWARF2_REG_TO_REGNUM ()*/);
1575 #ifdef DWARF_REG_TO_REGNUM
1576 fprintf_unfiltered (file,
1577 "gdbarch_dump: %s # %s\n",
1578 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1579 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1581 fprintf_unfiltered (file,
1582 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1583 (long) current_gdbarch->dwarf_reg_to_regnum
1584 /*DWARF_REG_TO_REGNUM ()*/);
1586 #ifdef ECOFF_REG_TO_REGNUM
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: %s # %s\n",
1589 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1590 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1592 fprintf_unfiltered (file,
1593 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1594 (long) current_gdbarch->ecoff_reg_to_regnum
1595 /*ECOFF_REG_TO_REGNUM ()*/);
1597 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1599 /* Macro might contain `[{}]' when not multi-arch */
1600 fprintf_unfiltered (file,
1601 "gdbarch_dump: %s # %s\n",
1602 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1603 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1606 fprintf_unfiltered (file,
1607 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1608 (long) current_gdbarch->elf_make_msymbol_special
1609 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1611 #ifdef EXTRACT_RETURN_VALUE
1613 /* Macro might contain `[{}]' when not multi-arch */
1614 fprintf_unfiltered (file,
1615 "gdbarch_dump: %s # %s\n",
1616 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1617 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1620 fprintf_unfiltered (file,
1621 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1622 (long) current_gdbarch->extract_return_value
1623 /*EXTRACT_RETURN_VALUE ()*/);
1625 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1626 fprintf_unfiltered (file,
1627 "gdbarch_dump: %s # %s\n",
1628 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1629 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1630 fprintf_unfiltered (file,
1631 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1632 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1634 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1635 fprintf_unfiltered (file,
1636 "gdbarch_dump: %s # %s\n",
1637 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1638 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1640 fprintf_unfiltered (file,
1641 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1642 (long) current_gdbarch->extract_struct_value_address
1643 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1645 #ifdef FIX_CALL_DUMMY_P
1646 fprintf_unfiltered (file,
1647 "gdbarch_dump: %s # %s\n",
1648 "FIX_CALL_DUMMY_P()",
1649 XSTRING (FIX_CALL_DUMMY_P ()));
1650 fprintf_unfiltered (file,
1651 "gdbarch_dump: FIX_CALL_DUMMY_P() = %d\n",
1652 FIX_CALL_DUMMY_P ());
1654 #ifdef FIX_CALL_DUMMY
1656 /* Macro might contain `[{}]' when not multi-arch */
1657 fprintf_unfiltered (file,
1658 "gdbarch_dump: %s # %s\n",
1659 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1660 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1663 fprintf_unfiltered (file,
1664 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1665 (long) current_gdbarch->fix_call_dummy
1666 /*FIX_CALL_DUMMY ()*/);
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: FP0_REGNUM # %s\n",
1671 XSTRING (FP0_REGNUM));
1672 fprintf_unfiltered (file,
1673 "gdbarch_dump: FP0_REGNUM = %d\n",
1676 #ifdef FRAMELESS_FUNCTION_INVOCATION
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: %s # %s\n",
1679 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1680 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1682 fprintf_unfiltered (file,
1683 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1684 (long) current_gdbarch->frameless_function_invocation
1685 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1687 #ifdef FRAME_ARGS_ADDRESS
1688 fprintf_unfiltered (file,
1689 "gdbarch_dump: %s # %s\n",
1690 "FRAME_ARGS_ADDRESS(fi)",
1691 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1693 fprintf_unfiltered (file,
1694 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1695 (long) current_gdbarch->frame_args_address
1696 /*FRAME_ARGS_ADDRESS ()*/);
1698 #ifdef FRAME_ARGS_SKIP
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1701 XSTRING (FRAME_ARGS_SKIP));
1702 fprintf_unfiltered (file,
1703 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1704 (long) FRAME_ARGS_SKIP);
1706 #ifdef FRAME_LOCALS_ADDRESS
1707 fprintf_unfiltered (file,
1708 "gdbarch_dump: %s # %s\n",
1709 "FRAME_LOCALS_ADDRESS(fi)",
1710 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1712 fprintf_unfiltered (file,
1713 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1714 (long) current_gdbarch->frame_locals_address
1715 /*FRAME_LOCALS_ADDRESS ()*/);
1717 #ifdef FRAME_NUM_ARGS
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: %s # %s\n",
1720 "FRAME_NUM_ARGS(frame)",
1721 XSTRING (FRAME_NUM_ARGS (frame)));
1723 fprintf_unfiltered (file,
1724 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1725 (long) current_gdbarch->frame_num_args
1726 /*FRAME_NUM_ARGS ()*/);
1728 #ifdef FUNCTION_START_OFFSET
1729 fprintf_unfiltered (file,
1730 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1731 XSTRING (FUNCTION_START_OFFSET));
1732 fprintf_unfiltered (file,
1733 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1734 (long) FUNCTION_START_OFFSET);
1736 #ifdef GET_LONGJMP_TARGET_P
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: %s # %s\n",
1739 "GET_LONGJMP_TARGET_P()",
1740 XSTRING (GET_LONGJMP_TARGET_P ()));
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1743 GET_LONGJMP_TARGET_P ());
1745 #ifdef GET_LONGJMP_TARGET
1746 fprintf_unfiltered (file,
1747 "gdbarch_dump: %s # %s\n",
1748 "GET_LONGJMP_TARGET(pc)",
1749 XSTRING (GET_LONGJMP_TARGET (pc)));
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1753 (long) current_gdbarch->get_longjmp_target
1754 /*GET_LONGJMP_TARGET ()*/);
1756 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1757 fprintf_unfiltered (file,
1758 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1759 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1760 fprintf_unfiltered (file,
1761 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1762 HAVE_NONSTEPPABLE_WATCHPOINT);
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: %s # %s\n",
1767 "INNER_THAN(lhs, rhs)",
1768 XSTRING (INNER_THAN (lhs, rhs)));
1770 fprintf_unfiltered (file,
1771 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1772 (long) current_gdbarch->inner_than
1775 #ifdef INTEGER_TO_ADDRESS_P
1776 fprintf_unfiltered (file,
1777 "gdbarch_dump: %s # %s\n",
1778 "INTEGER_TO_ADDRESS_P()",
1779 XSTRING (INTEGER_TO_ADDRESS_P ()));
1780 fprintf_unfiltered (file,
1781 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1782 INTEGER_TO_ADDRESS_P ());
1784 #ifdef INTEGER_TO_ADDRESS
1785 fprintf_unfiltered (file,
1786 "gdbarch_dump: %s # %s\n",
1787 "INTEGER_TO_ADDRESS(type, buf)",
1788 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1792 (long) current_gdbarch->integer_to_address
1793 /*INTEGER_TO_ADDRESS ()*/);
1795 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: %s # %s\n",
1798 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1799 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1803 (long) current_gdbarch->in_solib_call_trampoline
1804 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1806 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: %s # %s\n",
1809 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1810 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1814 (long) current_gdbarch->in_solib_return_trampoline
1815 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1817 #ifdef MEMORY_INSERT_BREAKPOINT
1818 fprintf_unfiltered (file,
1819 "gdbarch_dump: %s # %s\n",
1820 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1821 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1825 (long) current_gdbarch->memory_insert_breakpoint
1826 /*MEMORY_INSERT_BREAKPOINT ()*/);
1828 #ifdef MEMORY_REMOVE_BREAKPOINT
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: %s # %s\n",
1831 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1832 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1834 fprintf_unfiltered (file,
1835 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1836 (long) current_gdbarch->memory_remove_breakpoint
1837 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1839 #ifdef NAME_OF_MALLOC
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1842 XSTRING (NAME_OF_MALLOC));
1843 fprintf_unfiltered (file,
1844 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1848 fprintf_unfiltered (file,
1849 "gdbarch_dump: NPC_REGNUM # %s\n",
1850 XSTRING (NPC_REGNUM));
1851 fprintf_unfiltered (file,
1852 "gdbarch_dump: NPC_REGNUM = %d\n",
1855 #ifdef NUM_PSEUDO_REGS
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1858 XSTRING (NUM_PSEUDO_REGS));
1859 fprintf_unfiltered (file,
1860 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: NUM_REGS # %s\n",
1866 XSTRING (NUM_REGS));
1867 fprintf_unfiltered (file,
1868 "gdbarch_dump: NUM_REGS = %d\n",
1871 #ifdef PARM_BOUNDARY
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1874 XSTRING (PARM_BOUNDARY));
1875 fprintf_unfiltered (file,
1876 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1879 #ifdef PC_IN_SIGTRAMP
1880 fprintf_unfiltered (file,
1881 "gdbarch_dump: %s # %s\n",
1882 "PC_IN_SIGTRAMP(pc, name)",
1883 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1885 fprintf_unfiltered (file,
1886 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1887 (long) current_gdbarch->pc_in_sigtramp
1888 /*PC_IN_SIGTRAMP ()*/);
1891 fprintf_unfiltered (file,
1892 "gdbarch_dump: PC_REGNUM # %s\n",
1893 XSTRING (PC_REGNUM));
1894 fprintf_unfiltered (file,
1895 "gdbarch_dump: PC_REGNUM = %d\n",
1898 #ifdef POINTER_TO_ADDRESS
1899 fprintf_unfiltered (file,
1900 "gdbarch_dump: %s # %s\n",
1901 "POINTER_TO_ADDRESS(type, buf)",
1902 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1904 fprintf_unfiltered (file,
1905 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1906 (long) current_gdbarch->pointer_to_address
1907 /*POINTER_TO_ADDRESS ()*/);
1909 #ifdef PREPARE_TO_PROCEED
1910 fprintf_unfiltered (file,
1911 "gdbarch_dump: %s # %s\n",
1912 "PREPARE_TO_PROCEED(select_it)",
1913 XSTRING (PREPARE_TO_PROCEED (select_it)));
1915 fprintf_unfiltered (file,
1916 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1917 (long) current_gdbarch->prepare_to_proceed
1918 /*PREPARE_TO_PROCEED ()*/);
1921 fprintf_unfiltered (file,
1922 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1923 gdbarch_print_float_info_p (current_gdbarch));
1925 fprintf_unfiltered (file,
1926 "gdbarch_dump: print_float_info = 0x%08lx\n",
1927 (long) current_gdbarch->print_float_info);
1929 fprintf_unfiltered (file,
1930 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1931 (long) current_gdbarch->print_registers_info);
1933 fprintf_unfiltered (file,
1934 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1935 gdbarch_print_vector_info_p (current_gdbarch));
1937 fprintf_unfiltered (file,
1938 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1939 (long) current_gdbarch->print_vector_info);
1940 #ifdef PROLOGUE_FRAMELESS_P
1941 fprintf_unfiltered (file,
1942 "gdbarch_dump: %s # %s\n",
1943 "PROLOGUE_FRAMELESS_P(ip)",
1944 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1946 fprintf_unfiltered (file,
1947 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1948 (long) current_gdbarch->prologue_frameless_p
1949 /*PROLOGUE_FRAMELESS_P ()*/);
1952 fprintf_unfiltered (file,
1953 "gdbarch_dump: PS_REGNUM # %s\n",
1954 XSTRING (PS_REGNUM));
1955 fprintf_unfiltered (file,
1956 "gdbarch_dump: PS_REGNUM = %d\n",
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1962 gdbarch_push_dummy_call_p (current_gdbarch));
1964 fprintf_unfiltered (file,
1965 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1966 (long) current_gdbarch->push_dummy_call);
1967 #ifdef REGISTER_BYTE
1968 fprintf_unfiltered (file,
1969 "gdbarch_dump: %s # %s\n",
1970 "REGISTER_BYTE(reg_nr)",
1971 XSTRING (REGISTER_BYTE (reg_nr)));
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1975 (long) current_gdbarch->register_byte
1976 /*REGISTER_BYTE ()*/);
1978 #ifdef REGISTER_BYTES
1979 fprintf_unfiltered (file,
1980 "gdbarch_dump: REGISTER_BYTES # %s\n",
1981 XSTRING (REGISTER_BYTES));
1982 fprintf_unfiltered (file,
1983 "gdbarch_dump: REGISTER_BYTES = %d\n",
1986 #ifdef REGISTER_BYTES_OK_P
1987 fprintf_unfiltered (file,
1988 "gdbarch_dump: %s # %s\n",
1989 "REGISTER_BYTES_OK_P()",
1990 XSTRING (REGISTER_BYTES_OK_P ()));
1991 fprintf_unfiltered (file,
1992 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1993 REGISTER_BYTES_OK_P ());
1995 #ifdef REGISTER_BYTES_OK
1996 fprintf_unfiltered (file,
1997 "gdbarch_dump: %s # %s\n",
1998 "REGISTER_BYTES_OK(nr_bytes)",
1999 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
2001 fprintf_unfiltered (file,
2002 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2003 (long) current_gdbarch->register_bytes_ok
2004 /*REGISTER_BYTES_OK ()*/);
2006 #ifdef REGISTER_CONVERTIBLE
2007 fprintf_unfiltered (file,
2008 "gdbarch_dump: %s # %s\n",
2009 "REGISTER_CONVERTIBLE(nr)",
2010 XSTRING (REGISTER_CONVERTIBLE (nr)));
2012 fprintf_unfiltered (file,
2013 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
2014 (long) current_gdbarch->register_convertible
2015 /*REGISTER_CONVERTIBLE ()*/);
2017 #ifdef REGISTER_CONVERT_TO_RAW
2019 /* Macro might contain `[{}]' when not multi-arch */
2020 fprintf_unfiltered (file,
2021 "gdbarch_dump: %s # %s\n",
2022 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2023 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
2026 fprintf_unfiltered (file,
2027 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2028 (long) current_gdbarch->register_convert_to_raw
2029 /*REGISTER_CONVERT_TO_RAW ()*/);
2031 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2033 /* Macro might contain `[{}]' when not multi-arch */
2034 fprintf_unfiltered (file,
2035 "gdbarch_dump: %s # %s\n",
2036 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2037 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2042 (long) current_gdbarch->register_convert_to_virtual
2043 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2045 #ifdef REGISTER_NAME
2046 fprintf_unfiltered (file,
2047 "gdbarch_dump: %s # %s\n",
2048 "REGISTER_NAME(regnr)",
2049 XSTRING (REGISTER_NAME (regnr)));
2051 fprintf_unfiltered (file,
2052 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2053 (long) current_gdbarch->register_name
2054 /*REGISTER_NAME ()*/);
2056 #ifdef REGISTER_RAW_SIZE
2057 fprintf_unfiltered (file,
2058 "gdbarch_dump: %s # %s\n",
2059 "REGISTER_RAW_SIZE(reg_nr)",
2060 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2062 fprintf_unfiltered (file,
2063 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2064 (long) current_gdbarch->register_raw_size
2065 /*REGISTER_RAW_SIZE ()*/);
2067 #ifdef REGISTER_SIM_REGNO
2068 fprintf_unfiltered (file,
2069 "gdbarch_dump: %s # %s\n",
2070 "REGISTER_SIM_REGNO(reg_nr)",
2071 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2073 fprintf_unfiltered (file,
2074 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2075 (long) current_gdbarch->register_sim_regno
2076 /*REGISTER_SIM_REGNO ()*/);
2078 #ifdef REGISTER_SIZE
2079 fprintf_unfiltered (file,
2080 "gdbarch_dump: REGISTER_SIZE # %s\n",
2081 XSTRING (REGISTER_SIZE));
2082 fprintf_unfiltered (file,
2083 "gdbarch_dump: REGISTER_SIZE = %d\n",
2086 #ifdef REGISTER_TO_VALUE
2088 /* Macro might contain `[{}]' when not multi-arch */
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: %s # %s\n",
2091 "REGISTER_TO_VALUE(regnum, type, from, to)",
2092 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2095 fprintf_unfiltered (file,
2096 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2097 (long) current_gdbarch->register_to_value
2098 /*REGISTER_TO_VALUE ()*/);
2101 fprintf_unfiltered (file,
2102 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2103 gdbarch_register_type_p (current_gdbarch));
2105 fprintf_unfiltered (file,
2106 "gdbarch_dump: register_type = 0x%08lx\n",
2107 (long) current_gdbarch->register_type);
2108 #ifdef REGISTER_VIRTUAL_SIZE
2109 fprintf_unfiltered (file,
2110 "gdbarch_dump: %s # %s\n",
2111 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2112 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2114 fprintf_unfiltered (file,
2115 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2116 (long) current_gdbarch->register_virtual_size
2117 /*REGISTER_VIRTUAL_SIZE ()*/);
2119 #ifdef REGISTER_VIRTUAL_TYPE_P
2120 fprintf_unfiltered (file,
2121 "gdbarch_dump: %s # %s\n",
2122 "REGISTER_VIRTUAL_TYPE_P()",
2123 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2124 fprintf_unfiltered (file,
2125 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2126 REGISTER_VIRTUAL_TYPE_P ());
2128 #ifdef REGISTER_VIRTUAL_TYPE
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: %s # %s\n",
2131 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2132 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2134 fprintf_unfiltered (file,
2135 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2136 (long) current_gdbarch->register_virtual_type
2137 /*REGISTER_VIRTUAL_TYPE ()*/);
2139 #ifdef REG_STRUCT_HAS_ADDR_P
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: %s # %s\n",
2142 "REG_STRUCT_HAS_ADDR_P()",
2143 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2144 fprintf_unfiltered (file,
2145 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2146 REG_STRUCT_HAS_ADDR_P ());
2148 #ifdef REG_STRUCT_HAS_ADDR
2149 fprintf_unfiltered (file,
2150 "gdbarch_dump: %s # %s\n",
2151 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2152 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2154 fprintf_unfiltered (file,
2155 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2156 (long) current_gdbarch->reg_struct_has_addr
2157 /*REG_STRUCT_HAS_ADDR ()*/);
2159 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2161 /* Macro might contain `[{}]' when not multi-arch */
2162 fprintf_unfiltered (file,
2163 "gdbarch_dump: %s # %s\n",
2164 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2165 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2168 fprintf_unfiltered (file,
2169 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2170 (long) current_gdbarch->remote_translate_xfer_address
2171 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2173 #ifdef RETURN_VALUE_ON_STACK
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: %s # %s\n",
2176 "RETURN_VALUE_ON_STACK(type)",
2177 XSTRING (RETURN_VALUE_ON_STACK (type)));
2179 fprintf_unfiltered (file,
2180 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2181 (long) current_gdbarch->return_value_on_stack
2182 /*RETURN_VALUE_ON_STACK ()*/);
2184 #ifdef SAVE_DUMMY_FRAME_TOS_P
2185 fprintf_unfiltered (file,
2186 "gdbarch_dump: %s # %s\n",
2187 "SAVE_DUMMY_FRAME_TOS_P()",
2188 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2189 fprintf_unfiltered (file,
2190 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2191 SAVE_DUMMY_FRAME_TOS_P ());
2193 #ifdef SAVE_DUMMY_FRAME_TOS
2195 /* Macro might contain `[{}]' when not multi-arch */
2196 fprintf_unfiltered (file,
2197 "gdbarch_dump: %s # %s\n",
2198 "SAVE_DUMMY_FRAME_TOS(sp)",
2199 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2202 fprintf_unfiltered (file,
2203 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2204 (long) current_gdbarch->save_dummy_frame_tos
2205 /*SAVE_DUMMY_FRAME_TOS ()*/);
2207 #ifdef SDB_REG_TO_REGNUM
2208 fprintf_unfiltered (file,
2209 "gdbarch_dump: %s # %s\n",
2210 "SDB_REG_TO_REGNUM(sdb_regnr)",
2211 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2213 fprintf_unfiltered (file,
2214 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2215 (long) current_gdbarch->sdb_reg_to_regnum
2216 /*SDB_REG_TO_REGNUM ()*/);
2218 #ifdef SIGTRAMP_END_P
2219 fprintf_unfiltered (file,
2220 "gdbarch_dump: %s # %s\n",
2222 XSTRING (SIGTRAMP_END_P ()));
2223 fprintf_unfiltered (file,
2224 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2228 fprintf_unfiltered (file,
2229 "gdbarch_dump: %s # %s\n",
2231 XSTRING (SIGTRAMP_END (pc)));
2233 fprintf_unfiltered (file,
2234 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2235 (long) current_gdbarch->sigtramp_end
2236 /*SIGTRAMP_END ()*/);
2238 #ifdef SIGTRAMP_START_P
2239 fprintf_unfiltered (file,
2240 "gdbarch_dump: %s # %s\n",
2241 "SIGTRAMP_START_P()",
2242 XSTRING (SIGTRAMP_START_P ()));
2243 fprintf_unfiltered (file,
2244 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2245 SIGTRAMP_START_P ());
2247 #ifdef SIGTRAMP_START
2248 fprintf_unfiltered (file,
2249 "gdbarch_dump: %s # %s\n",
2250 "SIGTRAMP_START(pc)",
2251 XSTRING (SIGTRAMP_START (pc)));
2253 fprintf_unfiltered (file,
2254 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2255 (long) current_gdbarch->sigtramp_start
2256 /*SIGTRAMP_START ()*/);
2258 #ifdef SIZEOF_CALL_DUMMY_WORDS
2259 fprintf_unfiltered (file,
2260 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2261 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
2262 fprintf_unfiltered (file,
2263 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = %d\n",
2264 SIZEOF_CALL_DUMMY_WORDS);
2266 #ifdef SKIP_PROLOGUE
2267 fprintf_unfiltered (file,
2268 "gdbarch_dump: %s # %s\n",
2269 "SKIP_PROLOGUE(ip)",
2270 XSTRING (SKIP_PROLOGUE (ip)));
2272 fprintf_unfiltered (file,
2273 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2274 (long) current_gdbarch->skip_prologue
2275 /*SKIP_PROLOGUE ()*/);
2277 #ifdef SKIP_TRAMPOLINE_CODE
2278 fprintf_unfiltered (file,
2279 "gdbarch_dump: %s # %s\n",
2280 "SKIP_TRAMPOLINE_CODE(pc)",
2281 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2283 fprintf_unfiltered (file,
2284 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2285 (long) current_gdbarch->skip_trampoline_code
2286 /*SKIP_TRAMPOLINE_CODE ()*/);
2288 #ifdef SMASH_TEXT_ADDRESS
2289 fprintf_unfiltered (file,
2290 "gdbarch_dump: %s # %s\n",
2291 "SMASH_TEXT_ADDRESS(addr)",
2292 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2294 fprintf_unfiltered (file,
2295 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2296 (long) current_gdbarch->smash_text_address
2297 /*SMASH_TEXT_ADDRESS ()*/);
2299 #ifdef SOFTWARE_SINGLE_STEP_P
2300 fprintf_unfiltered (file,
2301 "gdbarch_dump: %s # %s\n",
2302 "SOFTWARE_SINGLE_STEP_P()",
2303 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2304 fprintf_unfiltered (file,
2305 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2306 SOFTWARE_SINGLE_STEP_P ());
2308 #ifdef SOFTWARE_SINGLE_STEP
2310 /* Macro might contain `[{}]' when not multi-arch */
2311 fprintf_unfiltered (file,
2312 "gdbarch_dump: %s # %s\n",
2313 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2314 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2317 fprintf_unfiltered (file,
2318 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2319 (long) current_gdbarch->software_single_step
2320 /*SOFTWARE_SINGLE_STEP ()*/);
2323 fprintf_unfiltered (file,
2324 "gdbarch_dump: SP_REGNUM # %s\n",
2325 XSTRING (SP_REGNUM));
2326 fprintf_unfiltered (file,
2327 "gdbarch_dump: SP_REGNUM = %d\n",
2330 #ifdef STAB_REG_TO_REGNUM
2331 fprintf_unfiltered (file,
2332 "gdbarch_dump: %s # %s\n",
2333 "STAB_REG_TO_REGNUM(stab_regnr)",
2334 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2336 fprintf_unfiltered (file,
2337 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2338 (long) current_gdbarch->stab_reg_to_regnum
2339 /*STAB_REG_TO_REGNUM ()*/);
2341 #ifdef STACK_ALIGN_P
2342 fprintf_unfiltered (file,
2343 "gdbarch_dump: %s # %s\n",
2345 XSTRING (STACK_ALIGN_P ()));
2346 fprintf_unfiltered (file,
2347 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2351 fprintf_unfiltered (file,
2352 "gdbarch_dump: %s # %s\n",
2354 XSTRING (STACK_ALIGN (sp)));
2356 fprintf_unfiltered (file,
2357 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2358 (long) current_gdbarch->stack_align
2359 /*STACK_ALIGN ()*/);
2361 #ifdef STORE_RETURN_VALUE
2363 /* Macro might contain `[{}]' when not multi-arch */
2364 fprintf_unfiltered (file,
2365 "gdbarch_dump: %s # %s\n",
2366 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2367 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2370 fprintf_unfiltered (file,
2371 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2372 (long) current_gdbarch->store_return_value
2373 /*STORE_RETURN_VALUE ()*/);
2375 #ifdef TARGET_ADDR_BIT
2376 fprintf_unfiltered (file,
2377 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2378 XSTRING (TARGET_ADDR_BIT));
2379 fprintf_unfiltered (file,
2380 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2383 #ifdef TARGET_ARCHITECTURE
2384 fprintf_unfiltered (file,
2385 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2386 XSTRING (TARGET_ARCHITECTURE));
2387 if (TARGET_ARCHITECTURE != NULL)
2388 fprintf_unfiltered (file,
2389 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2390 TARGET_ARCHITECTURE->printable_name);
2392 #ifdef TARGET_BFD_VMA_BIT
2393 fprintf_unfiltered (file,
2394 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2395 XSTRING (TARGET_BFD_VMA_BIT));
2396 fprintf_unfiltered (file,
2397 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2398 TARGET_BFD_VMA_BIT);
2400 #ifdef TARGET_BYTE_ORDER
2401 fprintf_unfiltered (file,
2402 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2403 XSTRING (TARGET_BYTE_ORDER));
2404 fprintf_unfiltered (file,
2405 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2406 (long) TARGET_BYTE_ORDER);
2408 #ifdef TARGET_CHAR_SIGNED
2409 fprintf_unfiltered (file,
2410 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2411 XSTRING (TARGET_CHAR_SIGNED));
2412 fprintf_unfiltered (file,
2413 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2414 TARGET_CHAR_SIGNED);
2416 #ifdef TARGET_DOUBLE_BIT
2417 fprintf_unfiltered (file,
2418 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2419 XSTRING (TARGET_DOUBLE_BIT));
2420 fprintf_unfiltered (file,
2421 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2424 #ifdef TARGET_DOUBLE_FORMAT
2425 fprintf_unfiltered (file,
2426 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2427 XSTRING (TARGET_DOUBLE_FORMAT));
2428 fprintf_unfiltered (file,
2429 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2430 (TARGET_DOUBLE_FORMAT)->name);
2432 #ifdef TARGET_FLOAT_BIT
2433 fprintf_unfiltered (file,
2434 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2435 XSTRING (TARGET_FLOAT_BIT));
2436 fprintf_unfiltered (file,
2437 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2440 #ifdef TARGET_FLOAT_FORMAT
2441 fprintf_unfiltered (file,
2442 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2443 XSTRING (TARGET_FLOAT_FORMAT));
2444 fprintf_unfiltered (file,
2445 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2446 (TARGET_FLOAT_FORMAT)->name);
2448 #ifdef TARGET_INT_BIT
2449 fprintf_unfiltered (file,
2450 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2451 XSTRING (TARGET_INT_BIT));
2452 fprintf_unfiltered (file,
2453 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2456 #ifdef TARGET_LONG_BIT
2457 fprintf_unfiltered (file,
2458 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2459 XSTRING (TARGET_LONG_BIT));
2460 fprintf_unfiltered (file,
2461 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2464 #ifdef TARGET_LONG_DOUBLE_BIT
2465 fprintf_unfiltered (file,
2466 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2467 XSTRING (TARGET_LONG_DOUBLE_BIT));
2468 fprintf_unfiltered (file,
2469 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2470 TARGET_LONG_DOUBLE_BIT);
2472 #ifdef TARGET_LONG_DOUBLE_FORMAT
2473 fprintf_unfiltered (file,
2474 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2475 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2476 fprintf_unfiltered (file,
2477 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2478 (TARGET_LONG_DOUBLE_FORMAT)->name);
2480 #ifdef TARGET_LONG_LONG_BIT
2481 fprintf_unfiltered (file,
2482 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2483 XSTRING (TARGET_LONG_LONG_BIT));
2484 fprintf_unfiltered (file,
2485 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2486 TARGET_LONG_LONG_BIT);
2489 fprintf_unfiltered (file,
2490 "gdbarch_dump: TARGET_OSABI # %s\n",
2491 XSTRING (TARGET_OSABI));
2492 fprintf_unfiltered (file,
2493 "gdbarch_dump: TARGET_OSABI = %ld\n",
2494 (long) TARGET_OSABI);
2496 #ifdef TARGET_PRINT_INSN
2497 fprintf_unfiltered (file,
2498 "gdbarch_dump: %s # %s\n",
2499 "TARGET_PRINT_INSN(vma, info)",
2500 XSTRING (TARGET_PRINT_INSN (vma, info)));
2502 fprintf_unfiltered (file,
2503 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2504 (long) current_gdbarch->print_insn
2505 /*TARGET_PRINT_INSN ()*/);
2507 #ifdef TARGET_PTR_BIT
2508 fprintf_unfiltered (file,
2509 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2510 XSTRING (TARGET_PTR_BIT));
2511 fprintf_unfiltered (file,
2512 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2515 #ifdef TARGET_READ_PC
2516 fprintf_unfiltered (file,
2517 "gdbarch_dump: %s # %s\n",
2518 "TARGET_READ_PC(ptid)",
2519 XSTRING (TARGET_READ_PC (ptid)));
2521 fprintf_unfiltered (file,
2522 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2523 (long) current_gdbarch->read_pc
2524 /*TARGET_READ_PC ()*/);
2526 #ifdef TARGET_READ_SP
2527 fprintf_unfiltered (file,
2528 "gdbarch_dump: %s # %s\n",
2530 XSTRING (TARGET_READ_SP ()));
2532 fprintf_unfiltered (file,
2533 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2534 (long) current_gdbarch->read_sp
2535 /*TARGET_READ_SP ()*/);
2537 #ifdef TARGET_SHORT_BIT
2538 fprintf_unfiltered (file,
2539 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2540 XSTRING (TARGET_SHORT_BIT));
2541 fprintf_unfiltered (file,
2542 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2545 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2547 /* Macro might contain `[{}]' when not multi-arch */
2548 fprintf_unfiltered (file,
2549 "gdbarch_dump: %s # %s\n",
2550 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2551 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2554 fprintf_unfiltered (file,
2555 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2556 (long) current_gdbarch->virtual_frame_pointer
2557 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2559 #ifdef TARGET_WRITE_PC
2561 /* Macro might contain `[{}]' when not multi-arch */
2562 fprintf_unfiltered (file,
2563 "gdbarch_dump: %s # %s\n",
2564 "TARGET_WRITE_PC(val, ptid)",
2565 XSTRING (TARGET_WRITE_PC (val, ptid)));
2568 fprintf_unfiltered (file,
2569 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2570 (long) current_gdbarch->write_pc
2571 /*TARGET_WRITE_PC ()*/);
2574 fprintf_unfiltered (file,
2575 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2576 gdbarch_unwind_dummy_id_p (current_gdbarch));
2578 fprintf_unfiltered (file,
2579 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2580 (long) current_gdbarch->unwind_dummy_id);
2582 fprintf_unfiltered (file,
2583 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2584 gdbarch_unwind_pc_p (current_gdbarch));
2586 fprintf_unfiltered (file,
2587 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2588 (long) current_gdbarch->unwind_pc);
2589 #ifdef USE_STRUCT_CONVENTION
2590 fprintf_unfiltered (file,
2591 "gdbarch_dump: %s # %s\n",
2592 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2593 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2595 fprintf_unfiltered (file,
2596 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2597 (long) current_gdbarch->use_struct_convention
2598 /*USE_STRUCT_CONVENTION ()*/);
2600 #ifdef VALUE_TO_REGISTER
2602 /* Macro might contain `[{}]' when not multi-arch */
2603 fprintf_unfiltered (file,
2604 "gdbarch_dump: %s # %s\n",
2605 "VALUE_TO_REGISTER(type, regnum, from, to)",
2606 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2609 fprintf_unfiltered (file,
2610 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2611 (long) current_gdbarch->value_to_register
2612 /*VALUE_TO_REGISTER ()*/);
2614 if (current_gdbarch->dump_tdep != NULL)
2615 current_gdbarch->dump_tdep (current_gdbarch, file);
2618 struct gdbarch_tdep *
2619 gdbarch_tdep (struct gdbarch *gdbarch)
2621 if (gdbarch_debug >= 2)
2622 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2623 return gdbarch->tdep;
2627 const struct bfd_arch_info *
2628 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2630 gdb_assert (gdbarch != NULL);
2631 if (gdbarch_debug >= 2)
2632 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2633 return gdbarch->bfd_arch_info;
2637 gdbarch_byte_order (struct gdbarch *gdbarch)
2639 gdb_assert (gdbarch != NULL);
2640 if (gdbarch_debug >= 2)
2641 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2642 return gdbarch->byte_order;
2646 gdbarch_osabi (struct gdbarch *gdbarch)
2648 gdb_assert (gdbarch != NULL);
2649 if (gdbarch_debug >= 2)
2650 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2651 return gdbarch->osabi;
2655 gdbarch_short_bit (struct gdbarch *gdbarch)
2657 gdb_assert (gdbarch != NULL);
2658 /* Skip verify of short_bit, invalid_p == 0 */
2659 if (gdbarch_debug >= 2)
2660 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2661 return gdbarch->short_bit;
2665 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2668 gdbarch->short_bit = short_bit;
2672 gdbarch_int_bit (struct gdbarch *gdbarch)
2674 gdb_assert (gdbarch != NULL);
2675 /* Skip verify of int_bit, invalid_p == 0 */
2676 if (gdbarch_debug >= 2)
2677 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2678 return gdbarch->int_bit;
2682 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2685 gdbarch->int_bit = int_bit;
2689 gdbarch_long_bit (struct gdbarch *gdbarch)
2691 gdb_assert (gdbarch != NULL);
2692 /* Skip verify of long_bit, invalid_p == 0 */
2693 if (gdbarch_debug >= 2)
2694 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2695 return gdbarch->long_bit;
2699 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2702 gdbarch->long_bit = long_bit;
2706 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2708 gdb_assert (gdbarch != NULL);
2709 /* Skip verify of long_long_bit, invalid_p == 0 */
2710 if (gdbarch_debug >= 2)
2711 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2712 return gdbarch->long_long_bit;
2716 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2719 gdbarch->long_long_bit = long_long_bit;
2723 gdbarch_float_bit (struct gdbarch *gdbarch)
2725 gdb_assert (gdbarch != NULL);
2726 /* Skip verify of float_bit, invalid_p == 0 */
2727 if (gdbarch_debug >= 2)
2728 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2729 return gdbarch->float_bit;
2733 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2736 gdbarch->float_bit = float_bit;
2740 gdbarch_double_bit (struct gdbarch *gdbarch)
2742 gdb_assert (gdbarch != NULL);
2743 /* Skip verify of double_bit, invalid_p == 0 */
2744 if (gdbarch_debug >= 2)
2745 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2746 return gdbarch->double_bit;
2750 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2753 gdbarch->double_bit = double_bit;
2757 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2759 gdb_assert (gdbarch != NULL);
2760 /* Skip verify of long_double_bit, invalid_p == 0 */
2761 if (gdbarch_debug >= 2)
2762 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2763 return gdbarch->long_double_bit;
2767 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2768 int long_double_bit)
2770 gdbarch->long_double_bit = long_double_bit;
2774 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2776 gdb_assert (gdbarch != NULL);
2777 /* Skip verify of ptr_bit, invalid_p == 0 */
2778 if (gdbarch_debug >= 2)
2779 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2780 return gdbarch->ptr_bit;
2784 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2787 gdbarch->ptr_bit = ptr_bit;
2791 gdbarch_addr_bit (struct gdbarch *gdbarch)
2793 gdb_assert (gdbarch != NULL);
2794 if (gdbarch->addr_bit == 0)
2795 internal_error (__FILE__, __LINE__,
2796 "gdbarch: gdbarch_addr_bit invalid");
2797 if (gdbarch_debug >= 2)
2798 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2799 return gdbarch->addr_bit;
2803 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2806 gdbarch->addr_bit = addr_bit;
2810 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2812 gdb_assert (gdbarch != NULL);
2813 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2814 if (gdbarch_debug >= 2)
2815 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2816 return gdbarch->bfd_vma_bit;
2820 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2823 gdbarch->bfd_vma_bit = bfd_vma_bit;
2827 gdbarch_char_signed (struct gdbarch *gdbarch)
2829 gdb_assert (gdbarch != NULL);
2830 if (gdbarch->char_signed == -1)
2831 internal_error (__FILE__, __LINE__,
2832 "gdbarch: gdbarch_char_signed invalid");
2833 if (gdbarch_debug >= 2)
2834 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2835 return gdbarch->char_signed;
2839 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2842 gdbarch->char_signed = char_signed;
2846 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2848 gdb_assert (gdbarch != NULL);
2849 if (gdbarch->read_pc == 0)
2850 internal_error (__FILE__, __LINE__,
2851 "gdbarch: gdbarch_read_pc invalid");
2852 if (gdbarch_debug >= 2)
2853 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2854 return gdbarch->read_pc (ptid);
2858 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2859 gdbarch_read_pc_ftype read_pc)
2861 gdbarch->read_pc = read_pc;
2865 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2867 gdb_assert (gdbarch != NULL);
2868 if (gdbarch->write_pc == 0)
2869 internal_error (__FILE__, __LINE__,
2870 "gdbarch: gdbarch_write_pc invalid");
2871 if (gdbarch_debug >= 2)
2872 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2873 gdbarch->write_pc (val, ptid);
2877 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2878 gdbarch_write_pc_ftype write_pc)
2880 gdbarch->write_pc = write_pc;
2884 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2886 gdb_assert (gdbarch != NULL);
2887 return gdbarch->deprecated_target_read_fp != 0;
2891 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2893 gdb_assert (gdbarch != NULL);
2894 if (gdbarch->deprecated_target_read_fp == 0)
2895 internal_error (__FILE__, __LINE__,
2896 "gdbarch: gdbarch_deprecated_target_read_fp invalid");
2897 if (gdbarch_debug >= 2)
2898 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2899 return gdbarch->deprecated_target_read_fp ();
2903 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2904 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2906 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2910 gdbarch_read_sp (struct gdbarch *gdbarch)
2912 gdb_assert (gdbarch != NULL);
2913 if (gdbarch->read_sp == 0)
2914 internal_error (__FILE__, __LINE__,
2915 "gdbarch: gdbarch_read_sp invalid");
2916 if (gdbarch_debug >= 2)
2917 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2918 return gdbarch->read_sp ();
2922 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2923 gdbarch_read_sp_ftype read_sp)
2925 gdbarch->read_sp = read_sp;
2929 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2931 gdb_assert (gdbarch != NULL);
2932 return gdbarch->deprecated_dummy_write_sp != 0;
2936 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2938 gdb_assert (gdbarch != NULL);
2939 if (gdbarch->deprecated_dummy_write_sp == 0)
2940 internal_error (__FILE__, __LINE__,
2941 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
2942 if (gdbarch_debug >= 2)
2943 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2944 gdbarch->deprecated_dummy_write_sp (val);
2948 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2949 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
2951 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
2955 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2957 gdb_assert (gdbarch != NULL);
2958 if (gdbarch->virtual_frame_pointer == 0)
2959 internal_error (__FILE__, __LINE__,
2960 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2961 if (gdbarch_debug >= 2)
2962 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2963 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2967 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2968 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2970 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2974 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2976 gdb_assert (gdbarch != NULL);
2977 return gdbarch->pseudo_register_read != 0;
2981 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2983 gdb_assert (gdbarch != NULL);
2984 if (gdbarch->pseudo_register_read == 0)
2985 internal_error (__FILE__, __LINE__,
2986 "gdbarch: gdbarch_pseudo_register_read invalid");
2987 if (gdbarch_debug >= 2)
2988 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2989 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2993 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2994 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2996 gdbarch->pseudo_register_read = pseudo_register_read;
3000 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
3002 gdb_assert (gdbarch != NULL);
3003 return gdbarch->pseudo_register_write != 0;
3007 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
3009 gdb_assert (gdbarch != NULL);
3010 if (gdbarch->pseudo_register_write == 0)
3011 internal_error (__FILE__, __LINE__,
3012 "gdbarch: gdbarch_pseudo_register_write invalid");
3013 if (gdbarch_debug >= 2)
3014 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3015 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
3019 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3020 gdbarch_pseudo_register_write_ftype pseudo_register_write)
3022 gdbarch->pseudo_register_write = pseudo_register_write;
3026 gdbarch_num_regs (struct gdbarch *gdbarch)
3028 gdb_assert (gdbarch != NULL);
3029 if (gdbarch->num_regs == -1)
3030 internal_error (__FILE__, __LINE__,
3031 "gdbarch: gdbarch_num_regs invalid");
3032 if (gdbarch_debug >= 2)
3033 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3034 return gdbarch->num_regs;
3038 set_gdbarch_num_regs (struct gdbarch *gdbarch,
3041 gdbarch->num_regs = num_regs;
3045 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3047 gdb_assert (gdbarch != NULL);
3048 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3049 if (gdbarch_debug >= 2)
3050 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3051 return gdbarch->num_pseudo_regs;
3055 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3056 int num_pseudo_regs)
3058 gdbarch->num_pseudo_regs = num_pseudo_regs;
3062 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3064 gdb_assert (gdbarch != NULL);
3065 /* Skip verify of sp_regnum, invalid_p == 0 */
3066 if (gdbarch_debug >= 2)
3067 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3068 return gdbarch->sp_regnum;
3072 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3075 gdbarch->sp_regnum = sp_regnum;
3079 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3081 gdb_assert (gdbarch != NULL);
3082 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3083 if (gdbarch_debug >= 2)
3084 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3085 return gdbarch->deprecated_fp_regnum;
3089 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3090 int deprecated_fp_regnum)
3092 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3096 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3098 gdb_assert (gdbarch != NULL);
3099 /* Skip verify of pc_regnum, invalid_p == 0 */
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3102 return gdbarch->pc_regnum;
3106 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3109 gdbarch->pc_regnum = pc_regnum;
3113 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3115 gdb_assert (gdbarch != NULL);
3116 /* Skip verify of ps_regnum, invalid_p == 0 */
3117 if (gdbarch_debug >= 2)
3118 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3119 return gdbarch->ps_regnum;
3123 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3126 gdbarch->ps_regnum = ps_regnum;
3130 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3132 gdb_assert (gdbarch != NULL);
3133 /* Skip verify of fp0_regnum, invalid_p == 0 */
3134 if (gdbarch_debug >= 2)
3135 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3136 return gdbarch->fp0_regnum;
3140 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3143 gdbarch->fp0_regnum = fp0_regnum;
3147 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3149 gdb_assert (gdbarch != NULL);
3150 /* Skip verify of npc_regnum, invalid_p == 0 */
3151 if (gdbarch_debug >= 2)
3152 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3153 return gdbarch->npc_regnum;
3157 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3160 gdbarch->npc_regnum = npc_regnum;
3164 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3166 gdb_assert (gdbarch != NULL);
3167 if (gdbarch->stab_reg_to_regnum == 0)
3168 internal_error (__FILE__, __LINE__,
3169 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3170 if (gdbarch_debug >= 2)
3171 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3172 return gdbarch->stab_reg_to_regnum (stab_regnr);
3176 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3177 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3179 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3183 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3185 gdb_assert (gdbarch != NULL);
3186 if (gdbarch->ecoff_reg_to_regnum == 0)
3187 internal_error (__FILE__, __LINE__,
3188 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3189 if (gdbarch_debug >= 2)
3190 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3191 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3195 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3196 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3198 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3202 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3204 gdb_assert (gdbarch != NULL);
3205 if (gdbarch->dwarf_reg_to_regnum == 0)
3206 internal_error (__FILE__, __LINE__,
3207 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3208 if (gdbarch_debug >= 2)
3209 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3210 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3214 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3215 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3217 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3221 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3223 gdb_assert (gdbarch != NULL);
3224 if (gdbarch->sdb_reg_to_regnum == 0)
3225 internal_error (__FILE__, __LINE__,
3226 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3227 if (gdbarch_debug >= 2)
3228 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3229 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3233 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3234 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3236 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3240 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3242 gdb_assert (gdbarch != NULL);
3243 if (gdbarch->dwarf2_reg_to_regnum == 0)
3244 internal_error (__FILE__, __LINE__,
3245 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3246 if (gdbarch_debug >= 2)
3247 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3248 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3252 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3253 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3255 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3259 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3261 gdb_assert (gdbarch != NULL);
3262 if (gdbarch->register_name == 0)
3263 internal_error (__FILE__, __LINE__,
3264 "gdbarch: gdbarch_register_name invalid");
3265 if (gdbarch_debug >= 2)
3266 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3267 return gdbarch->register_name (regnr);
3271 set_gdbarch_register_name (struct gdbarch *gdbarch,
3272 gdbarch_register_name_ftype register_name)
3274 gdbarch->register_name = register_name;
3278 gdbarch_register_size (struct gdbarch *gdbarch)
3280 gdb_assert (gdbarch != NULL);
3281 if (gdbarch_debug >= 2)
3282 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
3283 return gdbarch->register_size;
3287 set_gdbarch_register_size (struct gdbarch *gdbarch,
3290 gdbarch->register_size = register_size;
3294 gdbarch_register_bytes (struct gdbarch *gdbarch)
3296 gdb_assert (gdbarch != NULL);
3297 if (gdbarch_debug >= 2)
3298 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3299 return gdbarch->register_bytes;
3303 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3306 gdbarch->register_bytes = register_bytes;
3310 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3312 gdb_assert (gdbarch != NULL);
3313 if (gdbarch->register_byte == 0)
3314 internal_error (__FILE__, __LINE__,
3315 "gdbarch: gdbarch_register_byte invalid");
3316 if (gdbarch_debug >= 2)
3317 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3318 return gdbarch->register_byte (reg_nr);
3322 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3323 gdbarch_register_byte_ftype register_byte)
3325 gdbarch->register_byte = register_byte;
3329 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3331 gdb_assert (gdbarch != NULL);
3332 if (gdbarch->register_raw_size == 0)
3333 internal_error (__FILE__, __LINE__,
3334 "gdbarch: gdbarch_register_raw_size invalid");
3335 if (gdbarch_debug >= 2)
3336 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3337 return gdbarch->register_raw_size (reg_nr);
3341 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3342 gdbarch_register_raw_size_ftype register_raw_size)
3344 gdbarch->register_raw_size = register_raw_size;
3348 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3350 gdb_assert (gdbarch != NULL);
3351 return gdbarch->deprecated_max_register_raw_size != 0;
3355 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3357 gdb_assert (gdbarch != NULL);
3358 if (gdbarch_debug >= 2)
3359 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3360 return gdbarch->deprecated_max_register_raw_size;
3364 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3365 int deprecated_max_register_raw_size)
3367 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3371 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3373 gdb_assert (gdbarch != NULL);
3374 if (gdbarch->register_virtual_size == 0)
3375 internal_error (__FILE__, __LINE__,
3376 "gdbarch: gdbarch_register_virtual_size invalid");
3377 if (gdbarch_debug >= 2)
3378 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3379 return gdbarch->register_virtual_size (reg_nr);
3383 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3384 gdbarch_register_virtual_size_ftype register_virtual_size)
3386 gdbarch->register_virtual_size = register_virtual_size;
3390 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3392 gdb_assert (gdbarch != NULL);
3393 return gdbarch->deprecated_max_register_virtual_size != 0;
3397 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3399 gdb_assert (gdbarch != NULL);
3400 if (gdbarch_debug >= 2)
3401 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3402 return gdbarch->deprecated_max_register_virtual_size;
3406 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3407 int deprecated_max_register_virtual_size)
3409 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3413 gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
3415 gdb_assert (gdbarch != NULL);
3416 return gdbarch->register_virtual_type != 0;
3420 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3422 gdb_assert (gdbarch != NULL);
3423 if (gdbarch->register_virtual_type == 0)
3424 internal_error (__FILE__, __LINE__,
3425 "gdbarch: gdbarch_register_virtual_type invalid");
3426 if (gdbarch_debug >= 2)
3427 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3428 return gdbarch->register_virtual_type (reg_nr);
3432 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3433 gdbarch_register_virtual_type_ftype register_virtual_type)
3435 gdbarch->register_virtual_type = register_virtual_type;
3439 gdbarch_register_type_p (struct gdbarch *gdbarch)
3441 gdb_assert (gdbarch != NULL);
3442 return gdbarch->register_type != 0;
3446 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3448 gdb_assert (gdbarch != NULL);
3449 if (gdbarch->register_type == 0)
3450 internal_error (__FILE__, __LINE__,
3451 "gdbarch: gdbarch_register_type invalid");
3452 if (gdbarch_debug >= 2)
3453 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3454 return gdbarch->register_type (gdbarch, reg_nr);
3458 set_gdbarch_register_type (struct gdbarch *gdbarch,
3459 gdbarch_register_type_ftype register_type)
3461 gdbarch->register_type = register_type;
3465 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3467 gdb_assert (gdbarch != NULL);
3468 return gdbarch->deprecated_do_registers_info != 0;
3472 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3474 gdb_assert (gdbarch != NULL);
3475 if (gdbarch->deprecated_do_registers_info == 0)
3476 internal_error (__FILE__, __LINE__,
3477 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3478 if (gdbarch_debug >= 2)
3479 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3480 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3484 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3485 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3487 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3491 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3493 gdb_assert (gdbarch != NULL);
3494 if (gdbarch->print_registers_info == 0)
3495 internal_error (__FILE__, __LINE__,
3496 "gdbarch: gdbarch_print_registers_info invalid");
3497 if (gdbarch_debug >= 2)
3498 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3499 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3503 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3504 gdbarch_print_registers_info_ftype print_registers_info)
3506 gdbarch->print_registers_info = print_registers_info;
3510 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3512 gdb_assert (gdbarch != NULL);
3513 return gdbarch->print_float_info != 0;
3517 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3519 gdb_assert (gdbarch != NULL);
3520 if (gdbarch->print_float_info == 0)
3521 internal_error (__FILE__, __LINE__,
3522 "gdbarch: gdbarch_print_float_info invalid");
3523 if (gdbarch_debug >= 2)
3524 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3525 gdbarch->print_float_info (gdbarch, file, frame, args);
3529 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3530 gdbarch_print_float_info_ftype print_float_info)
3532 gdbarch->print_float_info = print_float_info;
3536 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3538 gdb_assert (gdbarch != NULL);
3539 return gdbarch->print_vector_info != 0;
3543 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3545 gdb_assert (gdbarch != NULL);
3546 if (gdbarch->print_vector_info == 0)
3547 internal_error (__FILE__, __LINE__,
3548 "gdbarch: gdbarch_print_vector_info invalid");
3549 if (gdbarch_debug >= 2)
3550 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3551 gdbarch->print_vector_info (gdbarch, file, frame, args);
3555 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3556 gdbarch_print_vector_info_ftype print_vector_info)
3558 gdbarch->print_vector_info = print_vector_info;
3562 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3564 gdb_assert (gdbarch != NULL);
3565 if (gdbarch->register_sim_regno == 0)
3566 internal_error (__FILE__, __LINE__,
3567 "gdbarch: gdbarch_register_sim_regno invalid");
3568 if (gdbarch_debug >= 2)
3569 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3570 return gdbarch->register_sim_regno (reg_nr);
3574 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3575 gdbarch_register_sim_regno_ftype register_sim_regno)
3577 gdbarch->register_sim_regno = register_sim_regno;
3581 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3583 gdb_assert (gdbarch != NULL);
3584 return gdbarch->register_bytes_ok != 0;
3588 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3590 gdb_assert (gdbarch != NULL);
3591 if (gdbarch->register_bytes_ok == 0)
3592 internal_error (__FILE__, __LINE__,
3593 "gdbarch: gdbarch_register_bytes_ok invalid");
3594 if (gdbarch_debug >= 2)
3595 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3596 return gdbarch->register_bytes_ok (nr_bytes);
3600 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3601 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3603 gdbarch->register_bytes_ok = register_bytes_ok;
3607 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3609 gdb_assert (gdbarch != NULL);
3610 if (gdbarch->cannot_fetch_register == 0)
3611 internal_error (__FILE__, __LINE__,
3612 "gdbarch: gdbarch_cannot_fetch_register invalid");
3613 if (gdbarch_debug >= 2)
3614 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3615 return gdbarch->cannot_fetch_register (regnum);
3619 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3620 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3622 gdbarch->cannot_fetch_register = cannot_fetch_register;
3626 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3628 gdb_assert (gdbarch != NULL);
3629 if (gdbarch->cannot_store_register == 0)
3630 internal_error (__FILE__, __LINE__,
3631 "gdbarch: gdbarch_cannot_store_register invalid");
3632 if (gdbarch_debug >= 2)
3633 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3634 return gdbarch->cannot_store_register (regnum);
3638 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3639 gdbarch_cannot_store_register_ftype cannot_store_register)
3641 gdbarch->cannot_store_register = cannot_store_register;
3645 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3647 gdb_assert (gdbarch != NULL);
3648 return gdbarch->get_longjmp_target != 0;
3652 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3654 gdb_assert (gdbarch != NULL);
3655 if (gdbarch->get_longjmp_target == 0)
3656 internal_error (__FILE__, __LINE__,
3657 "gdbarch: gdbarch_get_longjmp_target invalid");
3658 if (gdbarch_debug >= 2)
3659 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3660 return gdbarch->get_longjmp_target (pc);
3664 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3665 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3667 gdbarch->get_longjmp_target = get_longjmp_target;
3671 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3673 gdb_assert (gdbarch != NULL);
3674 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3675 if (gdbarch_debug >= 2)
3676 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3677 return gdbarch->deprecated_use_generic_dummy_frames;
3681 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3682 int deprecated_use_generic_dummy_frames)
3684 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3688 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3690 gdb_assert (gdbarch != NULL);
3691 /* Skip verify of call_dummy_location, invalid_p == 0 */
3692 if (gdbarch_debug >= 2)
3693 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3694 return gdbarch->call_dummy_location;
3698 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3699 int call_dummy_location)
3701 gdbarch->call_dummy_location = call_dummy_location;
3705 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3707 gdb_assert (gdbarch != NULL);
3708 if (gdbarch->call_dummy_address == 0)
3709 internal_error (__FILE__, __LINE__,
3710 "gdbarch: gdbarch_call_dummy_address invalid");
3711 if (gdbarch_debug >= 2)
3712 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3713 return gdbarch->call_dummy_address ();
3717 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3718 gdbarch_call_dummy_address_ftype call_dummy_address)
3720 gdbarch->call_dummy_address = call_dummy_address;
3724 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3726 gdb_assert (gdbarch != NULL);
3727 if (gdbarch_debug >= 2)
3728 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3729 return gdbarch->call_dummy_start_offset;
3733 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3734 CORE_ADDR call_dummy_start_offset)
3736 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3740 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3742 gdb_assert (gdbarch != NULL);
3743 if (gdbarch_debug >= 2)
3744 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3745 return gdbarch->call_dummy_breakpoint_offset;
3749 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3750 CORE_ADDR call_dummy_breakpoint_offset)
3752 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3756 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3758 gdb_assert (gdbarch != NULL);
3759 if (gdbarch_debug >= 2)
3760 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3761 return gdbarch->call_dummy_length;
3765 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3766 int call_dummy_length)
3768 gdbarch->call_dummy_length = call_dummy_length;
3772 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3774 gdb_assert (gdbarch != NULL);
3775 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3779 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3781 gdb_assert (gdbarch != NULL);
3782 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3783 internal_error (__FILE__, __LINE__,
3784 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3785 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3786 if (gdbarch_debug >= 2)
3787 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3788 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3792 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3793 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3795 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3799 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3801 gdb_assert (gdbarch != NULL);
3802 /* Skip verify of call_dummy_words, invalid_p == 0 */
3803 if (gdbarch_debug >= 2)
3804 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3805 return gdbarch->call_dummy_words;
3809 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3810 LONGEST * call_dummy_words)
3812 gdbarch->call_dummy_words = call_dummy_words;
3816 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3818 gdb_assert (gdbarch != NULL);
3819 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3820 if (gdbarch_debug >= 2)
3821 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3822 return gdbarch->sizeof_call_dummy_words;
3826 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3827 int sizeof_call_dummy_words)
3829 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3833 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3835 gdb_assert (gdbarch != NULL);
3836 return gdbarch->deprecated_call_dummy_stack_adjust != 0;
3840 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3842 gdb_assert (gdbarch != NULL);
3843 if (gdbarch_debug >= 2)
3844 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3845 return gdbarch->deprecated_call_dummy_stack_adjust;
3849 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3850 int deprecated_call_dummy_stack_adjust)
3852 gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
3856 gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch)
3858 gdb_assert (gdbarch != NULL);
3859 return gdbarch->fix_call_dummy != 0;
3863 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)
3865 gdb_assert (gdbarch != NULL);
3866 if (gdbarch->fix_call_dummy == 0)
3867 internal_error (__FILE__, __LINE__,
3868 "gdbarch: gdbarch_fix_call_dummy invalid");
3869 if (gdbarch_debug >= 2)
3870 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3871 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3875 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3876 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3878 gdbarch->fix_call_dummy = fix_call_dummy;
3882 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3884 gdb_assert (gdbarch != NULL);
3885 return gdbarch->deprecated_init_frame_pc_first != 0;
3889 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3891 gdb_assert (gdbarch != NULL);
3892 if (gdbarch->deprecated_init_frame_pc_first == 0)
3893 internal_error (__FILE__, __LINE__,
3894 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3895 if (gdbarch_debug >= 2)
3896 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3897 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3901 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3902 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3904 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3908 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3910 gdb_assert (gdbarch != NULL);
3911 return gdbarch->deprecated_init_frame_pc != 0;
3915 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3917 gdb_assert (gdbarch != NULL);
3918 if (gdbarch->deprecated_init_frame_pc == 0)
3919 internal_error (__FILE__, __LINE__,
3920 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3921 if (gdbarch_debug >= 2)
3922 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3923 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3927 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3928 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3930 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3934 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3936 gdb_assert (gdbarch != NULL);
3937 if (gdbarch_debug >= 2)
3938 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3939 return gdbarch->believe_pcc_promotion;
3943 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3944 int believe_pcc_promotion)
3946 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3950 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3952 gdb_assert (gdbarch != NULL);
3953 if (gdbarch_debug >= 2)
3954 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3955 return gdbarch->believe_pcc_promotion_type;
3959 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3960 int believe_pcc_promotion_type)
3962 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3966 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3968 gdb_assert (gdbarch != NULL);
3969 return gdbarch->deprecated_get_saved_register != 0;
3973 gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
3975 gdb_assert (gdbarch != NULL);
3976 if (gdbarch->deprecated_get_saved_register == 0)
3977 internal_error (__FILE__, __LINE__,
3978 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
3979 if (gdbarch_debug >= 2)
3980 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3981 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3985 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3986 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3988 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3992 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3994 gdb_assert (gdbarch != NULL);
3995 if (gdbarch->register_convertible == 0)
3996 internal_error (__FILE__, __LINE__,
3997 "gdbarch: gdbarch_register_convertible invalid");
3998 if (gdbarch_debug >= 2)
3999 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
4000 return gdbarch->register_convertible (nr);
4004 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
4005 gdbarch_register_convertible_ftype register_convertible)
4007 gdbarch->register_convertible = register_convertible;
4011 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4013 gdb_assert (gdbarch != NULL);
4014 if (gdbarch->register_convert_to_virtual == 0)
4015 internal_error (__FILE__, __LINE__,
4016 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4017 if (gdbarch_debug >= 2)
4018 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
4019 gdbarch->register_convert_to_virtual (regnum, type, from, to);
4023 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
4024 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
4026 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
4030 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4032 gdb_assert (gdbarch != NULL);
4033 if (gdbarch->register_convert_to_raw == 0)
4034 internal_error (__FILE__, __LINE__,
4035 "gdbarch: gdbarch_register_convert_to_raw invalid");
4036 if (gdbarch_debug >= 2)
4037 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
4038 gdbarch->register_convert_to_raw (type, regnum, from, to);
4042 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
4043 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
4045 gdbarch->register_convert_to_raw = register_convert_to_raw;
4049 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4051 gdb_assert (gdbarch != NULL);
4052 if (gdbarch->convert_register_p == 0)
4053 internal_error (__FILE__, __LINE__,
4054 "gdbarch: gdbarch_convert_register_p invalid");
4055 if (gdbarch_debug >= 2)
4056 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4057 return gdbarch->convert_register_p (regnum);
4061 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4062 gdbarch_convert_register_p_ftype convert_register_p)
4064 gdbarch->convert_register_p = convert_register_p;
4068 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4070 gdb_assert (gdbarch != NULL);
4071 if (gdbarch->register_to_value == 0)
4072 internal_error (__FILE__, __LINE__,
4073 "gdbarch: gdbarch_register_to_value invalid");
4074 if (gdbarch_debug >= 2)
4075 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4076 gdbarch->register_to_value (regnum, type, from, to);
4080 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4081 gdbarch_register_to_value_ftype register_to_value)
4083 gdbarch->register_to_value = register_to_value;
4087 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4089 gdb_assert (gdbarch != NULL);
4090 if (gdbarch->value_to_register == 0)
4091 internal_error (__FILE__, __LINE__,
4092 "gdbarch: gdbarch_value_to_register invalid");
4093 if (gdbarch_debug >= 2)
4094 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4095 gdbarch->value_to_register (type, regnum, from, to);
4099 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4100 gdbarch_value_to_register_ftype value_to_register)
4102 gdbarch->value_to_register = value_to_register;
4106 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4108 gdb_assert (gdbarch != NULL);
4109 if (gdbarch->pointer_to_address == 0)
4110 internal_error (__FILE__, __LINE__,
4111 "gdbarch: gdbarch_pointer_to_address invalid");
4112 if (gdbarch_debug >= 2)
4113 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4114 return gdbarch->pointer_to_address (type, buf);
4118 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4119 gdbarch_pointer_to_address_ftype pointer_to_address)
4121 gdbarch->pointer_to_address = pointer_to_address;
4125 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4127 gdb_assert (gdbarch != NULL);
4128 if (gdbarch->address_to_pointer == 0)
4129 internal_error (__FILE__, __LINE__,
4130 "gdbarch: gdbarch_address_to_pointer invalid");
4131 if (gdbarch_debug >= 2)
4132 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4133 gdbarch->address_to_pointer (type, buf, addr);
4137 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4138 gdbarch_address_to_pointer_ftype address_to_pointer)
4140 gdbarch->address_to_pointer = address_to_pointer;
4144 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4146 gdb_assert (gdbarch != NULL);
4147 return gdbarch->integer_to_address != 0;
4151 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4153 gdb_assert (gdbarch != NULL);
4154 if (gdbarch->integer_to_address == 0)
4155 internal_error (__FILE__, __LINE__,
4156 "gdbarch: gdbarch_integer_to_address invalid");
4157 if (gdbarch_debug >= 2)
4158 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4159 return gdbarch->integer_to_address (type, buf);
4163 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4164 gdbarch_integer_to_address_ftype integer_to_address)
4166 gdbarch->integer_to_address = integer_to_address;
4170 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4172 gdb_assert (gdbarch != NULL);
4173 if (gdbarch->return_value_on_stack == 0)
4174 internal_error (__FILE__, __LINE__,
4175 "gdbarch: gdbarch_return_value_on_stack invalid");
4176 if (gdbarch_debug >= 2)
4177 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4178 return gdbarch->return_value_on_stack (type);
4182 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4183 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4185 gdbarch->return_value_on_stack = return_value_on_stack;
4189 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
4191 gdb_assert (gdbarch != NULL);
4192 return gdbarch->deprecated_push_arguments != 0;
4196 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4198 gdb_assert (gdbarch != NULL);
4199 if (gdbarch->deprecated_push_arguments == 0)
4200 internal_error (__FILE__, __LINE__,
4201 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4202 if (gdbarch_debug >= 2)
4203 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
4204 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
4208 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
4209 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
4211 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
4215 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
4217 gdb_assert (gdbarch != NULL);
4218 return gdbarch->push_dummy_call != 0;
4222 gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4224 gdb_assert (gdbarch != NULL);
4225 if (gdbarch->push_dummy_call == 0)
4226 internal_error (__FILE__, __LINE__,
4227 "gdbarch: gdbarch_push_dummy_call invalid");
4228 if (gdbarch_debug >= 2)
4229 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
4230 return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr);
4234 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
4235 gdbarch_push_dummy_call_ftype push_dummy_call)
4237 gdbarch->push_dummy_call = push_dummy_call;
4241 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
4243 gdb_assert (gdbarch != NULL);
4244 return gdbarch->deprecated_push_dummy_frame != 0;
4248 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
4250 gdb_assert (gdbarch != NULL);
4251 if (gdbarch->deprecated_push_dummy_frame == 0)
4252 internal_error (__FILE__, __LINE__,
4253 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4254 if (gdbarch_debug >= 2)
4255 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
4256 gdbarch->deprecated_push_dummy_frame ();
4260 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
4261 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
4263 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
4267 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
4269 gdb_assert (gdbarch != NULL);
4270 return gdbarch->deprecated_push_return_address != 0;
4274 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4276 gdb_assert (gdbarch != NULL);
4277 if (gdbarch->deprecated_push_return_address == 0)
4278 internal_error (__FILE__, __LINE__,
4279 "gdbarch: gdbarch_deprecated_push_return_address invalid");
4280 if (gdbarch_debug >= 2)
4281 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
4282 return gdbarch->deprecated_push_return_address (pc, sp);
4286 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
4287 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
4289 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
4293 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
4295 gdb_assert (gdbarch != NULL);
4296 return gdbarch->deprecated_pop_frame != 0;
4300 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
4302 gdb_assert (gdbarch != NULL);
4303 if (gdbarch->deprecated_pop_frame == 0)
4304 internal_error (__FILE__, __LINE__,
4305 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4306 if (gdbarch_debug >= 2)
4307 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4308 gdbarch->deprecated_pop_frame ();
4312 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4313 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
4315 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
4319 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4321 gdb_assert (gdbarch != NULL);
4322 return gdbarch->deprecated_store_struct_return != 0;
4326 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4328 gdb_assert (gdbarch != NULL);
4329 if (gdbarch->deprecated_store_struct_return == 0)
4330 internal_error (__FILE__, __LINE__,
4331 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4332 if (gdbarch_debug >= 2)
4333 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4334 gdbarch->deprecated_store_struct_return (addr, sp);
4338 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4339 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
4341 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
4345 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4347 gdb_assert (gdbarch != NULL);
4348 if (gdbarch->extract_return_value == 0)
4349 internal_error (__FILE__, __LINE__,
4350 "gdbarch: gdbarch_extract_return_value invalid");
4351 if (gdbarch_debug >= 2)
4352 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4353 gdbarch->extract_return_value (type, regcache, valbuf);
4357 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4358 gdbarch_extract_return_value_ftype extract_return_value)
4360 gdbarch->extract_return_value = extract_return_value;
4364 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4366 gdb_assert (gdbarch != NULL);
4367 if (gdbarch->store_return_value == 0)
4368 internal_error (__FILE__, __LINE__,
4369 "gdbarch: gdbarch_store_return_value invalid");
4370 if (gdbarch_debug >= 2)
4371 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4372 gdbarch->store_return_value (type, regcache, valbuf);
4376 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4377 gdbarch_store_return_value_ftype store_return_value)
4379 gdbarch->store_return_value = store_return_value;
4383 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4385 gdb_assert (gdbarch != NULL);
4386 if (gdbarch->deprecated_extract_return_value == 0)
4387 internal_error (__FILE__, __LINE__,
4388 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4389 if (gdbarch_debug >= 2)
4390 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4391 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4395 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4396 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4398 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4402 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4404 gdb_assert (gdbarch != NULL);
4405 if (gdbarch->deprecated_store_return_value == 0)
4406 internal_error (__FILE__, __LINE__,
4407 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4408 if (gdbarch_debug >= 2)
4409 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4410 gdbarch->deprecated_store_return_value (type, valbuf);
4414 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4415 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4417 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4421 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4423 gdb_assert (gdbarch != NULL);
4424 return gdbarch->extract_struct_value_address != 0;
4428 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4430 gdb_assert (gdbarch != NULL);
4431 if (gdbarch->extract_struct_value_address == 0)
4432 internal_error (__FILE__, __LINE__,
4433 "gdbarch: gdbarch_extract_struct_value_address invalid");
4434 if (gdbarch_debug >= 2)
4435 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4436 return gdbarch->extract_struct_value_address (regcache);
4440 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4441 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4443 gdbarch->extract_struct_value_address = extract_struct_value_address;
4447 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4449 gdb_assert (gdbarch != NULL);
4450 return gdbarch->deprecated_extract_struct_value_address != 0;
4454 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4456 gdb_assert (gdbarch != NULL);
4457 if (gdbarch->deprecated_extract_struct_value_address == 0)
4458 internal_error (__FILE__, __LINE__,
4459 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4460 if (gdbarch_debug >= 2)
4461 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4462 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4466 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4467 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4469 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4473 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4475 gdb_assert (gdbarch != NULL);
4476 if (gdbarch->use_struct_convention == 0)
4477 internal_error (__FILE__, __LINE__,
4478 "gdbarch: gdbarch_use_struct_convention invalid");
4479 if (gdbarch_debug >= 2)
4480 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4481 return gdbarch->use_struct_convention (gcc_p, value_type);
4485 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4486 gdbarch_use_struct_convention_ftype use_struct_convention)
4488 gdbarch->use_struct_convention = use_struct_convention;
4492 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4494 gdb_assert (gdbarch != NULL);
4495 return gdbarch->deprecated_frame_init_saved_regs != 0;
4499 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4501 gdb_assert (gdbarch != NULL);
4502 if (gdbarch->deprecated_frame_init_saved_regs == 0)
4503 internal_error (__FILE__, __LINE__,
4504 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4505 if (gdbarch_debug >= 2)
4506 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4507 gdbarch->deprecated_frame_init_saved_regs (frame);
4511 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4512 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4514 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4518 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4520 gdb_assert (gdbarch != NULL);
4521 return gdbarch->deprecated_init_extra_frame_info != 0;
4525 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4527 gdb_assert (gdbarch != NULL);
4528 if (gdbarch->deprecated_init_extra_frame_info == 0)
4529 internal_error (__FILE__, __LINE__,
4530 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4531 if (gdbarch_debug >= 2)
4532 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4533 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4537 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4538 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4540 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4544 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4546 gdb_assert (gdbarch != NULL);
4547 if (gdbarch->skip_prologue == 0)
4548 internal_error (__FILE__, __LINE__,
4549 "gdbarch: gdbarch_skip_prologue invalid");
4550 if (gdbarch_debug >= 2)
4551 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4552 return gdbarch->skip_prologue (ip);
4556 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4557 gdbarch_skip_prologue_ftype skip_prologue)
4559 gdbarch->skip_prologue = skip_prologue;
4563 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4565 gdb_assert (gdbarch != NULL);
4566 if (gdbarch->prologue_frameless_p == 0)
4567 internal_error (__FILE__, __LINE__,
4568 "gdbarch: gdbarch_prologue_frameless_p invalid");
4569 if (gdbarch_debug >= 2)
4570 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4571 return gdbarch->prologue_frameless_p (ip);
4575 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4576 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4578 gdbarch->prologue_frameless_p = prologue_frameless_p;
4582 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4584 gdb_assert (gdbarch != NULL);
4585 if (gdbarch->inner_than == 0)
4586 internal_error (__FILE__, __LINE__,
4587 "gdbarch: gdbarch_inner_than invalid");
4588 if (gdbarch_debug >= 2)
4589 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4590 return gdbarch->inner_than (lhs, rhs);
4594 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4595 gdbarch_inner_than_ftype inner_than)
4597 gdbarch->inner_than = inner_than;
4600 const unsigned char *
4601 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4603 gdb_assert (gdbarch != NULL);
4604 if (gdbarch->breakpoint_from_pc == 0)
4605 internal_error (__FILE__, __LINE__,
4606 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4607 if (gdbarch_debug >= 2)
4608 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4609 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4613 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4614 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4616 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4620 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4622 gdb_assert (gdbarch != NULL);
4623 if (gdbarch->memory_insert_breakpoint == 0)
4624 internal_error (__FILE__, __LINE__,
4625 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4626 if (gdbarch_debug >= 2)
4627 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4628 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4632 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4633 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4635 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4639 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4641 gdb_assert (gdbarch != NULL);
4642 if (gdbarch->memory_remove_breakpoint == 0)
4643 internal_error (__FILE__, __LINE__,
4644 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4645 if (gdbarch_debug >= 2)
4646 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4647 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4651 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4652 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4654 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4658 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4660 gdb_assert (gdbarch != NULL);
4661 if (gdbarch->decr_pc_after_break == -1)
4662 internal_error (__FILE__, __LINE__,
4663 "gdbarch: gdbarch_decr_pc_after_break invalid");
4664 if (gdbarch_debug >= 2)
4665 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4666 return gdbarch->decr_pc_after_break;
4670 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4671 CORE_ADDR decr_pc_after_break)
4673 gdbarch->decr_pc_after_break = decr_pc_after_break;
4677 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4679 gdb_assert (gdbarch != NULL);
4680 if (gdbarch->prepare_to_proceed == 0)
4681 internal_error (__FILE__, __LINE__,
4682 "gdbarch: gdbarch_prepare_to_proceed invalid");
4683 if (gdbarch_debug >= 2)
4684 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4685 return gdbarch->prepare_to_proceed (select_it);
4689 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4690 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4692 gdbarch->prepare_to_proceed = prepare_to_proceed;
4696 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4698 gdb_assert (gdbarch != NULL);
4699 if (gdbarch->function_start_offset == -1)
4700 internal_error (__FILE__, __LINE__,
4701 "gdbarch: gdbarch_function_start_offset invalid");
4702 if (gdbarch_debug >= 2)
4703 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4704 return gdbarch->function_start_offset;
4708 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4709 CORE_ADDR function_start_offset)
4711 gdbarch->function_start_offset = function_start_offset;
4715 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4717 gdb_assert (gdbarch != NULL);
4718 if (gdbarch->remote_translate_xfer_address == 0)
4719 internal_error (__FILE__, __LINE__,
4720 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4721 if (gdbarch_debug >= 2)
4722 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4723 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4727 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4728 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4730 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4734 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4736 gdb_assert (gdbarch != NULL);
4737 if (gdbarch->frame_args_skip == -1)
4738 internal_error (__FILE__, __LINE__,
4739 "gdbarch: gdbarch_frame_args_skip invalid");
4740 if (gdbarch_debug >= 2)
4741 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4742 return gdbarch->frame_args_skip;
4746 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4747 CORE_ADDR frame_args_skip)
4749 gdbarch->frame_args_skip = frame_args_skip;
4753 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4755 gdb_assert (gdbarch != NULL);
4756 if (gdbarch->frameless_function_invocation == 0)
4757 internal_error (__FILE__, __LINE__,
4758 "gdbarch: gdbarch_frameless_function_invocation invalid");
4759 if (gdbarch_debug >= 2)
4760 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4761 return gdbarch->frameless_function_invocation (fi);
4765 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4766 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4768 gdbarch->frameless_function_invocation = frameless_function_invocation;
4772 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4774 gdb_assert (gdbarch != NULL);
4775 return gdbarch->deprecated_frame_chain != 0;
4779 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4781 gdb_assert (gdbarch != NULL);
4782 if (gdbarch->deprecated_frame_chain == 0)
4783 internal_error (__FILE__, __LINE__,
4784 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4785 if (gdbarch_debug >= 2)
4786 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4787 return gdbarch->deprecated_frame_chain (frame);
4791 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4792 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4794 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4798 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4800 gdb_assert (gdbarch != NULL);
4801 return gdbarch->deprecated_frame_chain_valid != 0;
4805 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4807 gdb_assert (gdbarch != NULL);
4808 if (gdbarch->deprecated_frame_chain_valid == 0)
4809 internal_error (__FILE__, __LINE__,
4810 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4811 if (gdbarch_debug >= 2)
4812 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4813 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4817 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4818 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4820 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4824 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4826 gdb_assert (gdbarch != NULL);
4827 return gdbarch->deprecated_frame_saved_pc != 0;
4831 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4833 gdb_assert (gdbarch != NULL);
4834 if (gdbarch->deprecated_frame_saved_pc == 0)
4835 internal_error (__FILE__, __LINE__,
4836 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4837 if (gdbarch_debug >= 2)
4838 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4839 return gdbarch->deprecated_frame_saved_pc (fi);
4843 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4844 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4846 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4850 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4852 gdb_assert (gdbarch != NULL);
4853 return gdbarch->unwind_pc != 0;
4857 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4859 gdb_assert (gdbarch != NULL);
4860 if (gdbarch->unwind_pc == 0)
4861 internal_error (__FILE__, __LINE__,
4862 "gdbarch: gdbarch_unwind_pc invalid");
4863 if (gdbarch_debug >= 2)
4864 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4865 return gdbarch->unwind_pc (gdbarch, next_frame);
4869 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4870 gdbarch_unwind_pc_ftype unwind_pc)
4872 gdbarch->unwind_pc = unwind_pc;
4876 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4878 gdb_assert (gdbarch != NULL);
4879 if (gdbarch->frame_args_address == 0)
4880 internal_error (__FILE__, __LINE__,
4881 "gdbarch: gdbarch_frame_args_address invalid");
4882 if (gdbarch_debug >= 2)
4883 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4884 return gdbarch->frame_args_address (fi);
4888 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4889 gdbarch_frame_args_address_ftype frame_args_address)
4891 gdbarch->frame_args_address = frame_args_address;
4895 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4897 gdb_assert (gdbarch != NULL);
4898 if (gdbarch->frame_locals_address == 0)
4899 internal_error (__FILE__, __LINE__,
4900 "gdbarch: gdbarch_frame_locals_address invalid");
4901 if (gdbarch_debug >= 2)
4902 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4903 return gdbarch->frame_locals_address (fi);
4907 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4908 gdbarch_frame_locals_address_ftype frame_locals_address)
4910 gdbarch->frame_locals_address = frame_locals_address;
4914 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4916 gdb_assert (gdbarch != NULL);
4917 return gdbarch->deprecated_saved_pc_after_call != 0;
4921 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4923 gdb_assert (gdbarch != NULL);
4924 if (gdbarch->deprecated_saved_pc_after_call == 0)
4925 internal_error (__FILE__, __LINE__,
4926 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
4927 if (gdbarch_debug >= 2)
4928 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4929 return gdbarch->deprecated_saved_pc_after_call (frame);
4933 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4934 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4936 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4940 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4942 gdb_assert (gdbarch != NULL);
4943 if (gdbarch->frame_num_args == 0)
4944 internal_error (__FILE__, __LINE__,
4945 "gdbarch: gdbarch_frame_num_args invalid");
4946 if (gdbarch_debug >= 2)
4947 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4948 return gdbarch->frame_num_args (frame);
4952 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4953 gdbarch_frame_num_args_ftype frame_num_args)
4955 gdbarch->frame_num_args = frame_num_args;
4959 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4961 gdb_assert (gdbarch != NULL);
4962 return gdbarch->stack_align != 0;
4966 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4968 gdb_assert (gdbarch != NULL);
4969 if (gdbarch->stack_align == 0)
4970 internal_error (__FILE__, __LINE__,
4971 "gdbarch: gdbarch_stack_align invalid");
4972 if (gdbarch_debug >= 2)
4973 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4974 return gdbarch->stack_align (sp);
4978 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4979 gdbarch_stack_align_ftype stack_align)
4981 gdbarch->stack_align = stack_align;
4985 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4987 gdb_assert (gdbarch != NULL);
4988 return gdbarch->frame_align != 0;
4992 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4994 gdb_assert (gdbarch != NULL);
4995 if (gdbarch->frame_align == 0)
4996 internal_error (__FILE__, __LINE__,
4997 "gdbarch: gdbarch_frame_align invalid");
4998 if (gdbarch_debug >= 2)
4999 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
5000 return gdbarch->frame_align (gdbarch, address);
5004 set_gdbarch_frame_align (struct gdbarch *gdbarch,
5005 gdbarch_frame_align_ftype frame_align)
5007 gdbarch->frame_align = frame_align;
5011 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
5013 gdb_assert (gdbarch != NULL);
5014 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5015 if (gdbarch_debug >= 2)
5016 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5017 return gdbarch->deprecated_extra_stack_alignment_needed;
5021 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
5022 int deprecated_extra_stack_alignment_needed)
5024 gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
5028 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
5030 gdb_assert (gdbarch != NULL);
5031 return gdbarch->reg_struct_has_addr != 0;
5035 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
5037 gdb_assert (gdbarch != NULL);
5038 if (gdbarch->reg_struct_has_addr == 0)
5039 internal_error (__FILE__, __LINE__,
5040 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5041 if (gdbarch_debug >= 2)
5042 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
5043 return gdbarch->reg_struct_has_addr (gcc_p, type);
5047 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
5048 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
5050 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
5054 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
5056 gdb_assert (gdbarch != NULL);
5057 return gdbarch->save_dummy_frame_tos != 0;
5061 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
5063 gdb_assert (gdbarch != NULL);
5064 if (gdbarch->save_dummy_frame_tos == 0)
5065 internal_error (__FILE__, __LINE__,
5066 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5067 if (gdbarch_debug >= 2)
5068 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
5069 gdbarch->save_dummy_frame_tos (sp);
5073 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
5074 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
5076 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
5080 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
5082 gdb_assert (gdbarch != NULL);
5083 return gdbarch->unwind_dummy_id != 0;
5087 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
5089 gdb_assert (gdbarch != NULL);
5090 if (gdbarch->unwind_dummy_id == 0)
5091 internal_error (__FILE__, __LINE__,
5092 "gdbarch: gdbarch_unwind_dummy_id invalid");
5093 if (gdbarch_debug >= 2)
5094 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
5095 return gdbarch->unwind_dummy_id (gdbarch, info);
5099 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
5100 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
5102 gdbarch->unwind_dummy_id = unwind_dummy_id;
5106 gdbarch_parm_boundary (struct gdbarch *gdbarch)
5108 gdb_assert (gdbarch != NULL);
5109 if (gdbarch_debug >= 2)
5110 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5111 return gdbarch->parm_boundary;
5115 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5118 gdbarch->parm_boundary = parm_boundary;
5121 const struct floatformat *
5122 gdbarch_float_format (struct gdbarch *gdbarch)
5124 gdb_assert (gdbarch != NULL);
5125 if (gdbarch_debug >= 2)
5126 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5127 return gdbarch->float_format;
5131 set_gdbarch_float_format (struct gdbarch *gdbarch,
5132 const struct floatformat * float_format)
5134 gdbarch->float_format = float_format;
5137 const struct floatformat *
5138 gdbarch_double_format (struct gdbarch *gdbarch)
5140 gdb_assert (gdbarch != NULL);
5141 if (gdbarch_debug >= 2)
5142 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5143 return gdbarch->double_format;
5147 set_gdbarch_double_format (struct gdbarch *gdbarch,
5148 const struct floatformat * double_format)
5150 gdbarch->double_format = double_format;
5153 const struct floatformat *
5154 gdbarch_long_double_format (struct gdbarch *gdbarch)
5156 gdb_assert (gdbarch != NULL);
5157 if (gdbarch_debug >= 2)
5158 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5159 return gdbarch->long_double_format;
5163 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5164 const struct floatformat * long_double_format)
5166 gdbarch->long_double_format = long_double_format;
5170 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5172 gdb_assert (gdbarch != NULL);
5173 if (gdbarch->convert_from_func_ptr_addr == 0)
5174 internal_error (__FILE__, __LINE__,
5175 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5176 if (gdbarch_debug >= 2)
5177 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5178 return gdbarch->convert_from_func_ptr_addr (addr);
5182 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5183 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5185 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5189 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5191 gdb_assert (gdbarch != NULL);
5192 if (gdbarch->addr_bits_remove == 0)
5193 internal_error (__FILE__, __LINE__,
5194 "gdbarch: gdbarch_addr_bits_remove invalid");
5195 if (gdbarch_debug >= 2)
5196 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5197 return gdbarch->addr_bits_remove (addr);
5201 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5202 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5204 gdbarch->addr_bits_remove = addr_bits_remove;
5208 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5210 gdb_assert (gdbarch != NULL);
5211 if (gdbarch->smash_text_address == 0)
5212 internal_error (__FILE__, __LINE__,
5213 "gdbarch: gdbarch_smash_text_address invalid");
5214 if (gdbarch_debug >= 2)
5215 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5216 return gdbarch->smash_text_address (addr);
5220 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5221 gdbarch_smash_text_address_ftype smash_text_address)
5223 gdbarch->smash_text_address = smash_text_address;
5227 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5229 gdb_assert (gdbarch != NULL);
5230 return gdbarch->software_single_step != 0;
5234 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5236 gdb_assert (gdbarch != NULL);
5237 if (gdbarch->software_single_step == 0)
5238 internal_error (__FILE__, __LINE__,
5239 "gdbarch: gdbarch_software_single_step invalid");
5240 if (gdbarch_debug >= 2)
5241 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5242 gdbarch->software_single_step (sig, insert_breakpoints_p);
5246 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5247 gdbarch_software_single_step_ftype software_single_step)
5249 gdbarch->software_single_step = software_single_step;
5253 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5255 gdb_assert (gdbarch != NULL);
5256 if (gdbarch->print_insn == 0)
5257 internal_error (__FILE__, __LINE__,
5258 "gdbarch: gdbarch_print_insn invalid");
5259 if (gdbarch_debug >= 2)
5260 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5261 return gdbarch->print_insn (vma, info);
5265 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5266 gdbarch_print_insn_ftype print_insn)
5268 gdbarch->print_insn = print_insn;
5272 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5274 gdb_assert (gdbarch != NULL);
5275 if (gdbarch->skip_trampoline_code == 0)
5276 internal_error (__FILE__, __LINE__,
5277 "gdbarch: gdbarch_skip_trampoline_code invalid");
5278 if (gdbarch_debug >= 2)
5279 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5280 return gdbarch->skip_trampoline_code (pc);
5284 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5285 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5287 gdbarch->skip_trampoline_code = skip_trampoline_code;
5291 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5293 gdb_assert (gdbarch != NULL);
5294 if (gdbarch->in_solib_call_trampoline == 0)
5295 internal_error (__FILE__, __LINE__,
5296 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5297 if (gdbarch_debug >= 2)
5298 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5299 return gdbarch->in_solib_call_trampoline (pc, name);
5303 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5304 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5306 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5310 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5312 gdb_assert (gdbarch != NULL);
5313 if (gdbarch->in_solib_return_trampoline == 0)
5314 internal_error (__FILE__, __LINE__,
5315 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5316 if (gdbarch_debug >= 2)
5317 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5318 return gdbarch->in_solib_return_trampoline (pc, name);
5322 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5323 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5325 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5329 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5331 gdb_assert (gdbarch != NULL);
5332 if (gdbarch->pc_in_sigtramp == 0)
5333 internal_error (__FILE__, __LINE__,
5334 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5335 if (gdbarch_debug >= 2)
5336 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5337 return gdbarch->pc_in_sigtramp (pc, name);
5341 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5342 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5344 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5348 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5350 gdb_assert (gdbarch != NULL);
5351 return gdbarch->sigtramp_start != 0;
5355 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5357 gdb_assert (gdbarch != NULL);
5358 if (gdbarch->sigtramp_start == 0)
5359 internal_error (__FILE__, __LINE__,
5360 "gdbarch: gdbarch_sigtramp_start invalid");
5361 if (gdbarch_debug >= 2)
5362 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5363 return gdbarch->sigtramp_start (pc);
5367 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5368 gdbarch_sigtramp_start_ftype sigtramp_start)
5370 gdbarch->sigtramp_start = sigtramp_start;
5374 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5376 gdb_assert (gdbarch != NULL);
5377 return gdbarch->sigtramp_end != 0;
5381 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5383 gdb_assert (gdbarch != NULL);
5384 if (gdbarch->sigtramp_end == 0)
5385 internal_error (__FILE__, __LINE__,
5386 "gdbarch: gdbarch_sigtramp_end invalid");
5387 if (gdbarch_debug >= 2)
5388 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5389 return gdbarch->sigtramp_end (pc);
5393 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5394 gdbarch_sigtramp_end_ftype sigtramp_end)
5396 gdbarch->sigtramp_end = sigtramp_end;
5400 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5402 gdb_assert (gdbarch != NULL);
5403 if (gdbarch->in_function_epilogue_p == 0)
5404 internal_error (__FILE__, __LINE__,
5405 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5406 if (gdbarch_debug >= 2)
5407 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5408 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5412 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5413 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5415 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5419 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5421 gdb_assert (gdbarch != NULL);
5422 if (gdbarch->construct_inferior_arguments == 0)
5423 internal_error (__FILE__, __LINE__,
5424 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5425 if (gdbarch_debug >= 2)
5426 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5427 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5431 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5432 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5434 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5438 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5440 gdb_assert (gdbarch != NULL);
5441 return gdbarch->dwarf2_build_frame_info != 0;
5445 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5447 gdb_assert (gdbarch != NULL);
5448 if (gdbarch->dwarf2_build_frame_info == 0)
5449 internal_error (__FILE__, __LINE__,
5450 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5451 if (gdbarch_debug >= 2)
5452 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5453 gdbarch->dwarf2_build_frame_info (objfile);
5457 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5458 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5460 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5464 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5466 gdb_assert (gdbarch != NULL);
5467 if (gdbarch->elf_make_msymbol_special == 0)
5468 internal_error (__FILE__, __LINE__,
5469 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5470 if (gdbarch_debug >= 2)
5471 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5472 gdbarch->elf_make_msymbol_special (sym, msym);
5476 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5477 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5479 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5483 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5485 gdb_assert (gdbarch != NULL);
5486 if (gdbarch->coff_make_msymbol_special == 0)
5487 internal_error (__FILE__, __LINE__,
5488 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5489 if (gdbarch_debug >= 2)
5490 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5491 gdbarch->coff_make_msymbol_special (val, msym);
5495 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5496 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5498 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5502 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5504 gdb_assert (gdbarch != NULL);
5505 /* Skip verify of name_of_malloc, invalid_p == 0 */
5506 if (gdbarch_debug >= 2)
5507 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5508 return gdbarch->name_of_malloc;
5512 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5513 const char * name_of_malloc)
5515 gdbarch->name_of_malloc = name_of_malloc;
5519 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5521 gdb_assert (gdbarch != NULL);
5522 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5523 if (gdbarch_debug >= 2)
5524 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5525 return gdbarch->cannot_step_breakpoint;
5529 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5530 int cannot_step_breakpoint)
5532 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5536 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5538 gdb_assert (gdbarch != NULL);
5539 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5540 if (gdbarch_debug >= 2)
5541 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5542 return gdbarch->have_nonsteppable_watchpoint;
5546 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5547 int have_nonsteppable_watchpoint)
5549 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5553 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5555 gdb_assert (gdbarch != NULL);
5556 return gdbarch->address_class_type_flags != 0;
5560 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5562 gdb_assert (gdbarch != NULL);
5563 if (gdbarch->address_class_type_flags == 0)
5564 internal_error (__FILE__, __LINE__,
5565 "gdbarch: gdbarch_address_class_type_flags invalid");
5566 if (gdbarch_debug >= 2)
5567 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5568 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5572 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5573 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5575 gdbarch->address_class_type_flags = address_class_type_flags;
5579 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5581 gdb_assert (gdbarch != NULL);
5582 return gdbarch->address_class_type_flags_to_name != 0;
5586 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5588 gdb_assert (gdbarch != NULL);
5589 if (gdbarch->address_class_type_flags_to_name == 0)
5590 internal_error (__FILE__, __LINE__,
5591 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5592 if (gdbarch_debug >= 2)
5593 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5594 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5598 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5599 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5601 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5605 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5607 gdb_assert (gdbarch != NULL);
5608 return gdbarch->address_class_name_to_type_flags != 0;
5612 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5614 gdb_assert (gdbarch != NULL);
5615 if (gdbarch->address_class_name_to_type_flags == 0)
5616 internal_error (__FILE__, __LINE__,
5617 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5618 if (gdbarch_debug >= 2)
5619 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5620 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5624 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5625 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5627 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5631 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5633 gdb_assert (gdbarch != NULL);
5634 if (gdbarch->register_reggroup_p == 0)
5635 internal_error (__FILE__, __LINE__,
5636 "gdbarch: gdbarch_register_reggroup_p invalid");
5637 if (gdbarch_debug >= 2)
5638 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5639 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5643 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5644 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5646 gdbarch->register_reggroup_p = register_reggroup_p;
5650 /* Keep a registry of per-architecture data-pointers required by GDB
5657 gdbarch_data_init_ftype *init;
5658 gdbarch_data_free_ftype *free;
5661 struct gdbarch_data_registration
5663 struct gdbarch_data *data;
5664 struct gdbarch_data_registration *next;
5667 struct gdbarch_data_registry
5670 struct gdbarch_data_registration *registrations;
5673 struct gdbarch_data_registry gdbarch_data_registry =
5678 struct gdbarch_data *
5679 register_gdbarch_data (gdbarch_data_init_ftype *init,
5680 gdbarch_data_free_ftype *free)
5682 struct gdbarch_data_registration **curr;
5683 /* Append the new registraration. */
5684 for (curr = &gdbarch_data_registry.registrations;
5686 curr = &(*curr)->next);
5687 (*curr) = XMALLOC (struct gdbarch_data_registration);
5688 (*curr)->next = NULL;
5689 (*curr)->data = XMALLOC (struct gdbarch_data);
5690 (*curr)->data->index = gdbarch_data_registry.nr++;
5691 (*curr)->data->init = init;
5692 (*curr)->data->init_p = 1;
5693 (*curr)->data->free = free;
5694 return (*curr)->data;
5698 /* Create/delete the gdbarch data vector. */
5701 alloc_gdbarch_data (struct gdbarch *gdbarch)
5703 gdb_assert (gdbarch->data == NULL);
5704 gdbarch->nr_data = gdbarch_data_registry.nr;
5705 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5709 free_gdbarch_data (struct gdbarch *gdbarch)
5711 struct gdbarch_data_registration *rego;
5712 gdb_assert (gdbarch->data != NULL);
5713 for (rego = gdbarch_data_registry.registrations;
5717 struct gdbarch_data *data = rego->data;
5718 gdb_assert (data->index < gdbarch->nr_data);
5719 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5721 data->free (gdbarch, gdbarch->data[data->index]);
5722 gdbarch->data[data->index] = NULL;
5725 xfree (gdbarch->data);
5726 gdbarch->data = NULL;
5730 /* Initialize the current value of the specified per-architecture
5734 set_gdbarch_data (struct gdbarch *gdbarch,
5735 struct gdbarch_data *data,
5738 gdb_assert (data->index < gdbarch->nr_data);
5739 if (gdbarch->data[data->index] != NULL)
5741 gdb_assert (data->free != NULL);
5742 data->free (gdbarch, gdbarch->data[data->index]);
5744 gdbarch->data[data->index] = pointer;
5747 /* Return the current value of the specified per-architecture
5751 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5753 gdb_assert (data->index < gdbarch->nr_data);
5754 /* The data-pointer isn't initialized, call init() to get a value but
5755 only if the architecture initializaiton has completed. Otherwise
5756 punt - hope that the caller knows what they are doing. */
5757 if (gdbarch->data[data->index] == NULL
5758 && gdbarch->initialized_p)
5760 /* Be careful to detect an initialization cycle. */
5761 gdb_assert (data->init_p);
5763 gdb_assert (data->init != NULL);
5764 gdbarch->data[data->index] = data->init (gdbarch);
5766 gdb_assert (gdbarch->data[data->index] != NULL);
5768 return gdbarch->data[data->index];
5773 /* Keep a registry of swapped data required by GDB modules. */
5778 struct gdbarch_swap_registration *source;
5779 struct gdbarch_swap *next;
5782 struct gdbarch_swap_registration
5785 unsigned long sizeof_data;
5786 gdbarch_swap_ftype *init;
5787 struct gdbarch_swap_registration *next;
5790 struct gdbarch_swap_registry
5793 struct gdbarch_swap_registration *registrations;
5796 struct gdbarch_swap_registry gdbarch_swap_registry =
5802 register_gdbarch_swap (void *data,
5803 unsigned long sizeof_data,
5804 gdbarch_swap_ftype *init)
5806 struct gdbarch_swap_registration **rego;
5807 for (rego = &gdbarch_swap_registry.registrations;
5809 rego = &(*rego)->next);
5810 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5811 (*rego)->next = NULL;
5812 (*rego)->init = init;
5813 (*rego)->data = data;
5814 (*rego)->sizeof_data = sizeof_data;
5818 clear_gdbarch_swap (struct gdbarch *gdbarch)
5820 struct gdbarch_swap *curr;
5821 for (curr = gdbarch->swap;
5825 memset (curr->source->data, 0, curr->source->sizeof_data);
5830 init_gdbarch_swap (struct gdbarch *gdbarch)
5832 struct gdbarch_swap_registration *rego;
5833 struct gdbarch_swap **curr = &gdbarch->swap;
5834 for (rego = gdbarch_swap_registry.registrations;
5838 if (rego->data != NULL)
5840 (*curr) = XMALLOC (struct gdbarch_swap);
5841 (*curr)->source = rego;
5842 (*curr)->swap = xmalloc (rego->sizeof_data);
5843 (*curr)->next = NULL;
5844 curr = &(*curr)->next;
5846 if (rego->init != NULL)
5852 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5854 struct gdbarch_swap *curr;
5855 for (curr = gdbarch->swap;
5858 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5862 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5864 struct gdbarch_swap *curr;
5865 for (curr = gdbarch->swap;
5868 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5872 /* Keep a registry of the architectures known by GDB. */
5874 struct gdbarch_registration
5876 enum bfd_architecture bfd_architecture;
5877 gdbarch_init_ftype *init;
5878 gdbarch_dump_tdep_ftype *dump_tdep;
5879 struct gdbarch_list *arches;
5880 struct gdbarch_registration *next;
5883 static struct gdbarch_registration *gdbarch_registry = NULL;
5886 append_name (const char ***buf, int *nr, const char *name)
5888 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5894 gdbarch_printable_names (void)
5898 /* Accumulate a list of names based on the registed list of
5900 enum bfd_architecture a;
5902 const char **arches = NULL;
5903 struct gdbarch_registration *rego;
5904 for (rego = gdbarch_registry;
5908 const struct bfd_arch_info *ap;
5909 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5911 internal_error (__FILE__, __LINE__,
5912 "gdbarch_architecture_names: multi-arch unknown");
5915 append_name (&arches, &nr_arches, ap->printable_name);
5920 append_name (&arches, &nr_arches, NULL);
5924 /* Just return all the architectures that BFD knows. Assume that
5925 the legacy architecture framework supports them. */
5926 return bfd_arch_list ();
5931 gdbarch_register (enum bfd_architecture bfd_architecture,
5932 gdbarch_init_ftype *init,
5933 gdbarch_dump_tdep_ftype *dump_tdep)
5935 struct gdbarch_registration **curr;
5936 const struct bfd_arch_info *bfd_arch_info;
5937 /* Check that BFD recognizes this architecture */
5938 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5939 if (bfd_arch_info == NULL)
5941 internal_error (__FILE__, __LINE__,
5942 "gdbarch: Attempt to register unknown architecture (%d)",
5945 /* Check that we haven't seen this architecture before */
5946 for (curr = &gdbarch_registry;
5948 curr = &(*curr)->next)
5950 if (bfd_architecture == (*curr)->bfd_architecture)
5951 internal_error (__FILE__, __LINE__,
5952 "gdbarch: Duplicate registraration of architecture (%s)",
5953 bfd_arch_info->printable_name);
5957 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5958 bfd_arch_info->printable_name,
5961 (*curr) = XMALLOC (struct gdbarch_registration);
5962 (*curr)->bfd_architecture = bfd_architecture;
5963 (*curr)->init = init;
5964 (*curr)->dump_tdep = dump_tdep;
5965 (*curr)->arches = NULL;
5966 (*curr)->next = NULL;
5967 /* When non- multi-arch, install whatever target dump routine we've
5968 been provided - hopefully that routine has been written correctly
5969 and works regardless of multi-arch. */
5970 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5971 && startup_gdbarch.dump_tdep == NULL)
5972 startup_gdbarch.dump_tdep = dump_tdep;
5976 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5977 gdbarch_init_ftype *init)
5979 gdbarch_register (bfd_architecture, init, NULL);
5983 /* Look for an architecture using gdbarch_info. Base search on only
5984 BFD_ARCH_INFO and BYTE_ORDER. */
5986 struct gdbarch_list *
5987 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5988 const struct gdbarch_info *info)
5990 for (; arches != NULL; arches = arches->next)
5992 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5994 if (info->byte_order != arches->gdbarch->byte_order)
5996 if (info->osabi != arches->gdbarch->osabi)
6004 /* Update the current architecture. Return ZERO if the update request
6008 gdbarch_update_p (struct gdbarch_info info)
6010 struct gdbarch *new_gdbarch;
6011 struct gdbarch *old_gdbarch;
6012 struct gdbarch_registration *rego;
6014 /* Fill in missing parts of the INFO struct using a number of
6015 sources: ``set ...''; INFOabfd supplied; existing target. */
6017 /* ``(gdb) set architecture ...'' */
6018 if (info.bfd_arch_info == NULL
6019 && !TARGET_ARCHITECTURE_AUTO)
6020 info.bfd_arch_info = TARGET_ARCHITECTURE;
6021 if (info.bfd_arch_info == NULL
6022 && info.abfd != NULL
6023 && bfd_get_arch (info.abfd) != bfd_arch_unknown
6024 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
6025 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
6026 if (info.bfd_arch_info == NULL)
6027 info.bfd_arch_info = TARGET_ARCHITECTURE;
6029 /* ``(gdb) set byte-order ...'' */
6030 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6031 && !TARGET_BYTE_ORDER_AUTO)
6032 info.byte_order = TARGET_BYTE_ORDER;
6033 /* From the INFO struct. */
6034 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6035 && info.abfd != NULL)
6036 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
6037 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
6038 : BFD_ENDIAN_UNKNOWN);
6039 /* From the current target. */
6040 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
6041 info.byte_order = TARGET_BYTE_ORDER;
6043 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6044 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6045 info.osabi = gdbarch_lookup_osabi (info.abfd);
6046 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6047 info.osabi = current_gdbarch->osabi;
6049 /* Must have found some sort of architecture. */
6050 gdb_assert (info.bfd_arch_info != NULL);
6054 fprintf_unfiltered (gdb_stdlog,
6055 "gdbarch_update: info.bfd_arch_info %s\n",
6056 (info.bfd_arch_info != NULL
6057 ? info.bfd_arch_info->printable_name
6059 fprintf_unfiltered (gdb_stdlog,
6060 "gdbarch_update: info.byte_order %d (%s)\n",
6062 (info.byte_order == BFD_ENDIAN_BIG ? "big"
6063 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
6065 fprintf_unfiltered (gdb_stdlog,
6066 "gdbarch_update: info.osabi %d (%s)\n",
6067 info.osabi, gdbarch_osabi_name (info.osabi));
6068 fprintf_unfiltered (gdb_stdlog,
6069 "gdbarch_update: info.abfd 0x%lx\n",
6071 fprintf_unfiltered (gdb_stdlog,
6072 "gdbarch_update: info.tdep_info 0x%lx\n",
6073 (long) info.tdep_info);
6076 /* Find the target that knows about this architecture. */
6077 for (rego = gdbarch_registry;
6080 if (rego->bfd_architecture == info.bfd_arch_info->arch)
6085 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
6089 /* Swap the data belonging to the old target out setting the
6090 installed data to zero. This stops the ->init() function trying
6091 to refer to the previous architecture's global data structures. */
6092 swapout_gdbarch_swap (current_gdbarch);
6093 clear_gdbarch_swap (current_gdbarch);
6095 /* Save the previously selected architecture, setting the global to
6096 NULL. This stops ->init() trying to use the previous
6097 architecture's configuration. The previous architecture may not
6098 even be of the same architecture family. The most recent
6099 architecture of the same family is found at the head of the
6100 rego->arches list. */
6101 old_gdbarch = current_gdbarch;
6102 current_gdbarch = NULL;
6104 /* Ask the target for a replacement architecture. */
6105 new_gdbarch = rego->init (info, rego->arches);
6107 /* Did the target like it? No. Reject the change and revert to the
6108 old architecture. */
6109 if (new_gdbarch == NULL)
6112 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
6113 swapin_gdbarch_swap (old_gdbarch);
6114 current_gdbarch = old_gdbarch;
6118 /* Did the architecture change? No. Oops, put the old architecture
6120 if (old_gdbarch == new_gdbarch)
6123 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6125 new_gdbarch->bfd_arch_info->printable_name);
6126 swapin_gdbarch_swap (old_gdbarch);
6127 current_gdbarch = old_gdbarch;
6131 /* Is this a pre-existing architecture? Yes. Move it to the front
6132 of the list of architectures (keeping the list sorted Most
6133 Recently Used) and then copy it in. */
6135 struct gdbarch_list **list;
6136 for (list = ®o->arches;
6138 list = &(*list)->next)
6140 if ((*list)->gdbarch == new_gdbarch)
6142 struct gdbarch_list *this;
6144 fprintf_unfiltered (gdb_stdlog,
6145 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6147 new_gdbarch->bfd_arch_info->printable_name);
6150 (*list) = this->next;
6151 /* Insert in the front. */
6152 this->next = rego->arches;
6153 rego->arches = this;
6154 /* Copy the new architecture in. */
6155 current_gdbarch = new_gdbarch;
6156 swapin_gdbarch_swap (new_gdbarch);
6157 architecture_changed_event ();
6163 /* Prepend this new architecture to the architecture list (keep the
6164 list sorted Most Recently Used). */
6166 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6167 this->next = rego->arches;
6168 this->gdbarch = new_gdbarch;
6169 rego->arches = this;
6172 /* Switch to this new architecture marking it initialized. */
6173 current_gdbarch = new_gdbarch;
6174 current_gdbarch->initialized_p = 1;
6177 fprintf_unfiltered (gdb_stdlog,
6178 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6180 new_gdbarch->bfd_arch_info->printable_name);
6183 /* Check that the newly installed architecture is valid. Plug in
6184 any post init values. */
6185 new_gdbarch->dump_tdep = rego->dump_tdep;
6186 verify_gdbarch (new_gdbarch);
6188 /* Initialize the per-architecture memory (swap) areas.
6189 CURRENT_GDBARCH must be update before these modules are
6191 init_gdbarch_swap (new_gdbarch);
6193 /* Initialize the per-architecture data. CURRENT_GDBARCH
6194 must be updated before these modules are called. */
6195 architecture_changed_event ();
6198 gdbarch_dump (current_gdbarch, gdb_stdlog);
6206 /* Pointer to the target-dependent disassembly function. */
6207 int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
6209 extern void _initialize_gdbarch (void);
6212 _initialize_gdbarch (void)
6214 struct cmd_list_element *c;
6216 add_show_from_set (add_set_cmd ("arch",
6219 (char *)&gdbarch_debug,
6220 "Set architecture debugging.\n\
6221 When non-zero, architecture debugging is enabled.", &setdebuglist),
6223 c = add_set_cmd ("archdebug",
6226 (char *)&gdbarch_debug,
6227 "Set architecture debugging.\n\
6228 When non-zero, architecture debugging is enabled.", &setlist);
6230 deprecate_cmd (c, "set debug arch");
6231 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");